[Lazarus] Decoding USB sniff data
Mark Morgan Lloyd
markMLl.lazarus at telemetry.co.uk
Fri Jun 4 12:21:52 CEST 2010
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__:
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
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
If in doubt put a 'scope on the interface to the handheld device, you
might need a level converter before you can attach a standard comms
So if that's correct then the app uses standard serial comms, there
might be a driver but it's purely to support the FTDI interface. You
could probably write one that looked very similar in Lazarus and then
extend it for database interface or whatever tickles your fancy. Then
tell Bayer you've done it and see if they are friendly.
BUT I would very strongly suggest not trying to change any of the
device's settings under software control since you might screw up its
calibration, unless you can get interfacing details.
Strictly, somebody has been naughty here since if I remember correctly
Java's license specifically excludes its use in medical equipment
because of safety/liability issues. Under the circumstances I think that
you must understand that if you use Lazarus for this sort of thing any
problems are your own.
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
More information about the Lazarus