Thursday, June 25, 2015

How to get Cadense and speed information using gattool

Last post was a quick "Yay it worked" post. This explains the procedure in more detail.

First use hcitool to scan for your device (activate it in some way so that it powers on first)

Now you know the address, start gattool and connect


$ gatttool -b 00:18:31:E4:D7:89 -I
[   ][00:18:31:E4:D7:89][LE]> connect

Ask for the primary services:

[CON][00:18:31:E4:D7:89][LE]> primary
[CON][00:18:31:E4:D7:89][LE]> 
attr handle: 0x0001, end grp handle: 0x000b uuid: 00001800-0000-1000-8000-00805f9b34fb
attr handle: 0x000c, end grp handle: 0x000f uuid: 00001801-0000-1000-8000-00805f9b34fb
attr handle: 0x0010, end grp handle: 0x001a uuid: 00001816-0000-1000-8000-00805f9b34fb
attr handle: 0x001b, end grp handle: 0x0029 uuid: 0000180a-0000-1000-8000-00805f9b34fb
attr handle: 0x002a, end grp handle: 0xffff uuid: 0000180f-0000-1000-8000-00805f9b34fb

Ask for the characteristics of the handler for the CSCP service (uuid 1816)

[CON][00:18:31:E4:D7:89][LE]> characteristics 0x0010 0x001a
[CON][00:18:31:E4:D7:89][LE]> 
handle: 0x0011, char properties: 0x10, char value handle: 0x0012, uuid: 00002a5b-0000-1000-8000-00805f9b34fb
handle: 0x0014, char properties: 0x02, char value handle: 0x0015, uuid: 00002a5c-0000-1000-8000-00805f9b34fb
handle: 0x0016, char properties: 0x02, char value handle: 0x0017, uuid: 00002a5d-0000-1000-8000-00805f9b34fb
handle: 0x0018, char properties: 0x08, char value handle: 0x0019, uuid: 00002a55-0000-1000-8000-00805f9b34fb

Ask for the character descriptor for the cadence information (uuid 2a5b)

[CON][00:18:31:E4:D7:89][LE]> char-desc 0x0011 0x0013
[CON][00:18:31:E4:D7:89][LE]> 
handle: 0x0011, uuid: 2803
handle: 0x0012, uuid: 2a5b
handle: 0x0013, uuid: 2902

Enable notification by writing 0100 to handle 0x0013.

[CON][00:18:31:E4:D7:89][LE]> char-write-req 0x0013 0100
[CON][00:18:31:E4:D7:89][LE]> Characteristic value was written successfully

You should now start to get notifications from the device
...
Notification handle = 0x0012 value: 03 ce 00 00 00 82 20 ea 00 be d8 
[CON][00:18:31:E4:D7:89][LE]> 
Notification handle = 0x0012 value: 03 cf 00 00 00 aa dd ea 00 be d8 
...

See the previous post for an explanation of the data.

Playing with CSCP Cycling Speed and Cadence using gattool

Inspired by a BB demo app I got myself a PanoBike CSCP BLE dongle a while back. Never had the time to do more than test it with the BB demo application and then I more or less forgot about it (and had no proper bike to use it on).

Today, inspiration hit me and I started to look at it a bit, for now first with gattool only.

Took a while to figure it out, BLE is a bit of a mystery with UUIDs and handles and so on.

Result:

Notification handle = 0x0012 value: 03 c8 00 00 00 06 99 e1 00 45 99

Byte 1: What data is available, crank=1 and wheel=2
Bytes: 2,3,4,5: Wheel revolutions
Bytes: 6,7: Wheel event timestamp

Bytes: 8,9: Crank revolutions
Bytes: 10,11: Crank event timestamp


Wednesday, June 24, 2015

Arduino based wireless sauna temperature sensor and display

I've been working on this on-and-off (more off than on..) for a couple of years now. The plan is to create a summercottage "automation" system, simply just a bunch of variouse sensors sending information to a base station with a display and perhaps some logging.

I first started with a MSP430 as the sensor board and a Raspberry Pi as the base station, but I never to get NRF24L01 TX/RX to work and forgot all about if again for a while.

Started thinking about it some weeks ago again and decided to try using the exact same NRF24L01 library and exactly the same platform and if that didn't work then either or both of my NRF24L01 boards must be broken.

After fiddling with the various settings I finally got them to talk, everything needs to match exactly or nothing will work.

At midsummer I got to try it out with a proper temperature sensor attached (and inside the sauna) the result can be seen in the video below:


Wednesday, June 17, 2015

Tuesday, June 16, 2015

Y-Radio BB10 version review issues

Don't know what the tester is doing but I've got it back now twice with a nice one-liner saying basically "No sound". Work for me so I wonder if the tester is doing something stupid like not having network connection ?

Anyway, submitted one now that complains loudly (in RED) if device is off-line, lets see if that helps.

YLE Radio application for BlackBerry 10

Onki for BlackBerry 10 is out (and an update is pending review)

A version of Onki, an Onkyo remote app, is now available for BlackBerry 10 devices in the application store.

Playing from a Network service

Tuner presets list

Actually it has been available for a couple of weeks already and I just sent a small update for review. The update adds an application cover that displays zone status, some minor UI updates and integration with the Now Playing interface.

Now playing integration


You can download Onki from BlackBerry World

Wednesday, June 10, 2015

Y-Radio coming to BlackBerry 10

An itch needed some scratching that resulted in me finally making and YLE Radio application for BlackBerry 10 devices. Goes by the name Y-Radio as the Jolla version.

This version is pretty basic, just a list of channels, play/stop button and quick access to channel web site(s).

Here is a quick intro video to the app:


Should be available in BlackBerry World as soon as review is done.