- RELIABLE zero/low-power person detection is required to avoid annoying operational behaviors.
- the value of various animation effects is subjective, and probably minimal
Month: June 2015
It’s been a struggle but I have an S130 simultaneously listening for broadcasts, while advertising, and able to listen for UI connections.
Receiving a broadcast advertising packet from another node called “Z1”. The example packet contains a maximally-sized 20-byte block of “proprietary data”, i.e. it doesn’t conform to the BLE standard and will only make sense to TS devices.
TS (7) [c7.60.61.56.c1.bf] – BLE_GAP_EVT_ADV_REPORT
T9(2)NAME Z1 Field type and length
T1(1)FLAGS 04
T255(22)TS_PROPRIETARY_DATA [(20), 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 ]
It requests second block of data from the broadcaster – the so-called scan response data. (For some reason this appears to come from a different MAC address – 0xbe instead of 0xbf?? ) This block contains the state of the sender’s battery, and the temp – just random bits of data it was easy to provide.
TS (8) [c7.60.61.56.c1.be] – BLE_GAP_EVT_ADV_REPORT
T22(3)BLE_UUID_BATTERY_SERVICE 100%
T22(6)BLE_UUID_HEALTH_THERMOMETER_SERVICE 34C
Now I use my Android phone and an off-the-shelf applciation to make a “TS_UART” connection to the S130. TS_UART is a connection that simply sends and receives strings of characters (up to 20).
———————-
UI connected.
———————-
While waiting for some activity on the connection it continues to report broadcast packets…
TS (9) [c7.60.61.56.c1.c6] – BLE_GAP_EVT_ADV_REPORT
T9(2)NAME Z1
T1(1)FLAGS 04
T255(22)TS_PROPRIETARY_DATA [(20), 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 ]
TS (10) [c7.60.61.56.c1.c6] – BLE_GAP_EVT_ADV_REPORT
T22(3)BLE_UUID_BATTERY_SERVICE 100%
T22(6)BLE_UUID_HEALTH_THERMOMETER_SERVICE 34C
TS (11) [c7.60.61.56.c1.c6] – BLE_GAP_EVT_ADV_REPORT
T9(2)NAME Z1
T1(1)FLAGS 04
T255(22)TS_PROPRIETARY_DATA [(20), 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 ]
I type a string “buddy” into my phone UI and press “send”. This is the interim mechanism I intend to use to configure each node, and to query it for statistics and so forth.
———————-
UI received string “buddy”
———————-
How slowly everything proceeds! I’m just banging away at getting the right/minimal combination of BLE features into our footprint.
The challenge is to be able to have BLE do three things at the same time:
- On some condition (TBD) broadcast a BLE command to peers asking them to to turn on their DW chip for subsequent ranging;
- Listen out for instructions from peers to turn on theDW chip and respond to their subsequent range request;
- Respond to operator commands to set various parameters on the peer. Don’t quite know what they will be, but probably some short UID, role(anchor, wearable, gateway…).
Being both a broadcaster/advertiser (aka service), and a listener(aka central/application/scanner) is not the standard behavior for Nordic chips.
Recently Nordic created a new soft machine called the S130 which is able to be a broadcaster/advertiser and a listener/scanner simultaneously – albeit in a limited way. The soft-machine is basically an operating system.
TS06 requirements are actually quite modest, but unusual and I’m trying to build them atop the S130, and shoe-horn them into the nRF51822 along with the DW libraries. I think the code will fit OK, but the challenge is likely to be the limited RAM size for buffers.
Since this is a show-stopper until we get the 32K chips (and maybe even then) it’s a priority to see if this can all be done.
So far I have managed to get some trivial programs that generate zero radio traffic, but blink LEDs running atop the S130. This turned out to be more of a configuration nightmare than I thought because there was an errors in Nordic’s “.ld” file they published for the S130. That was several days wasted.
Yesterday I managed to get an advertiser running atop the S130, and I was able to observe it’s adverts were correct using my phone. It’s a simple and almost trivial accomplishment, but a relief to have made a bit of progress.
The next step is see if I can get the scanner side working in parallel with the advertiser.
https://www.ifixit.com/Teardown/Pebble+Time+Teardown/42382
Highlights
This 150 mAh, 0.57 Wh, 3.8 V battery packs a bit less punch than even the smallish 205 mAh, 0.78 Wh battery we found in the Apple Watch.
That’s also about half the juice of other recent smartwatches, like the Moto 360 and the Samsung Gear Live—but with its e-paper display, Pebble claims that the Time can last up to seven days between charges.
I have been struggling to get any program to run with the s130 softmachine. The programs just don’t start, and I think they are just generating a fault in the startup code. This has consumed me for days. The trick, as always, is to figure out the right google search terms.