18
#devsum15 Having fun with BLE, RaspberryPi & Azure Uffe Björklund Note: code and article for this session is available at https://github.com/uffebjorklund/TI- CC2650 @ulfbjo [email protected]

DevSum15 - having fun with BLE, Raspberry Pi and Azure

Embed Size (px)

Citation preview

Page 1: DevSum15 - having fun with BLE, Raspberry Pi and Azure

#devsum15

Having fun with BLE, RaspberryPi & Azure

Uffe Björklund

Note: code and article for this session is available at

https://github.com/uffebjorklund/TI-CC2650

@ulfbjo [email protected]

Page 2: DevSum15 - having fun with BLE, Raspberry Pi and Azure

#devsum15

About Me

@ulfbjo [email protected]

2000

2007

2010

2014

● Stateful (BI-directional/Full-Duplex) communication● High performance● Scalable● Modular

Page 3: DevSum15 - having fun with BLE, Raspberry Pi and Azure

#devsum15

Why?

@ulfbjo [email protected]

In the beginning...

Page 4: DevSum15 - having fun with BLE, Raspberry Pi and Azure

#devsum15

Why?

@ulfbjo [email protected]

Now...

Page 5: DevSum15 - having fun with BLE, Raspberry Pi and Azure

#devsum15

So what is the challenge?

@ulfbjo [email protected]

MQTT

AMQP

XMPP

RESTWEBSOCKETS

CoAPCustom

Page 6: DevSum15 - having fun with BLE, Raspberry Pi and Azure

#devsum15

A magic option...

@ulfbjo [email protected]

Page 7: DevSum15 - having fun with BLE, Raspberry Pi and Azure

#devsum15

Sadly...

@ulfbjo [email protected]

Page 8: DevSum15 - having fun with BLE, Raspberry Pi and Azure

#devsum15

So...

@ulfbjo [email protected]

USE COMMON SENSE

The developer should be in control, not the framework

Page 9: DevSum15 - having fun with BLE, Raspberry Pi and Azure

#devsum15

What to do?

@ulfbjo [email protected]

- We build one protocol and then adapt each client to use it…

- Or we allow clients to talk to each other “cross-protocol”

Page 10: DevSum15 - having fun with BLE, Raspberry Pi and Azure

#devsum15

I prefer x-protocol

@ulfbjo [email protected]

Page 11: DevSum15 - having fun with BLE, Raspberry Pi and Azure

#devsum15

10.000 feet

@ulfbjo [email protected]

Page 12: DevSum15 - having fun with BLE, Raspberry Pi and Azure

#devsum15

Then there is STATE!

@ulfbjo [email protected]

- STATE is important! If you do not know the clients you do not know who to send to.

- We have full duplex connections, use STATE

- STATE will reduce development time

- STATE will decrease the size of your messages

- STATE will reduce the complexity of your application

Page 13: DevSum15 - having fun with BLE, Raspberry Pi and Azure

#devsum15

TI-CC2650

@ulfbjo [email protected]

Ultra Low Power Wireless MCU

Infrared & ambient IR-temp

Ambient light sensor

Humidity sensorBarometric pressure sensor

9-axis Motion Tracking Device- Accelerometer- Gyroscope- Compass

Page 14: DevSum15 - having fun with BLE, Raspberry Pi and Azure

#devsum15

TI-CC2650

@ulfbjo [email protected]

Infrared & ambient IR-temp

//CONNECT

gatttool -b [TAGID] -I

//START MEASUREMENT

char-write-cmd 0x24 01

//ENABLE READ

NOTIFICATION

char-read-hnd 0x21

//ENABLE NOTIFICATION

char-write-cmd 0x22

01:00

//DISABLE NOTIFICATION

char-write-cmd 0x22

00:00

Page 15: DevSum15 - having fun with BLE, Raspberry Pi and Azure

#devsum15

TI-CC2650

@ulfbjo [email protected]

<code/>

Page 16: DevSum15 - having fun with BLE, Raspberry Pi and Azure

#devsum15

The fake unicorn way

@ulfbjo [email protected]

The question is not if things will change, it's only a matter of when they will change.. Make sure you have the flexibility to adapt when changes

come!

Be in control of your transports!

Might work just fine...

Page 17: DevSum15 - having fun with BLE, Raspberry Pi and Azure

#devsum15

Questions?

@ulfbjo [email protected]

Page 18: DevSum15 - having fun with BLE, Raspberry Pi and Azure

#devsum15

Thanks!

@ulfbjo [email protected]

- Mail: [email protected]

- Twitter: @ulfbjo or @xsockets

- LinkedIn: http://se.linkedin.com/in/uffebjorklund

- https://github.com/uffebjorklund/TI-CC2650