3
« on: August 13, 2004, 09:17:45 pm »
Thanks for putting up your logs...
This has to be the most incredible timing, you started this thread the day my endocrinologist gave me an Accu-Chek Compact when I asked him about it. (Gotta love the "give away the razor, rip em' off on the blades" concept that the bloodsugar meter companies adopted.)
Going through portmon logs is really unpleasant... All those *$#@)* status checks, but I eventually figured out a good deal of what's going on by looking through the log you posted. (I don't have Compass myself, nor do I even have the cable, but neither have stopped me thanks to your log.
The protocol is standard IrDA serial, 9600 8N1. If you happen to have a machine with an IrDA port (The Zaurus is a good example, I'm not a Zaurus owner myself but I do have a Dell Inspiron 8200 with an IR port that is dual-boot Linux/Win2k)., no need for Roche's $30 cable.
The protocol seems to be a mix of ASCII with the occasional nonprintable control character thrown in. Most prominent are that all commands seem to have 0x0D as a postfix, and most return strings are preceded by 0x0602 and followed by 0x0406. I have actually been able to see my bloodsugar results in plaintext returned from the meter.
I'm working on a Perl script that retrieves the readings from the meter. I'll post it after I clean it up slightly. I also need to bump up the count of readings by one so I can figure out which of the return values is indicating the number of current readings in the meter. Yours is obviously at the maximum value of 200, mine isn't (5 right now... Since I only have one drum I'm switching back and forth between my Compact and my Glucometer DEX.), and the number of readings to retrieve must be specified. (If you specify too high a value, it won't work. Appears to give some sort of error, but I have no idea if it's actually an error or what. )
Edit: Just did my evening bloodsugar test, and the number of results is returned after the "`" command is issued. Yes, one of the commands is simply "`" followed by 0x0D.
The other commands present in that log are:
C4
C 3
S 1
S 2
S 3
a 1 N - where N is the number of readings to retrieve. The command actually be
a X Y - where X is the index of the first reading to retrieve and Y is the index of the last.
The second to last printable character of EVERY return string seems to be 6.
Another last edit: For some reason you cannot send characters to the meter very fast. In my script I need to put a small sleep in between each sent character - If I send them all at once, or each in a seperate write() command without any sleep commands in between, things break.