On Darwin (Max OS X 10.7.4), I am using a "Garmin USB ANT stick" through libusb-1.0 to communicate with a "BC-1000 ANT+ Radio Wireless Body Composition Monitor".
The USB parts (init, find, open, claim) are working, I can send and receive ANT messages.
I am following the ANT-UserGuide.pdf and ANT_Weight_Scale_Device_Profile.pdf documentations.
The problem is that the scale is not turning on after I send the user profile, and quickly after the channel close itself.
* fyi: this scale do not have a power button, it power up automagically when a button is pressed on a watch (the light button on a Garmin Forerunner 210) or on the Tanita Display.
There must be something I did wrong?
Please find below a log of an ANT session.
TX:HEX means data is sent to the stick, and RX:HEX means data is read from it.
Thank you!
send reset
TX:A4-01-4A-00-EF
RX:A4-01-6F-20-EA
send key (ANT+ key)
{Edited to remove ANT+ network key}
RX:A4-03-40-00-46-00-A1
send assign channel (channel type = 0(slave), network = 0)
TX:A4-03-42-00-00-00-E5
RX:A4-03-40-00-42-00-A5
send channel id (device number = 0(searching), device type = 199(the documentation said so), transmission type = 0(pairing))
TX:A4-05-51-00-00-00-77-00-87
RX:A4-03-40-00-51-00-B6
send channel timeout
TX:A4-02-44-00-FF-1D
RX:A4-03-40-00-44-00-A3
send channel period (period = 8192 counts(4 Hz))
TX:A4-03-43-00-20-00-C4
RX:A4-03-40-00-43-00-A4
send channel frequency (frequency = 57(2457 MHz))
TX:A4-02-45-00-39-DA
RX:A4-03-40-00-45-00-A2
send open channel
TX:A4-01-4B-00-EE
RX:A4-03-40-00-4B-00-AC
wait for data (page = 1, scale is ready to receive user profile)
RX:A4-09-4E-00-01-FF-FF-02-FF-FF-FE-FF-E1
send profile (page = 58, profile id = 16, display supports profile exchange, 32 yo male, 168 cm, standard and sedentary)
TX:A4-09-50-00-3A-10-00-00-FF-A0-A8-00-20
RX:A4-03-40-00-01-02-E4 (02 = EVENT_RX_FAIL)
RX:A4-03-40-00-01-02-E4 (02 = EVENT_RX_FAIL)
RX:A4-03-40-00-01-07-E1 (07 = EVENT_CHANNEL_CLOSED)
EDIT:
I tried sending data with broadcast(0x4E) and acknowledged(0x4F) too.
I tried with transmission type to 0x05 too.
Sometime, I randomly got a page 80 or a page 81 instead of a page 1.
But every time with the same outcome: RX_FAIL and CHANNEL_CLOSED