On 6/4/2010 06:21, Mark Morgan Lloyd wrote:
Mark Morgan Lloyd wrote:
So to summarise: work out what class of USB device you've got, inspect
the Java, and then (only) if necessary use standard tools on the XML.
I believe that all of these are well-understood by practitioners in
appropriate fields (but not necessarily by me :-)
Right. So a few minutes Googling takes me to
http://ubuntuforums.org/showthread.php?p=8439613 which implies that the
cable has an FTDI converter 1a79:6001 [checks] which Linux 2.6.32 should
support (older kernels might need a patch). The handheld device is
serial hence courtesy of __j__:
-----8<-----
For what it's worth, getting results from the Contour using the serial
connector is pretty straightforward:
1. When you plug the meter in and press the "M" button, the device will
send an ENQ (ASCII code 5) to signal that's it's listening.
2. You reply with an ACK (ASCII code 6), saying "send me the next record."
3. The device will send you a record. To signal you received it and want
the next one, send another ACK.
4. Repeat until you've exhausted all the records.
The first record you get will be a header of sorts. The next 2 are misc
information. Everything after that are glucose measurement records (or
control solution).
----->8-----
i would assume (yeah, doncha hate that?) that when there are no more records in
the device that it would send a NAK to the ACK instead of a record?? the NAK
meaning there are no more records...
ie: -> == from device and <- == to device
-> ENQ
<- ACK
-> DATA (header)
<- ACK
-> DATA (misc data 1)
<- ACK
-> DATA (misc data 2)
<- ACK
-> DATA (record 1)
<- ACK
:loop
-> DATA (record 1+x)
<- ACK
(increment x)
(goto loop until NAK)
-> NAK (no more records)
(then whatever shutdown code may be necessary)
the above depicting the transfer of only two records of glucose data in the
device...
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus