ARMmbed / ble-examples

BLE demos using mbed OS 3 and yotta.
Apache License 2.0
24 stars 27 forks source link

Change Eddystone example frame scheduling #47

Closed andresag01 closed 8 years ago

andresag01 commented 8 years ago

Change the scheduling of URL, TLM and UID frames to follow the specification recommendations. Instead of advertising X number of consecutive frames of the same type, it is now possible to set the advertisement interval of the individual frames. By default the intervals are:

0ms UID, TLM, URL packets are sent (they are actually sent at 100ms intervals as the BLE spec suggests) 300ms UID 600ms UID 700ms URL 900ms UID and so on...

It also possible to configure this rated after the beacon mode has been set by calling theset{URL|TLM|UID}FrameAdvertisingInterval() functions. Notice that setting the interval to 0ms effectively turns off that particular frame.

The way to schedule advertisements has also a changed. The radio notification is no longer used, rather we schedule callbacks using minar and update the payload. Once the payload is updated the device is expected to retransmit the advertisement.

Finally, a set of other bugs were fixed:

NOTE: This changes have not been profiled for power consumption. @pan-