View Full Version : OneTouch UltraSmart Communication via RS232
BriOnH
09-20-2006, 01:18 PM
Fellow computer nerds,
Do any of you know how to translate the ouput of a Onetouch US into a readable text? Here is a sample (thank you Kevin!):
<DLE><STX><SOH><CAN><RS>3r0<NUL><SOH><NUL><RS><DLE><ETX>s
<DLE><STX>HR<SOH><DLE><ETX><DC3>
<DLE><STX><SOH><FS>3<DLE><DLE><NUL><SOH><NUL>C<DLE><ETX>z
<DLE><STX>HR<SOH><DLE><ETX>=
<DLE><STX><SOH>u<ESC>3`<NUL><SOH><NUL>{<DLE><ETX>M
<DLE><STX>HR<SOH><DLE><ETX>'
<DLE><STX><SOH>%<ESC>3{`<NUL><SOH><NUL>Z<DLE><ETX>)
<DLE><STX>HR<SOH><DLE><ETX>a
I know what this is, I just don't know how to translate it into meaningful data. Any help would be much appreciated.
-B
JediSkipdogg
09-20-2006, 02:04 PM
FYI....the above data from the UltraSmart is ONLY BG readings and datestamp. I don't use any advanced features, so there is nothing on the carb, insulin, etc. data that can be stored as well.
Brion...I hate to say this, but it may be easier to find a way to crack the archive files open from the Lifescan software and import the data that way. But then of course you have to figure out what password LS uses, lol.
spike
09-20-2006, 02:32 PM
But then of course you have to figure out what password LS uses, lol.
hmm....I've got that password tucked away.
Cyborg
09-20-2006, 03:41 PM
You figure that out and I will be impressed. :smartass:
spike
09-20-2006, 03:47 PM
Then prepare to be impressed! <g> I'm not divulging the password on the open forum, however. I also don't have it listed on my current PC--it's most likely on my previous PC sitting in the attic...along with a few other retired PC's. If I had all the money I've spent of computer stuff since '85, I'd be a rich man!
BriOnH
09-20-2006, 05:02 PM
Then prepare to be impressed! <g> I'm not divulging the password on the open forum, however. I also don't have it listed on my current PC--it's most likely on my previous PC sitting in the attic...along with a few other retired PC's. If I had all the money I've spent of computer stuff since '85, I'd be a rich man!
So be prepared to be impressed, but don't be? :-
spike
09-20-2006, 05:48 PM
So be prepared to be impressed, but don't be? :-
Ever heard of PM's? That's the only way I'll release the password. But not to anyone who is rude.
BTW, with my leg injury I'll not be rummaging around in the attic for quite some time to recover the password from my old PC.
BriOnH
09-20-2006, 05:59 PM
Ever heard of PM's? That's the only way I'll release the password. But not to anyone who is rude.
BTW, with my leg injury I'll not be rummaging around in the attic for quite some time to recover the password from my old PC.
Yes, and I attest to that's why I don't have a girlfriend. Sorry to read about your leg.
Cyborg
09-20-2006, 06:02 PM
:rofl: Almost missed that one...
spike
09-20-2006, 10:02 PM
Yes, and I attest to that's why I don't have a girlfriend. Sorry to read about your leg.
<G> Sorry to hear about you being w/o a girlfriend! That's MUCH worse of a predicament than an injured leg.
JasonJayhawk
09-20-2006, 11:10 PM
Brian,
Are you using a serial port sniffer to view the RS232 traffic? While there's a pattern in the data, I've seen the same pattern from an airplaine traffic avoidance system, only to discover that I was reading at the incorrect parity or bit length (7 vs. 8 bits) -- after correcting it, the pattern went away, and a new pattern emerged that was in good human text.
If you're "sniffing" and the Lifescan software is simultaneously receiving the data with no problems, then that certainly is a weird data format. Otherwise, the "mean" engineers have decided to transmit the data in a obfusicated binary method. The only way to "crack" that is to get a data transfer performed on a meter, then add one value, and transfer again, and then "diff" the two, and try to extract a pattern.
The OneTouch Ultra transfer protocol, I recall, was in text, with a checksum value added at the end of each line.
Do you have the RS-232 communications specification document for the Ultra meter? If not, let me know, and I'll get my old computer out and booted and will send you it... It's been two years since I've looked at it, so I don't know how detailed it was (it was a very short document, and you probably already have it).
I sort of assumed they would have kept the comm spec the same for the UltraSmart, only with the addition of the insulin/med/exercise/(and so on) data. *grumble* :stupido2:
Think Lifescan would be kind enough to reveal :bath: their format like they did for the Ultra?
JasonJayhawk
09-20-2006, 11:15 PM
Brion...I hate to say this, but it may be easier to find a way to crack the archive files open from the Lifescan software and import the data that way. But then of course you have to figure out what password LS uses, lol.
Is it an MS-Access database? If so, I've seen some brute-force password cracking programs "out there" (good for the people who forget their database passwords). I'm sure we could get in to one if nobody remembers the password or can't find it in cleartext in the executable. :call2:
spike
09-20-2006, 11:17 PM
Is it an MS-Access database?
Yes, it's Access.
JasonJayhawk
09-20-2006, 11:24 PM
Yes, it's Access.
Any idea what version? 97/2K? I know I have a brute-force program if we really want "in" to that. It could take days or weeks to break in, depending on the password complexity, but we could do it if it comes down to it. Googling for this kind of tool shows that it's out there.
spike
09-21-2006, 12:22 AM
Any idea what version? 97/2K? I know I have a brute-force program if we really want "in" to that. It could take days or weeks to break in, depending on the password complexity, but we could do it if it comes down to it. Googling for this kind of tool shows that it's out there.
I think I cracked it in about 10 seconds...
JasonJayhawk
09-21-2006, 12:23 AM
I think I cracked it in about 10 seconds...
Awesome! So we won't need it to be cracked, or we have to re-crack it because your password is on an archived computer? :bebored:
spike
09-21-2006, 12:32 AM
Awesome! So we won't need it to be cracked, or we have to re-crack it because your password is on an archived computer? :bebored:
yes, but it's in the attic and I've got a bum leg preventing me from climbing the rickety drop-down ladder. It's dangerous enough when I'm healthy! :) Sorry I can't get to it now. Wish I could remember the password. Otherwise I need to remember the program that I cracked it with. Most of them only show a few characters of the password unless you pay. Try Googling "ms access password free". the first hit MIGHT be the program I used, but it's been so long I can't tell for sure. If you get the correct program it's a breeze to recover the password.
Clint
09-21-2006, 06:57 AM
i think I remember it... let me try it and see, cause I wrote my own program to read the life scan database..
JediSkipdogg
09-21-2006, 07:16 AM
If anyone finds out that password BrionH and I would greatly appreciate it. We are trying to find a way to get the UltraSmart into the Diabuddies system. The Ultra was easy to crack, hence why they use it to communicate with the Dexcom and no other Ultra product. We are having a hard time though finding out the translations for the UltraSmart (haven't tried the Ultra 2 yet.)
I will try changing the bit and such, but you can't even Hyperterminal into the UltraSmart. I tried with every setup possible and got nothing. But the Ultra worked on the first try.
Clint
09-21-2006, 10:20 AM
you know that you can export your readings into excel and then into something else...
JasonSmithMT
09-21-2006, 10:43 AM
This is what I use to crack MS Access passwords:
http://www.nirsoft.net/utils/accesspv.html
Easy to use, free, and has always worked.
All the Lifescan meters used to transmit data in plain text and they used to be good about publishing communication specifications and commands. Like many other meters that doesn't appear to be the case any more. Ask Lifescan if they have an API.
Jason
BriOnH
09-21-2006, 09:53 PM
Jason,
Yes, Kevin and I used a term sniffer to see what data was being sent and recieved from the lifescan software to and fro the US meter and thats what Kevin was able to get before his computer crashed. I could write a quick app to crack the access db, but I really want to have my com program to ul the readings to the SQL server directly, so it can be more seemless and less steps(ideally everything will be running from the website, to themeters). I'll translate the date. I just hate Data Link Escape, Start transmission, EDI type messageing. Whoever designed the comm standards for the entire OneTouch line is very, VERY old school. They should have used XML instead of DLE/EDI. Worse comes to worse the Access DB can be used, but I am pretty confident I can translate the US data; better then Lifescan did. I would like an API from LS, would make it SO much easier. Abbot/Freestyle series did it great. I am so happy with the meter(freestyle flash) all around, I buy my strips OTC. Thanks for the help here Jason.
-B
JasonJayhawk
09-21-2006, 10:08 PM
For what it's worth, I emailed Lifescan to ask for the serial communications routines for the Ultrasmart. I did find the serial protocol for the Ultra on my other computer -- if you don't have it -- I'll send it to you or anyone who asks.
If you haven't already, maybe if several of us email them to request the Ultrasmart protocol, it would convince them that it's a sound business decision to be open like Therasense (Abbott) did.
If you're ever bored, and my computer is on, you can take a quick gander at thesis work (liveabetes.com). The data mining side of it isn't interfaced yet, and I'm running out of time, but it was my attempt at doing something that's been done on a million other sites, only with my own flair to it. Maybe when we win the lottery and can afford to work together on something, we can share ideas, especially once you give up the Mac and .NET programming and move over to PHP :- :- :- . :ridinghor
BriOnH
09-22-2006, 01:32 PM
Right on! Thanks Jason. The abbot was super easy. I just hooked it up typed in the stadard mem command and it came back perfectly. Lifescan's suck, imo, at connectivity. It's obvious last on the list of functions as far as priorities.
i keep trying your site bet its never up! I love php too. Macs are actually much better for coding php then windows machines are. I use my mac for all my graphic art, design, video/ audio work. I use the pc(windows) to code. A lot of programmers can't accept it, but visual studio 2005 is light years ahead of any other IDE. Intellisense alone sppeds up my work by 50%. Intellisense in xcode, or java IDEs is useless, at best. PHP can easily be integrated with .NET. This is true for all programming types. Especially if you practice Service Oriented Architecture(SOA), and if you aren't practicing SOA, start.
JasonSmithMT
09-22-2006, 01:48 PM
A lot of programmers can't accept it, but visual studio 2005 is light years ahead of any other IDE.
Amen brother. Got to like the price and functionality of PHP but if I have my choice I would always choose .NET at this point.
Jason
Clint
09-23-2006, 08:28 AM
I do Flex and Flash programming so I can add some 'flair' to the front end.. I would like to see how to sniff the port of the US...
BriOnH
09-23-2006, 10:11 AM
I do Flex and Flash programming so I can add some 'flair' to the front end.. I would like to see how to sniff the port of the US...
And I would like to know how to translate it. :)
I use Advanced Serial Port Monitor to sniff comm traffic. There are a bunch of sniffers out there, just do a google search for one if you want to see it for yourself.
BriOnH
09-28-2006, 12:09 PM
ok, with the help of our senior architect and director of development here, I have been able to communicate with the Ultrasmart via Hyperterm. The key is to set the baud rate at 38.4, as the meter can't synch at lower baud rates. The standard DM commands that work with the other Lifescan meters work on the UltraSmart, EXCEPT the DMP, the most valuable command there is. The DuMP of data from the meter to the terminal program.
For those interested here is the result of the sniff I did:
DMN[13]N 08 09 00 01DF[13][10][17][13][0]DMS[13][13][17][13]DMS[13][13][17][13]DMS[13][13][17][13]DMS[13][13][17][13]DMS[13][13][13]DMS[13][13][13]DMS[13][13][17][13]DMS[13][13][17][13]DMS[13]S 0053[13][10][13][17][13]DM@[13]@ "TRN004BDV" 0308[13][10][17][13]DMT[13]T 0054[13][10][17][13]DM?[13]?V02.06.01 10/30/02 03BE[13][10][17][13]DM?[13]?V02.06.01 10/30/02 03BE[13][10][17][13]DM@[13]@ "TRN004BDV" 0308[13][10][17][13]DMT[13]T 0054[13][10][17][13]DMF[13]F "THU","09/28/06","10:44:00 " 060F[13][10][17][13]DM?[13]?V02.06.01 10/30/02 03BE[13][10][16][2]HT[16][3]K[16][2]6[27]8[16][3]+[16][2]HS[0][0][0][16][3]z[0][0][0][0][0][0][0][0][0][0][16][2][0][0][0][16][3][8][16][2]HR[0][0][16][3][18][16][2][0][1]D5[0]\[0][0][0][0][16][3]2[16][2]HR[0][1][16][3][8][16][2][0][2]D50[0][1][0][0],[16][3]X[16][2]HR[0][2][16][3]&[0][0][0][0][0][0][0][0][0][16][2][0][3]|50[0][2][0][0]Y[16][3]\[16][2]HR[0][3][16][3]<[16][2][0][4][14][2]6[155]p[0][3][0][0]C[16][3])[16][2]HR[0][4][16][3]z[16][2][0][5][2]6[18]q[0][4][0][0]h[16][3][20][16][2]HR[0][5][16][3]`[0][0][0][16][2][0][6]k[4]6< [0][5][0][0]`[16][3]\[16][2]HR[0][6][16][3]N[0][0][0][0][0][0][0][0][0][0][0][0][0][0][16][2][0][7][6]6P[0][6][0][0]M[16][3];[16][2]HR[0][7][16][3]T[16][2][0][8][18]6[158]`[0][7][0][0]J[16][3][19][16][2]HR[0][8][16][3]O[16][2][0][0][16][3]p[17][13]DM@[13]@ "TRN004BDV" 0308[13][10][17][13]DMT[13]T 0054[13][10][17][13]DMF[13]F "THU","09/28/06","10:44:25 " 0616[13][10][16][2]HT6[27]D[16][3][10][16][2]6[27]D[16][3]%[17][13]DMO01[13][0][0][0][0]O01 "Pill A" 1 0357[13][10][17][13]DMO02[13]O02 "Pill B" 1 0359[13][10][17][13]DMO03[13][0][0][0][0][0][0][0][0][0][0][0][0]O03 "Pill C" 1 035B[13][10][17][13]DMO04[13][0][0][0][0]O04 "Pill D" 1 035D[13][10][17][13]DMO05[13]O05 "Pill E" 1 035F[13][10][17][13]DMO06[13]O06 "" 0 0169[13][10][17][13]DMO07[13]O07 "" 0 016A[13][10][17][13]DMO08[13][0][0][0][0][0][0][0][0]O08 "" 0 016B[13][10][17][13]DMO09[13][0][0][0][0]O09 "" 0 016C[13][10][17][13]DMO10[13]O10 "" 0 0164[13][10][17][13]DMO11[13][0][0][0][0]O11 "" 0 0165[13][10][17][13][0][0]DMO12[13][0][0][0][0]O12 "" 0 0166[13][10][17][13]DMO13[13][0][0][0][0]O13 "" 0 0167[13][10][17][13]DMO14[13]O14 "" 0 0168[13][10][17][13]DMO15[13][0][0][0][0]O15 "" 0 0169[13][10][17][13]DMQ[13]Q 01 02 00 00 00 02D4[13][10][17][13]DMQ[13]Q 01 02 00 00 00 02D4[13][10][17][13]DMQ[13]Q 01 02 00 00 00 02D4[13][10][17][13]DMQ[13]Q 01 02 00 00 00 02D4[13][10][17][13]DMQ[13]Q 01 02 00 00 00 02D4[13][10][17][13]DMI01[13][0][0][0][0]I01 "Rapid" 1 034F[13][10][17][13]DMI02[13][0][0][0][0]I02 "Regular" 1 0432[13][10][17][13]DMI03[13][0][0][0][0]I03 "Lente" 1 0359[13][10][17][13]DMI04[13]I04 "NPH" 1 0248[13][10][17][13]DMI05[13][0][0]I05 "Ultralen" 1 04AA[13][10][17][13]DMI06[13][0][0][0]I06 "Premixed" 1 04A2[13][10][17][13]DMI07[13]I07 "Other" 1 0367[13][10][17][13]DMI08[13][0][0][0][0]I08 "InsulinA" 1 0489[13][10][17][13][0][0]DMI09[13][0][0][0][0]I09 "InsulinB" 1 048B[13][10][17][13]DMI10[13][0][0][0][0][0][0][0][0][0][0][0][0]I10 "InsulinC" 1 0484[13][10][17][13]DMI11[13][0][0][0][0]I11 "" 0 015F[13][10][17][13]DMI12[13]I12 "" 0 0160[13][10][17][13]DMI13[13][0][0][0][0]I13 "" 0 0161[13][10][17][13]DMI14[13][0][0][0]I14 "" 0 0162[13][10][17][13]DMI15[13][0][0]I15 "" 0 0163[13][10][17][13]DMI16[13]I16 "" 0 0164[13][10][17][13]DMI17[13]I17 "" 0 0165[13][10][17][13]DMI18[13][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0]I18 "" 0 0166[13][10][17][13]DMI19[13][0][0][0][0][0]I19 "" 0 0167[13][10][17][13]DMI20[13][0][0][0][0]I20 "" 0 015F[13][10][17][13]DMI21[13]I21 "" 0 0160[13][10][17][13]DMN[13]N 08 09 00 01DF[13][10][17][13]DMN[13]N 08 09 00 01DF[13][10][17][13]DMN[13]N 08 09 00 01DF[13][10][17][13]DM@[13]@ "TRN004BDV" 0308[13][10][17][13]DMT[13]T 0054[13][10]
This is great progress as I can now get a serial object to communicate with the meter, the bad part though is no where in there is the actual blood glucose level's. I wrote an email to lifescans tech dept, and hope they will write back. Anyone have any ideas on how to get BGL's from that? Here are the levels in there
203
230
155
274
60
164
158
(yes those sugars suck, they are very random) If the software can detect the levels from that surely I (we) can.
-B
JasonJayhawk
09-28-2006, 12:21 PM
Could you do one more blood glucose measurement and do the same capture, and then we could diff the results to see what changes? If nothing changes, then we'd know something wasn't right -- and if something changes, we'd have a better idea where to look.
I'm shocked they used 38.4K -- a poor cable or a heavy-tasking system is most likely going to drop characters during that fast of a speed without any sort of flow control. Their older meters don't use flow control, and I doubt they put any in their new meter.
I'm still awaiting a response from Lifescan.... wonder if we'll ever hear anything from them.
BriOnH
09-28-2006, 01:23 PM
Good idea Jason. I don't have any onetouch strips with me at work so i'll have to remember to bring some tomorrow from home. I soley use the Freestyle flash. Using the one touches here and there lately kind of bite imo. The amount of blood in comparison to the flash strips is quite noticable, and flash's size for function can't be beat. I wish more insurance companies would carry it in their coverage.
38400 bits per second baud rate. I remember when I started on a 150 bps modem and had to have a phone headset attached to the modem base. Ahh those were the days.
Thanks for contacting them like you said. Hope one of us hears back from them.
JasonJayhawk
09-29-2006, 12:26 AM
I don't like the blood requirements for the OT either -- my insurance would cover it, but I'm happier with Aviva's 0.6 requirement. Freestyle was my first and favorite, but no coverage. (sigh)
I started on a 300 baud with a Commodore 64 (well, sort of -- I copied what I saw someone else do to log into local BBS's, although I didn't know what I was doing!). I remember dialing with the phone because the pulse dial was too slow, and then hanging it up after enabling the modem. I remember the terminal software having an option for 150 baud. I never thought BBS's would disappear like they did... I ran a MajorBBS system for a friend who must have poured thousands into the software before the collapse of the system into a ghosttown... he had 6 phone lines going into his house in the beginning, but kept reducing it down until it was just one line, and one call a week.
There was a website called www.bbsmates.com where you could look up old lists of BBS systems and even post messages if you were an old user, to try to find old friends.
Ironically, that website just went down two weeks ago, and I still haven't seen it up (though Google has it cached -- hopefully they just took a vacation).
Here's a link (http://archive.salon.com/tech/feature/2002/05/31/back_in_the_day/) to an article that brings up those old days... *sigh*
Now I'm in a sentimental mood! :bebored:
condensr
10-05-2006, 02:47 AM
Good idea Jason. I don't have any onetouch strips with me at work so i'll have to remember to bring some tomorrow from home. I soley use the Freestyle flash. Using the one touches here and there lately kind of bite imo. The amount of blood in comparison to the flash strips is quite noticable, and flash's size for function can't be beat. I wish more insurance companies would carry it in their coverage.
38400 bits per second baud rate. I remember when I started on a 150 bps modem and had to have a phone headset attached to the modem base. Ahh those were the days.
Thanks for contacting them like you said. Hope one of us hears back from them.
Thats the trick with the US: It DOES use flow control. Much of the garbage you see are flow control commands. The DMP command would be nice, but it looks as if the US requires the program to query every reading..
JasonJayhawk
10-05-2006, 06:31 AM
Interesting. The only two forms of flow control I'm familar with are XON/XOFF and CTS (clear to send).
CTS is done by toggling a wire in the serial cable on and off; it's hardware flow control, so it won't display bits on the send/receive wires of the serial cable, so we would never see it in the data capture.
XON/XOFF (ctrl-Q, ctrl-S), or ASCII characters 21 and 23, and is controlled by software (and would show up in a bytestream). I couldn't identify any XON/XOFF data in the postings.
Do you think they use a flow control of their own design, then?
I find it hard to believe they would use software flow control with something at 38400 BPS, but I suppose it's possible.
My guess is they would dump it all out with a checksum value, and if the computer software detects a bad checksum, it requests it to be resent again, until it gets it right.
Hopefully Lifescan will reveal to us the real specs.
condensr
10-05-2006, 11:19 AM
Yes, they are using a checksum on some replies as well. On my Ultra2 results from RS232, (similar to ultra results I assume) the last part of a data transmission is a checksum.
The command signalling in the US comm is (this is from memory of last night..) :
0x10 (Data Link Escape) 0x02 (Start of Text) 0x00 (Null) Hex Data Here 0x03 (End of Text) 0x10 (Data Link Escape)
The annoying thing is that there appears to be some form of checksum to send WITH any HR commands (that retrieve records), at the tail end. I need to figure out that pattern then we can request any record we wish from memory. Shouldnt take too long to figure this out.
Clint
10-05-2006, 11:25 AM
a quick fix is to import the exported CSV file that the software exports. then it becomes easy to strip out things you dont want to have in there.
condensr
10-05-2006, 11:29 AM
Well thats handy, but we want to communicate directly with the meter rather than using the OT software. Makes it as easy as possible for folks to upload their readings to the site.
BriOnH
10-05-2006, 02:15 PM
Yes, they are using a checksum on some replies as well. On my Ultra2 results from RS232, (similar to ultra results I assume) the last part of a data transmission is a checksum.
The command signalling in the US comm is (this is from memory of last night..) :
0x10 (Data Link Escape) 0x02 (Start of Text) 0x00 (Null) Hex Data Here 0x03 (End of Text) 0x10 (Data Link Escape)
The annoying thing is that there appears to be some form of checksum to send WITH any HR commands (that retrieve records), at the tail end. I need to figure out that pattern then we can request any record we wish from memory. Shouldnt take too long to figure this out.
Shane - You are the man. I bow down to your comm knowledge. :adore:
Looks like I should have the Ultra done this week.
condensr
10-05-2006, 03:18 PM
Cool! I was going to do that one too, just make a base class for LifeScan meter then concrete implementations for each model that handle the comm and return data formatting. I'll probably hand you the data in XML, and also will probably convert all datetimes to GMT, or if you prefer, ticks. That would mean you'd need to convert back to local time for the user, though.
Clint
10-05-2006, 03:26 PM
any chance I could get the source to this for my own personal use? I have an app that I built that I use personally that this would speed my input up alot.
BriOnH
10-05-2006, 03:58 PM
Cool! I was going to do that one too, just make a base class for LifeScan meter then concrete implementations for each model that handle the comm and return data formatting. I'll probably hand you the data in XML, and also will probably convert all datetimes to GMT, or if you prefer, ticks. That would mean you'd need to convert back to local time for the user, though.
Shane, if you could compile a lifescan class to support all their meters that would be truely awesome. I am not much of a windows app developer, as you can probably tell if you looked at the app I made to ul the flash data. I work on multiple OS's and prefer things web based when possible. Maybe we can work something out when you finish the class to take over the native app development. How is the time coming to you? Can the time be kept to the time that the meter recorded it?
condensr
10-06-2006, 11:42 AM
Brian, indeed I'll make a class to download all the meters I can figure out. :)
We can make an app too, maybe an activex control or a one-click .net app.
Last night, I spent some hours stepping through disassembly to discern how the checksums for the ultrasmart meters are computed.
Pretty sure I got that nailed down now (can calculate checksums for both transmission and receiving), so after I determine how to break apart the ultrasmart data records (I'll be looking at this tonight), I'll be ready to make the classes themselves.
Sure we can keep the time as is. :)
BriOnH
10-06-2006, 02:25 PM
Brian, indeed I'll make a class to download all the meters I can figure out. :)
We can make an app too, maybe an activex control or a one-click .net app.
Last night, I spent some hours stepping through disassembly to discern how the checksums for the ultrasmart meters are computed.
Pretty sure I got that nailed down now (can calculate checksums for both transmission and receiving), so after I determine how to break apart the ultrasmart data records (I'll be looking at this tonight), I'll be ready to make the classes themselves.
Sure we can keep the time as is. :)
Right on Shane!! I was thinking an active X too. I tried building a Java applet as my first course of action but couldn't find a class or control to access the com port of a computer that way. I have a page as a oneclick .net app but am having problems publishing the app. I can't believe how fast you are on the US! Even if we don't make the 15th it's all good. The way I was headed the ultra would be the only one up by the 15th unfortunatly.
Cyborg
10-09-2006, 03:58 PM
ActiveX is one of my specialties if you need some help...
condensr
10-09-2006, 04:15 PM
Cool, might take you up on that Cyborg..
Brian, do you have an SSL cert for diabuddies that you can sign controls with?
BriOnH
10-09-2006, 05:20 PM
Cool, might take you up on that Cyborg..
Brian, do you have an SSL cert for diabuddies that you can sign controls with?
I don't have one, yet, but know I need too. I think I am going to put the whole site behind an SSL too since it's medical information. Anyone know where the best prices are for certs?
Sorry I have been lagging on updates. My two other jobs and some play have been taking up my time.
condensr
10-09-2006, 06:39 PM
Same here with the time thing. Haven't had too much time to spare; the wife and job have to take priority.. I think I'll have some time tonight though.
JasonJayhawk
10-09-2006, 08:30 PM
I don't have one, yet, but know I need too. I think I am going to put the whole site behind an SSL too since it's medical information. Anyone know where the best prices are for certs?
Sorry I have been lagging on updates. My two other jobs and some play have been taking up my time.
My opinion, since this isn't a commercial venture (yet?), is to make your own free certificate for now -- that's what I did with the Liveabetes site.
Get a copy of openssl (it's open source) and create one. There are a lot of FAQs out there on how to do it. The basic outline step would be to create your own "signing authority" (normally, this would be a company like Versign). Our web browsers already have relationships with the bigwig ($$$) signing authorities. By creating your own, essentially, when a person goes into SSL mode, if they don't manually add your authority to their browser, they will receive a message stating that it's not a known signing authority. (You've probably seen these before -- they look like the same messages for people who have expired certificates). To remove the error for life, they can add it to their browser, or just click "Okay" and be done with it.
After you create a signing authority, you essentially can be like Versign. You're now ready to create your own encryption certificate. This certificate will be signed by your "authority" (e.g., Versign). You keep the private key to yourself, and use the public key on the webserver.
There are probably a bunch of FAQs on how to do it for IIS. If you were using Apache, I could send you a little book on how to do it (it's a short chapter). It's something you could do in less than 30 minutes at no cost to you.
Make sure the hosting provider allows SSL connections (port 443) with your own certificate, too. Certificates are free so long as you don't want them signed by some company that claims to have importance (e.g., a monopoly).
BriOnH
10-09-2006, 08:30 PM
Same here with the time thing. Haven't had too much time to spare; the wife and job have to take priority.. I think I'll have some time tonight though.
No rush Shane; I know how it goes. Contributing any time is a thanks I hope to pay back.
Jeffie, big thanks on the bug list. Have 2 down that came while working on the detailed entry.
Cyborg do you know if you can access a com port from an active x?
Cyborg
10-09-2006, 08:32 PM
Cyborg do you know if you can access a com port from an active x?
No problemo...
BriOnH
10-09-2006, 08:37 PM
My opinion, since this isn't a commercial venture (yet?), is to make your own free certificate for now -- that's what I did with the Liveabetes site.
Get a copy of openssl (it's open source) and create one. There are a lot of FAQs out there on how to do it. The basic outline step would be to create your own "signing authority" (normally, this would be a company like Versign). Our web browsers already have relationships with the bigwig ($$$) signing authorities. By creating your own, essentially, when a person goes into SSL mode, if they don't manually add your authority to their browser, they will receive a message stating that it's not a known signing authority. (You've probably seen these before -- they look like the same messages for people who have expired certificates). To remove the error for life, they can add it to their browser, or just click "Okay" and be done with it.
After you create a signing authority, you essentially can be like Versign. You're now ready to create your own encryption certificate. This certificate will be signed by your "authority" (e.g., Versign). You keep the private key to yourself, and use the public key on the webserver.
There are probably a bunch of FAQs on how to do it for IIS. If you were using Apache, I could send you a little book on how to do it (it's a short chapter). It's something you could do in less than 30 minutes at no cost to you.
Make sure the hosting provider allows SSL connections (port 443) with your own certificate, too. Certificates are free so long as you don't want them signed by some company that claims to have importance (e.g., a monopoly).
Thank you Jason!! This is not a commercial site, so this would be a big cost savings.. I know the end goal is a commercial cure, how we get there has yet to remain to be seen. I am pretty sure the money will come from a big BG / Diabetic company eventually(for the site), and look forward to hopefully sitting with all of you and determining what comes next. I am a bit of a dreamer at times but it runs in my blood :).
JasonJayhawk
10-09-2006, 08:38 PM
I was thinking an active X too. I tried building a Java applet as my first course of action but couldn't find a class or control to access the com port of a computer that way.
If you ever changed your mind, it's available as an extension library that can be downloaded from here: http://java.sun.com/products/javacomm/
They aren't including it with the standard SDK although I saw some brief notes mentioning it in the new 1.6.0 release, I think (or maybe I was dreaming). The reason is because the hardware implementations are so much different from each platform, that they didn't want to make it a required part of the standard SDK. However, they have working versions for all the popular platforms.
JasonJayhawk
10-09-2006, 08:44 PM
I am a bit of a dreamer at times but it runs in my blood :).
I know what you mean! Take the childrenwithdiabetes.com site -- it started small in 1995, but after seeing the "ad rates" on his site, I have to wonder what the staff pays themselves to run it. (For example, they get USD $10K/month for just one banner ad, for starters.) :bebored:
(I read that the founders nearly lost their home when they started commercializing their site in 2001 -- that was a tough time before the medical industry realized the benefit of advertising on-line, especially to parents of diabetic kids).
BriOnH
10-09-2006, 08:47 PM
No problemo...
:D
Jeffie used the term "Team Diabuddies" and it's kind of stuck. I'll put a post up for review for anyone that wants to join it. Team Diabuddies would consist of the people that work on it and/or have contributed to it's success. Obviously Tony's graciousness was a huge factor as it has brought all of us together.
condensr
10-13-2006, 12:18 PM
Just to update, I have not forgotten about this :)
In fact, I've got a lot done toward the Ultra and Ultra2 download client. I should have something workable by the end of the weekend that will also be extendable to the Ultrasmart as I finish figuring out the comm format.
JasonJayhawk
10-13-2006, 01:12 PM
Hey, Brion,
I noticed that going to "diabuddies.com" and "www.diabuddies.com" has a different result. Is there any way you could redirect diabuddies.com to the "www." location?
FrankDr
10-13-2006, 03:00 PM
My opinion, since this isn't a commercial venture (yet?), is to make your own free certificate for now -- that's what I did with the Liveabetes site.
Windows 2000 / 2003 server has a certificate server included. It's an optional component you can add and configure in a few minutes time. And if you're hosting on an IIS in the same domain as the certificate server, you can do the Web certificate request and install it with a simple wizard.
-Frank
BTW - Brian - I sent you an email through this forum. I don't know if it goes to an email address you check often.
BriOnH
10-13-2006, 05:18 PM
I am humbled by all the smart, nice, good people on here.
Jay - I will correct DNS and IIS so diabuddies.com will work too. Do you do Java Applets? I need one done eventually as Macs need to connect to this too.
Shane - Right on. Look forward to implementing this with you. If we can work with Cyborg for an active x control that would be great too. If we can keep the user on the web site i think it will be less confusing for them.
Frank - Thanks for sending that via email, I sent you one back, :) and thank you for the info on the cert.
Jeffie - I will try to nail more off the bug list. Stu and Jason have posted a bunch of ideas too that should probably go in there. Some are enhancements. I also need to build you a web front end for that great DB you put together. Thank you again for managing this.
There is so much work to do! I have been >swamped< at work (real work ;) )with major projects already past due. None the less, I will be working on a list of stuff that needs to get done - I'll obviously have the majority of the items but anyone that can help with them would really really make things progress faster. To phrase Jeffie -
GO TEAM DIABUDDIES
:D
Cyborg
10-13-2006, 06:09 PM
I do Java, ActiveX, C++ and a serveral others. If you need my help, just let me know...
Cyborg
10-22-2006, 10:17 PM
Any progress on the UltraSmart? Can I upload data yet?
BriOnH
10-22-2006, 10:46 PM
Any progress on the UltraSmart? Can I upload data yet?
Shane wrote a program for the Ultra and Ultra 2. They will be up soon, I just need to do a little bit of coding. No later then this week for sure. Shane is working on the Ultrasmart, I'll let him fill you in. Frank is also working on connecting up his Cozmo pump data with the web service I am building, so people will hopefully be able to use his method for ul'ing there Cozmo data. He is waiting for me to finish, and so is Shane for the Ultra/Ultra2.
I will explain more about the webservice when I am done. With help from Frank and Shane we are making it so anyone can connect and upload data from their diabetic hardware. Lots of cool stuff on the way!!
Stuboy
10-23-2006, 09:45 AM
roll on ultrasmart! I'll be uploading my data every day!! Looking forward to the updates Mr B :D
Dewey
10-24-2006, 11:37 PM
GO TEAM DIABUDDIES
:D
I really like this name. It means alot to me, especially since our friend Lenny, was a former racecar driver for the NHRA and the name of his team was "Team Seroka." He was truly one of the kindest folks I think I've ever met, and I get teary-eyed just thinking about him. Just wanted to share that I love the name choice, as it's close to heart!
I too, look forward to uploading the UltraSmart's data to share my diagrid with others. :)
condensr
10-27-2006, 10:54 PM
Apologies this is taking so long .. work has been very very busy! I have not forgotten about this and am still working on it.
:)
JasonJayhawk
11-01-2006, 11:48 AM
I originally wrote Lifescan on 9/21/06, and just received a response today (11/1/2006).
I was basically told to 'kiss off.' It looks like they want people using their own on-line web-based system, "OneTouch Diabetes Management Software".
Hope they realize they didn't earn any friends in the geek world. I wonder how high we'd have to go to get the data published again.
I do know they offered the PDF of the Ultra meter. I wonder if they are selling the rights to the protocol to other device companies.
Freestyle is the only meter that remains an open standard now.
Here's the message:
Dear Jason:
Thank you for taking the time to write to us. We apologize for the late reply. Please be aware that during this time we have been experiencing a high volume of e-mail messages and we appreciate your patience.
Please know that all meter communication specifications are now unavailable to the general public. The communication protocols are proprietary and LifeScan reserves the rights to distribute them.
For general information on the OneTouch Diabetes Management Software, please visit the following section of the LifeScan Web site:
LifeScan Products -- About Software (http://www.lifescan.com/products/otdms/index.html)
If you have any technical questions, please call the Data Management Team directly at 1 800 382-7226, Mon.-Fri., 5:00am-6:00pm PST. They would be happy to answer any questions you have about the software.
Please know that, in addition to our software, our OneTouch Gold Program provides 24-hour access to a collection of additional diabetes management tools, information, and special offers. This program demonstrates LifeScan's commitment to creating a world without limits for people with diabetes.
For more information on the OneTouch Gold Program, including how to join, please visit the following Web page:
OneTouch Gold - Diabetes Support & Management Program (http://www.OneTouchGoldEnrollment.com)
LifeScan is committed to providing customers with quality products and caring service. Our Customer Care Representatives are available 24 hours a day, 7 days a week at 1 800 227-8862. You may also send e-mail to CustomerService@LifeScan.com or visit us on our Web site at www.LifeScan.com.
Sincerely,
Dennis Jamison
Customer Correspondence Web Specialist
LifeScan, Inc.
1000 Gibraltar Drive
Milpitas, CA 95035
http://www.LifeScan.com
CustomerService@LifeScan.com
408 263-9789 Main Phone
408 946-6070 Main Fax
1 800 227-8862 24 hour U.S. Customer Services Line
1 800 663-5521 Canada Customer Care Line
1 800 524-SCAN U.S. Health Care Professional Line
1 800 382-SCAN U.S. Data Management Team, Mon.-Fri., 5:00am-6:00pm PST.
1 800 381-SCAN U.S. SERVICO Spanish-speaking Line
001 800 381-SCAN SERVICO Line from Mexico
[THREAD ID:1-CU7QEC]
-----Original Message-----
From: jasonjayhawk
Sent: 9/21/2006 02:04:27 AM
To: customerservice@lifescan.com
Subject: LFS ~ Meter Question/Problem
Webmaster, your audience returned this report:
Subject: LFS ~ Meter Question/Problem
What this user thinks about the LifeScan Web site:
Hi,A long time ago, the RS-232 Communication Specification was available on the website. Several software engineers working on a school project to obtain the data from a OneTouch Ultra and OneTouch UltraSmart meter, and can no longer find the communications specifications.Could you tell me how I could get a copy of them? There used to be a document called ultra_commspec.pdf for the Ultra, and I'm unsure of the one for the UltraSmart.Thanks,Jason
Stuboy
11-01-2006, 11:56 AM
does this mean we wont be able to use the ultrasmart on diabuddies? :(
JasonJayhawk
11-01-2006, 12:00 PM
It means we'll have to hope the reverse engineering efforts turn out well.
And then we'll have to hope that when things get good, that Lifescan doesn't ask for royalties for reverse engineering. They want to be the primary holders of our data, probably for some project of their own that they aren't telling us about. :frown:
condensr
11-01-2006, 08:49 PM
Well, who needs their help anyway! The entire line of Ultra meters, including the Ultrasmart, might be open platform soon, if we decide that the library needs to be made open source. Once its out there, its out. :)
I've made some very good headway at downloading data from the ultrasmart. In fact, I think I'm quite close to having it nailed.
I've figured out how to:
Request records
Read records
Parse datestamp from record
Discern BG reading from record
Verify record checksum
Only thing I really NEED to get for now (to get BG readings) is to find out where the record type is in the data packet. Should have that, maybe more, by the end of the week. They do some really evil stuff, like packing and byte stuffing with the data from the UltraSmart, probably in the name of saving space and transfer speed...
:)
JasonJayhawk
11-01-2006, 09:07 PM
I'm so glad you're having success in figuring it out.
I wonder if they license that information out to companies that use the Ultrasmart with their pumps, and fear that somebody would make money off of collecting data from anything other than their poor excuse for software data collection.
What are they afraid of anyhow! Does somebody feel good about keeping it a secret?
I find it interesting that they do byte packing for compression. They must have had somebody with too much time on their hand. I would be willing to bet that the time difference from that kind of poor-excuse for compression was hardly worth their effort to code it.
They are obfusicating it to make people lick their boots for access to it... plain and simple.
And the length of time it took for them to respond was just ludicrous.
BriOnH
11-02-2006, 10:48 AM
Jay - thanks for contacting them, at least you got a response!!
Shane - you rock!! I will have the WSDL available for you VERY Soon I promise.
I have been doing a lot of work on diabuddies lately, mainly surrounding detailed entries and a little bit of work on the diagrid. Still so much to be done but everyday we get closer!! The next release will be a BIG one. With lots of bug fixes and added features.
gettingby
11-02-2006, 03:50 PM
I have been doing a lot of work on diabuddies lately, mainly surrounding detailed entries and a little bit of work on the diagrid. Still so much to be done but everyday we get closer!! The next release will be a BIG one. With lots of bug fixes and added features.
We anxiously await your next release.
I have never said it before but...............Brian, you rock !!!!!!!!!!!!
JasonJayhawk
11-21-2006, 11:44 AM
I wrote Lifescan back, asking how a company would license the protocol. They claim they never shared the protocol for any of their meters on their website. (If that were true, why did I find the Ultrasmart protocol PDF file cached in Google, despite the link not working to onetouch.com?)
Thank you for taking the time to reply. Again, I apologize for the late reply.
I referred your concern to the appropriate LifeScan management. Their response is that the OneTouch UltraSmart communication specifications have never been available from LifeScan. From our current understanding, the Dexcom device is only calibrated to the OneTouch Ultra Meter.
However, in order for a vendor to obtain the OneTouch UltraSmart communication specifications, first a contract needs to be put in place between the vendor and LifeScan. Thus, if you are interested in obtaining these specifications, someone from LifeScan would need to facilitate the process of establishing such a contract.
We have forwarded your message to the United States Marketing Manager for the OneTouch UltraSmart Meter. However, if you would like to proceed with a formal arrangement, you can respond to this message and provide the specific information requested below:
Full Name of Company (organization):
Company Address:
City:
State:
Zip:
Company Telephone Number:
If we can be of further assistance, please let us know via e-mail, CustomerService@LifeScan.com or by calling our 24 hour, toll-free Customer Services Line at 1 800 227-8862.
Sincerely,
Dennis Jamison
Customer Correspondence Web Specialist
So it makes me wonder -- would they be willing to share this upon a written contract?
BriOnH
11-21-2006, 08:08 PM
I wrote Lifescan back, asking how a company would license the protocol. They claim they never shared the protocol for any of their meters on their website. (If that were true, why did I find the Ultrasmart protocol PDF file cached in Google, despite the link not working to onetouch.com?)
Thank you for taking the time to reply. Again, I apologize for the late reply.
I referred your concern to the appropriate LifeScan management. Their response is that the OneTouch UltraSmart communication specifications have never been available from LifeScan. From our current understanding, the Dexcom device is only calibrated to the OneTouch Ultra Meter.
However, in order for a vendor to obtain the OneTouch UltraSmart communication specifications, first a contract needs to be put in place between the vendor and LifeScan. Thus, if you are interested in obtaining these specifications, someone from LifeScan would need to facilitate the process of establishing such a contract.
We have forwarded your message to the United States Marketing Manager for the OneTouch UltraSmart Meter. However, if you would like to proceed with a formal arrangement, you can respond to this message and provide the specific information requested below:
Full Name of Company (organization):
Company Address:
City:
State:
Zip:
Company Telephone Number:
If we can be of further assistance, please let us know via e-mail, CustomerService@LifeScan.com or by calling our 24 hour, toll-free Customer Services Line at 1 800 227-8862.
Sincerely,
Dennis Jamison
Customer Correspondence Web Specialist
So it makes me wonder -- would they be willing to share this upon a written contract?
You rock Jay!! I think they would. At what cost though? I can't believe you got someone to respond! Would you like to facilitate this?
I have the pdf at work for the ultra II.
Hey Cin I just saw that comment. You Rock!! :)
gettingby
11-22-2006, 06:26 PM
Thanks for saying that Brian. You have made my day. :)
lgvincent
11-27-2006, 07:38 PM
I can't afford the cable so guess I'll never be able to transfer the data in my meter to a computer.
Stuboy
11-28-2006, 03:26 AM
you could call them up and say you lost it... didn't someone on here do that? and they sent him a new one for free? Who's to know!? lol
bernfarr
12-01-2006, 08:31 PM
After reading this thread I did some searching and came across the Ultra2 protocol. I'm assuming (probably silly of me) that it's a variant of the UltraSmart protocol. Let me know if you want a copy of the PDF.
I also found somewhere else on the forums the basic instructions for creating my one RS232 wire, but I'm still searching for directions to create a wire with a USB connection at the PC end. Please let me know if you should find one.
Recently I've contacted several meter manufacturers to try and get information about their protocol. They are amazingly uniform in saying NO. That's SO FRUSTRATING.
I've posted on this general area (http://www.bernardfarrell.com/blog/2006/09/microformats-and-blood-glucose.html) and I'd appreciate any comments or opinions.
Maybe I should start a campaign to contact your meter company and demand that they provide easier access to this information for all their users (not just the noisy ones).
bernfarr
12-01-2006, 08:55 PM
I used the magic of the Wayback Machine (http://www.archive.org/web/web.php).
Here's where (http://web.archive.org/web/20030421092644/www.lifescan.com/pdf/ultra_commspec.pdf) you can find the PDF as it was in 2003. I didn't bother looking for a more recent version.
If you have the old URL for a different PDF, you might also find that via the Wayback Machine.
Isn't the internet wonderful!
BriOnH
12-02-2006, 01:28 PM
After reading this thread I did some searching and came across the Ultra2 protocol. I'm assuming (probably silly of me) that it's a variant of the UltraSmart protocol. Let me know if you want a copy of the PDF.
I also found somewhere else on the forums the basic instructions for creating my one RS232 wire, but I'm still searching for directions to create a wire with a USB connection at the PC end. Please let me know if you should find one.
Recently I've contacted several meter manufacturers to try and get information about their protocol. They are amazingly uniform in saying NO. That's SO FRUSTRATING.
I've posted on this general area (http://www.bernardfarrell.com/blog/2006/09/microformats-and-blood-glucose.html) and I'd appreciate any comments or opinions.
Maybe I should start a campaign to contact your meter company and demand that they provide easier access to this information for all their users (not just the noisy ones).
Every meter I have connected with by OneTouch uses the "DM" attention commands (for the old timers DM is the equivilant of AT when issuing commands to a modem), except for the US. I think Shane is still working on the reverse engineering of the the US output. Everyone is busy this time of year. I just sent him his project back with some modifications so it is connected to diabuddies. It's a sweet little app he wrote. I couldn't have done it that well. His program currently supports the Ultra and Ultra II.
Cool blog. I have stepped up with the standard and here it is:
<DRecord>
<BGL>180</BGL>
<EventDate>2007-05-30T09:30:00</EventDate>
<SimpleCarbs>0</SimpleCarbs>
<ComplexCarbs>0</ComplexCarbs>
<Carbs>50</Carbs>
<InsulinType>Novolog</InsulinType>
<InsulinAmount>5</InsulinAmount>
<Protien>0</Protien>
<Sodium>0</Sodium>
<Fat>0</Fat>
<ExerciseLength>0</ExerciseLength>
<ExerciseIntensity>0</ExerciseIntensity>
<Notes>Quiznos Sandwhich</Notes>
</DRecord>
Diabuddies.com (http://www.diabuddies.com/DiabetesManagementSystem/UploadPumpMeter.aspx) -- Schema Types explained there.
If anyone wants access to the Web Class I wrote (uses SOAP) to transmit data to diabuddies let me know.
bernfarr
12-02-2006, 05:46 PM
Every meter I have connected with by OneTouch uses the "DM" attention commands (for the old timers DM is the equivilant of AT when issuing commands to a modem), except for the US.
...
Cool blog. I have stepped up with the standard and here it is:
<DRecord>
<BGL>180</BGL>
<EventDate>2007-05-30T09:30:00</EventDate>
<SimpleCarbs>0</SimpleCarbs>
<ComplexCarbs>0</ComplexCarbs>
<Carbs>50</Carbs>
<InsulinType>Novolog</InsulinType>
<InsulinAmount>5</InsulinAmount>
<Protien>0</Protien>
<Sodium>0</Sodium>
<Fat>0</Fat>
<ExerciseLength>0</ExerciseLength>
<ExerciseIntensity>0</ExerciseIntensity>
<Notes>Quiznos Sandwhich</Notes>
</DRecord>
...
Brian
Thanks for proposing this.
Let me just point out that the format would have to have a way to specify the units used for blood glucose levels. The date/time format could be taken directly from the microformat standard for date/time.
I also think that there ought to be a section that covers general health issues, this could for now simply be the values settable in the UltraSmart. Of course, there might also need to be a section for LDL, A1c, etc., readings. It depends on just how far you want to go.
I wonder about using English text strings for certain things. If a parameter has a value that can be (for example) one of five discrete settings, should those settings be specified in English or in an agreed upon syntactic value for each one. I don't have a strong opinion about that one.
By the way, using the Wayback Machine I was able to download PDFs for the comm protocol for almost all the OneTouch meters, except the UltraSmart. That's annoying.
Cheers
Bernard
BriOnH
12-03-2006, 01:45 PM
Let me just point out that the format would have to have a way to specify the units used for blood glucose levels.
Why? if there is a decimal point it's mg/mmol if there isn't its mg/dl.
bernfarr
12-04-2006, 03:34 AM
Why? if there is a decimal point it's mg/mmol if there isn't its mg/dl.
I can think of two reasons why it makes sense to do this.
1. Because normally XML-type formats should be fairly human-readable and spelling out the units used would likely reduce ambiguity.
2. Because if someone had a reading of 4.0 mg/mmol, some piece of software in a chain might accidentally change this to 4.
Adding a unit specification carries very little overhead and just spells things out. With my system designer hat on it feels right, despite the small amount of extra space used.
jjames
12-06-2006, 08:06 AM
Ok, take it easy on me, this is my second post on the forums - and this topic is one of the main reasons why I joined this forum. I've been looking for any type of protocol for my UltraSmart, so maybe the protocol fo the Ultra2 might be handy. I like to use things that are already developed, so creating a new procedure to talk to my meter would not be very fun. I'm a C# programmer (a newbie though), and have started using the installed DLLs that came with the LifeScan's management software. They are usable I should note - I just haven't been able to actually put them to use.
Anyway, if I can be of any help with a project that may entail communicating with a LifeScan meter - I'd be willing to help. As posted in my introduction post, I'm a custom control system programmer (AMX), so I program for a living (and deal alot with hex) and program as a hobby.
Hope to be of some help someway!!
-J
P.S.
If someone could e-mail me any protocol that they might have on this stuff - that would be great! Thanks!
FrankDr
12-06-2006, 10:55 AM
Why? if there is a decimal point it's mg/mmol if there isn't its mg/dl.
ohhh, not so good. I'd add a field to specify which units are being used. Too much chance for something to get messed up.
If you're really interested, you could convert the readings to mg/dl for storage and convert to mmol via a user selectable preference when you output it to a graph or display it to the user.
Just some ideas
p.s. still haven't tried the WS upload. I really want to but too many other distractions.
BriOnH
12-06-2006, 11:16 AM
If someone could e-mail me any protocol that they might have on this stuff - that would be great! Thanks!
Hi James, There are some links in this thread that will point you to those protocols. GREAT idea on using the LS dll's! I can't believe I didn't think of that!!!! None the less, Shane is well on his way to completing the US client. It is the only other client besides LS's I know of that can communicat with the US.
I can think of two reasons why it makes sense to do this.
1. Because normally XML-type formats should be fairly human-readable and spelling out the units used would likely reduce ambiguity.
2. Because if someone had a reading of 4.0 mg/mmol, some piece of software in a chain might accidentally change this to 4.
Adding a unit specification carries very little overhead and just spells things out. With my system designer hat on it feels right, despite the small amount of extra space used.
ohhh, not so good. I'd add a field to specify which units are being used. Too much chance for something to get messed up.
If you're really interested, you could convert the readings to mg/dl for storage and convert to mmol via a user selectable preference when you output it to a graph or display it to the user.
Just some ideas
p.s. still haven't tried the WS upload. I really want to but too many other distractions.
Totally. I need to change it.
No worries on the WS upload Frank. Were all doing this as time permits.
bernfarr
12-06-2006, 09:23 PM
... I've been looking for any type of protocol for my UltraSmart, so maybe the protocol for the Ultra2 might be handy. ...
James
I tried to attach a PDF of the Ultra2 protocol. But the system only supports attachments up to 100 Kb.
So I've loaded two of the PDFs on my web site.
The Ultra PDF is at http://www.bernardfarrell.com/protocol/ultra.pdf.
And the Ultra2 PDF is at http://www.bernardfarrell.com/protocol/ultra2.pdf.
The second one is huge because it's rotated. I've no idea why they did this.
Your idea about using the existing DLLs is brilliant. Can you get a listing of the DLL calls and publish them here?
BriOnH
12-06-2006, 09:48 PM
The lifescan software doesn't capture anything but bgl and time from the US if i remember right. Shane thinks he can get all the functions the US uses.
Using lifescans DLL's might be illegal<?>. Ill go through the DLL's tomorrow and see what kind of methods they have. WO documentation it might be hard to figure out what the DLL classes/methods can do or what needs to be passed in.
Stuboy
12-08-2006, 02:05 PM
im still waitin on the US software :D let me know when it's ready!
condensr
12-24-2006, 01:34 AM
The lifescan software doesn't capture anything but bgl and time from the US if i remember right. Shane thinks he can get all the functions the US uses.
Using lifescans DLL's might be illegal<?>. Ill go through the DLL's tomorrow and see what kind of methods they have. WO documentation it might be hard to figure out what the DLL classes/methods can do or what needs to be passed in.
Actually, the lifescan software gets all of it. Animas' EZ Manager gets BG or excercise.
The first rev of the client that I have yet to release (darned job, keeping me busy! Spare time goes first to the wife. :) ) will support BG and timestamp, but future releases will support insulin, exercise, and health notes in addition.
One of the first things I looked at was using someone else's dlls or code for communication, but none of them export any entrypoints that we could call, plus there is the legal aspect- we couldn't ship such code with our client, thus would depend on it already being installed. Even then, there might be other legal issues even loading it/calling it.
susoooo
01-16-2007, 05:36 AM
Hi!
I'm new here...
I've been a linux user for years, and I've trying to do by myself on this OS and the Ultrasmart. Right now i'm at a point where i'm stacked.
I mean: I'm trying to develop a program that communicates with the UltraSmart on linux and I've done part of the Reverse Engineering on the protocol, but now i'm stacked.
Particularly with the meaning of the response of the HT petition by the US.
Shane... could you help me here? Do you know some place on the net where i could see this point of the protocol explained.
(I belive the blood glucose value goes on the eight byte of the response but no idea of how and where the data and time of the measurement is coded).
Any help would be very much appreciated.
Thanks.
condensr
01-17-2007, 03:37 PM
I've managed to break a lot of the protocol down, but its not as simple as only bytes. They use bit stuffing too, and the meanings of some of the bytes/bits change in relation to the value of other parts of the packet. Also, the CRC they use isn't a basic CRC, and all HR requests have to be signed with the proper CRC, or the meter will ignore them.
There is nowhere on the web that details the protocol, and Lifescan has stated in emails (see above, think its in this thread) it is proprietary information that they are not willing to share.
As for me, currently, I'm not at the point where I can share anything, as one, I don't want to 'publish' any information that very well may not be accurate, and two, I'm not sure if we're going to make the client libraries open source or not. There could be legal stuff being as it is a proprietary protocol, but I don't know for sure yet. You might try checking back in a couple months though.
In the meanwhile, check out the other areas of the forum! Do you have diabetes, if so, which type?
susoooo
01-18-2007, 02:05 AM
Hi again everybody out there...
Thanks for the reply. It's always is a pleasure to hear someone that knows more than you do about a topic, so you could learn. And I've learned a lot about diabetics and devices like the US on this forum.
I'm not diabetic, at least by the moment, and never have been in contact with this disease... until now. (luckily in my whole family there's no antecedents on diabetes also).
Here's the story why i came into this (if this could interest someone :) :
The app i'm trying to develop it's not for me, it's for a friend of mine that it's a linux freak and don't want to go to windows to archive his blood glucose levels.
He knows i like to do things with devices like this (i mean, low level programming: C, assembler, microcontrollers and so) and asked me for a little app to do this automatically. As i owe him a couple of favors i couldn't say no. (like "cosa nostra" you know ;-)
Of course he could write down the measure values by hand, but this is not an option for a freak like him ;)
The app will not be very sofisticated: Just retrieve the value of the blood glucose levels, the date and the time of the measure. Nothing else. ( I mean: no pre- post- info, no exercice info, no diet info... That kind of stuff will be introduced by hand on the electronic diary my friend uses).
I think about this app as a home-made prank :-P.
I've already finded the way date and time is transmited in the US protocol, and the blood glucose levels (at least on the US my friend passed me). I belive this would be enough for me.
Thanks again for the info on this thread, and to shane for replying to my previous post.
BTW: I get a little scared about what is said about the legal staff, so before releasing any of the program source (except to my friend), i'll wait on the evolution of this thread on the forum to see what is commented at that point.
PD: I'm not a native english speaker so please... excuse myself for my spanglish.
condensr
01-18-2007, 01:18 PM
Oh heck, your English is great!
I wish you the best of luck with your project, sounds like you are moving right along. I know it really is a nasty little protocol they have developed for it. I think their main reasoning was that the meters could hold so many memory records, they needed to make them as small as possible, and also increase the baud rate so all the contents could be transferred to a PC in a reasonable time. Thats just guessing though.
Welcome to the forums! You might point your friend here too, there's lots of great information and people here. I know it sure changed things for me when I found this forum.
glucolog
03-02-2007, 10:14 AM
Hi. Any updates in the quest for UltraSmart upload capability?
AirJordan
03-04-2007, 06:05 AM
Hi. Any updates in the quest for UltraSmart upload capability?
Hi,
Im a Typ 1 diabetic and Iam writing an diabetic management software. On searching for UltraSmart Data reading Im finding this site. Very nice forum! :) Is there any update in the question for data reading from the ultrasmart???
Sorry for my bad school english. :o
condensr
04-14-2007, 02:36 AM
One Touch Ultrasmart support in diabuddies is coming.. soon. ;)
BriOnH
04-17-2007, 09:43 AM
One Touch Ultrasmart support in diabuddies is coming.. soon. ;)
May 14th = one heck of a release :) . You the man Shane!
-B
JediSkipdogg
04-17-2007, 09:55 AM
May 14th = one heck of a release :) . You the man Shane!
-B
The Ultrasmart holds what, 5000 readings? So it will take me how long to upload that? LOL
Dewey
04-17-2007, 10:10 AM
The Ultrasmart holds what, 5000 readings? So it will take me how long to upload that? LOL
LOL...It'll probably still take a while, but I think the UltraSmart holds 3,000 readings.
condensr
04-17-2007, 12:40 PM
I've had mine since 2003 (oldest record in it), and stopped using it last fall (when I got my Ultra2) and it has about 2400 readings in it.
The download from the meter takes less than a minute, and the upload to diabuddies shouldn't take too much longer, even on dialup. The meter is downloaded at 38400 baud..
gettingby
04-18-2007, 06:44 PM
May 14th = one heck of a release :) . You the man Shane!
-B
I agree !!!!!!!!!!!!
:adore: :adore: :adore: ------------> Shane !!!!!!!!!!!
Crepuscular
04-20-2007, 08:01 PM
Take a look at the hex for your readings. I decoded packets from my ultra smart about a year ago but can't remember the actual format. I could take a look one of these days if you like. I was planning on writing a program for dumping the info but got side tracked.
Crepuscular
04-24-2007, 11:47 PM
Sorry about my last post to this thread. I am new to this site and didn't realize that there was more than the first page of replies to the original post. Anyway it looks like condensr has it figured out now.
I only managed to decode the Record#, timestamp, BG and the flags for control tests and the before and after meals. I never got into the few remaining bytes.
condensr
04-25-2007, 01:48 PM
Say..
If you could figure out how to extract the number of records to download from where it is returned (either record 0, or the reply from the HS command I think) that would be invaluable..
Also, for future updates, if you could also help in decoding values for meds entries, you'd be my new hero. :) What I need is - what byte/bits reflects the med types (e.g. long acting, short acting, pill, etc), what the enumeration values are for the med types, and what byte/bits reflects the med amounts.
I just have not had a lot of time to put in known values to the meter and analyze the packets.
Crepuscular
04-25-2007, 02:59 PM
From what I have seen in the sniff trace, the HR requests keep incrementing their record count until an empty record is returned. I don't have a full meter so I don't know what would happen if there wasn't an empty record at the end.
Is the last byte of the packet a CRC? It doesn't seem to be a checksum. ( unless I am doing something dumb in my calculation of it). Have you been able to generate requests with the right code? Currently I just use the codes I see in the sniff packets when I want to pull records. The trouble is that the OneTouch software complains that there are 5 bad records but I have no way of telling what ones are bad.
As for the meds thing I could look at it if you like. I have a virgin meter here that I can use so I won't have to wade through so much data.
condensr
04-25-2007, 08:22 PM
Indeed, the last HR record is indicated by a 7 byte length. Somehow, though, the software is determining in advance how many records there are. I'd like to know it to show accurate download progress.
The evil last byte is a CRC7. Yes, I have code that is downloading all the records from the meter unassisted, and for all BG records, parsing the timestamp and BG value.
Crepuscular
04-25-2007, 09:51 PM
From what I can see the software does not have any idea of how many records the device has until after it downloads them. (OneTouch Software Ver2.2). When sniffing the serial port I see the status bar sit at the beginning 2 bars until after all of the HR records are read. It makes a substantial jump after that. It doesn't seem to track the actual download process.
BTW what bits indicate the record type? It turns out the two bytes I thought were reserved for GL are multi-use depending on the record type.
Crepuscular
04-25-2007, 10:04 PM
Looks like it might be the high order bit of the last byte for GL. Is that what you are using?
Crepuscular
04-26-2007, 12:50 PM
What polynomial are you using for the CRC-7? I tried (x**7 + x**3 + 1) same as that used for MMC cards but it does not result in the correct CRC.
Crepuscular
04-26-2007, 08:59 PM
I have decoded the Pill info and the Insulin info. Is there some place I can post it? I have also decoded most of the health info and all of the exercise info. Do you want that also?
JasonJayhawk
04-26-2007, 09:02 PM
Wow, good job!! Out of curiosity, what was your method for figuring it out?
Do you have any algorithms that you could post here, so that we may all marval in your coding?
Crepuscular
04-26-2007, 10:07 PM
I have an office doc that I would like to post. It just describes the data format. The trouble is that I added tables tomake it easier to understand but tables don't translate well if I were to post it to this forum. If there Is a repository where I could put it It would be great.
Crepuscular
04-26-2007, 11:59 PM
I found some errors in my doc so I better go through it with a fine tooth comb before I post it.
In the mean time here are a couple of the record types I have decoded.
I will post the rest when I verify them.
BTW if condensr could post his code for encoding the CRC7 it would be much appreciated as I can't seem to get mine to work. Has anyone found out what the last byte of data is for? It almost looks as if they have a second crc on the payload????
Have fun!!!
Medication Record type 0x28
Uses first byte of data after the time stamp.
Bits 0 3 Quantity in half pill increments.
Bits 4 7 Pill type.
1 = Pill A
2 = Pill B
3 = Pill C
4 = Pill D
5 = Pill E
Note: the record does not contain the name of the meds if the user has changed them. This info has to be extracted out of another type of record.
************************************************
Insulin Record type 0x2c
Uses the first 3 bytes of data after the time stamp.
Bits 0 2 Insulin reading mod 8
Bits 3-4 unused ??
Bits 5-7 Insulin type
Byte 2 Insulin reading low byte div 8
Byte 3 Insulin reading high byte div 8
Insulin type:
1 = Rapid
3 = Lente
5 = Ultralen
Example: A reading of 0x21 0x38 0x01
0x21 = 00100001
First three bits = 001. add 1 to final result.
Last five bits = 00001 = Rapid
Bytes 1 and 2 = 0x38 0x01 reversed = 0x0138
0x138 = 312 decimal
312 * 8 = 2496
Add 1 from the mod bits = 2497
Insulin reading = 2497 / 10 = 249.7
Keytones type 0x78
Uses first byte of data after the time stamp.
Bits 0-4 unused ???
Bits 5-7 Keytone reading
Keytone values
0 = Negative
1 = Trace
2 = Small
3 = Moderate
4 = Large
HbA1c Record type = 0x7C
Uses first byte of data after the time stamp.
Reading is in tenths of a percent so divide by 10
Exercise Record type 0xB4
Uses the first two bytes following the time stamp
Bits 0-5 time value mod 64
bits 6-7 Type
Byte 2 time value div 64
Type:
1 = mild
2 = Moderate
3 = Hard
Value represents number of 5 minute intervals
To calculate time in minutes:
Multiply second byte by 64 and add first 6 bits of Byte 1 then multiple by 5
condensr
04-27-2007, 01:48 AM
Check your PM.
Hi,
for some time now I'm used to evaluating the BG levels of our 6 yr old daughter, that stem from an OTU/OTU2, with a custom application, as the representation of the data in DMS Pro is very poor. Then I got an OTUS hoping to facilitate my recordings of the meals taken, the corresponding insulin dosages and the phases of physical strain. It was very disappointing to realize, that LifeScan changed policy and no longer provides customers with sufficient information about their products. My notes aren't copyrighted material that have to be protected from being read by unauthorized, illegitimate pieces of software. So what the **** is going on in the heads of those guys? Making a lot of money with the test strips doesn't seem to be enough. Any ideas what their long-term strategic goals are?
JasonJayhawk
05-17-2007, 04:24 AM
Lifescan (J&J) implies they do not want any company or person from making money by creating a product better than their own software or better than the companies that have licensed the protocol from them.
Thus, by forcing a license in order to download the data, they can control who makes any potential money.
Off topic, but related -- CVS Pharmacy, for example, has in their privacy/usage policy that anyone who prints photos through their company must adhere to their rules of allowing CVS to use the said photos, license-free, in any medium that they desire. People don't protest such policies, so it allows them to get away with what they want -- until people protest loudly enough.
Sure, an innovative product would allow them to dictate the rules. But I wonder, what kind of innovation they believe to offer here for licensing. AFAICS an exotic CRC method, nothing else. The coding of the user data is standard at best. Compared to the profits they make with their test strips the selling of software might never run up to a reasonable amount. DBMS Pro is anything but a killer application, at least in a technical sense ;). So wouldn't it be better for them to attract software developers in order to push the hardware into the market flanked by a diversified portfolio of applications?
AirJordan
06-05-2007, 02:31 AM
In a few days I have the description of the communication protocoll for the OTUS.
someone
06-08-2007, 12:25 PM
Now someone needs to decode the protocol for the Guardian RT. I tried sniffing the port, but I would have no idea how to decode that! :confused:
If anyone is interested, I can send them the serial port communications and the data table from the carelink site.
BriOnH
06-08-2007, 01:05 PM
Now someone needs to decode the protocol for the Guardian RT. I tried sniffing the port, but I would have no idea how to decode that! :confused:
If anyone is interested, I can send them the serial port communications and the data table from the carelink site.
Then send the decoded information in XML format using SOAP to Diabuddies :D .
someone
06-08-2007, 03:10 PM
By the way, has anyone here tried to use Jad to decompile parts of the CareLink uploader? After all.. it supports most meters.
JasonJayhawk
06-08-2007, 04:17 PM
By the way, has anyone here tried to use Jad to decompile parts of the CareLink uploader? After all.. it supports most meters.
I think someone was working on that in another thread in this same forum. If you Google it, you'll find some other people are working on it, too. I suspect that they actually encrypt their data to prevent third-party companies from making use of it. (The XML data had at least one RSA key in it.)
someone
06-08-2007, 04:26 PM
I think someone was working on that in another thread in this same forum. If you Google it, you'll find some other people are working on it, too. I suspect that they actually encrypt their data to prevent third-party companies from making use of it. (The XML data had at least one RSA key in it.)
I was able to decompile the ultrasmart classes, but I didn't go any further than that.
condensr
06-09-2007, 01:15 AM
They send the raw data from the meter to their web service. The web service handles all data parsing etc. server side.
JasonJayhawk
06-09-2007, 10:35 AM
That makes complete sense, then! They must have decided it was easier to encrypt on the device for easy web transmission.
someone
06-09-2007, 11:58 AM
They send the raw data from the meter to their web service. The web service handles all data parsing etc. server side.
Awe too bad. That didn't occur to me.
meffertf
10-03-2007, 10:17 AM
Hi,
I've read this thread with great interest. I have 2 diabetics in my household, both use UltraSmarts. I write software for a living, and it's very frustrating to me that there is no common transfer protocol or data format for all meters, but this is the world we live in.
Well, all I'm trying to accomplish is to automate the bi-weekly data sends from both our UltraSmarts to the doctor's fax machine. Being an engineer, it seems that I should be able (from a 15000 foot level) to automate using a Serial to Bluetooth adapter to transmit data from the meter to a collection point (a authorized desktop/laptop/smartphone near the meter), store the data, parse out the information I need, use that to generate a graph on a fax, then connect to the fax machine and send it. Or email, whichever is preferred. Or send it using Diabuddies. Etc. Etc. Basically do an automated graph send every x days/weeks. A little .NET app imo.
None of this should be that hard, I've done each (except the US data collection part and I've just started reading about Diabuddies) in one form or another in the past.
Anyway, I've been trying to connect to my son's UltraSmart for a couple days now via HyperTerminal using 38.4k, StopBits 1, Parity None, DataBits 8. Sending a DM? just to get the sw version, etc. doesn't work.
I Wrote a fast .NET class to try it using the System.IO.Ports.SerialPort namespace, but no go there also. I know that class works 'cause I can connect to a normal OneTouch Ultra2 and OneTouch Ultra using it (at lower baud rates, prefixing it with \x11 and \x0d, etc.). Could it have something to do with the USB/Serial cable I'm using? Shouldn't, that's how I connect to the other OneTouch meters.
I'm about to hook up a sniffer to start disassembling the data, but I figured I'd give this group a try and see if I can get the work (code) that's already been done for the UltraSmart instead of reinventing the wheel. Maybe I could help move things forward even?
Replies would be appreciated.
Sorry about the rambling lol,
Thanks
Frank
(not a diabetic, but a parent of 2)
JasonJayhawk
10-03-2007, 11:43 AM
Hopefully, Bryon might know how to help you with that. The Ultrasmart is difficult. I've contacted the company with no success, other than a "licensing agreement." I think someone might have figured out how to talk to it -- I've been busy with twins -- but hopefully someone can help you!
DeanM
10-07-2007, 09:26 PM
Know what you mean about the protocols not being standardised - it's a pain in the arse. I'm writing my own application too, and whilst I can't help you with yours since mine only talks to the Roche Accu-chek Integra for the moment (for that's the meter I bought), I think the best thing is to put on a serial monitor and pull it apart. At least that way you can see what's going on.
lar3ry
11-08-2007, 12:20 AM
Hi,
I Wrote a fast .NET class to try it using the System.IO.Ports.SerialPort namespace, but no go there also. I know that class works 'cause I can connect to a normal OneTouch Ultra2 and OneTouch Ultra using it (at lower baud rates, prefixing it with \x11 and \x0d, etc.). Could it have something to do with the USB/Serial cable I'm using? Shouldn't, that's how I connect to the other OneTouch meters.
I'm about to hook up a sniffer to start disassembling the data, but I figured I'd give this group a try and see if I can get the work (code) that's already been done for the UltraSmart instead of reinventing the wheel. Maybe I could help move things forward even?
Replies would be appreciated.
Sorry about the rambling lol,
Thanks
Frank
(not a diabetic, but a parent of 2)
Frank,
I just downloaded the pdf file for the Ultra2 from the LifeScan site. I have been trying (using TeraTerm) to communicate with the meter, but have't yet managed to even wake it up. I followed their documentation, making a file using a hex editor, with the contents being (in Hex) 11 0d 0a 44 4D 40, and sending it at 9600 baud, 8N1.
I see that the protocol file is dated 2006, and am wondering if something has changed.
Any idea you could give me would be much appreciated.
lar3ry
11-08-2007, 10:18 PM
Frank,
I just downloaded the pdf file for the Ultra2 from the LifeScan site. I have been trying (using TeraTerm) to communicate with the meter, but have't yet managed to even wake it up. I followed their documentation, making a file using a hex editor, with the contents being (in Hex) 11 0d 0a 44 4D 40, and sending it at 9600 baud, 8N1.
I see that the protocol file is dated 2006, and am wondering if something has changed.
I ended up hanging the logic analyzer on it, and figured it out. They lied about the contents of a packet. They also don't tell about all the message types (like "clear meter"). I am using SniffUSB to figure them out.
drummerAL
11-26-2007, 07:30 PM
I just bought a onetouch ultrasmart, but I have a mac. I am considering buying the cable and software from Lifescan as I have access to a PC, but I'd rather not. I was thinking of writing an app for the mac, but I don't have the protocol and didn't get any info from Lifescan when I called them.
Anyone have the ultrasmart protocol?
Thanks
dsimms
11-27-2007, 01:21 PM
I ended up hanging the logic analyzer on it, and figured it out. They lied about the contents of a packet. They also don't tell about all the message types (like "clear meter"). I am using SniffUSB to figure them out.
By the way, using USB sniffer to accompany the protocol document is a good strategy. It's frustrating, but the Ultra2 protocol description is not very clear about the meter acknowledgment. (One might go so far as to call it a lie, but I can't figure out why J&J would do it purposefully.) If you follow the recipe using HyperTerm, it works but only because HyperTerm quietly does some CRLF -> CR conversion. No one has mentioned here yet, but the Ultra 2 meter acknowledgment is hex 11, 0d on the wire.
I might mention that when looking at the OneTouch Ultra, I found that misc.health.diabetes FAQ:
diabetes FAQ: bg monitoring (part 2 of 5) (http://faqs.org/faqs/diabetes/faq/part2/)
to be helpful since it points out a non-lifescan description of earlier versions of the protocol:
ftp://vic.cc.purdue.edu/pub/
. Despite that Vic said that he faithfully copied the protocol description from a Lifescan memo, I think his is still much clearer.
Last, I'll ask: Does anyone have a published reference for the UltraSmart? It seems to look an awful lot like the Ultra 2 protocol so I don't know why it wouldn't be publishable.
gnickm
12-13-2007, 12:51 PM
It's frustrating, but the Ultra2 protocol description is not very clear about the meter acknowledgment. (One might go so far as to call it a lie, but I can't figure out why J&J would do it purposefully.) If you follow the recipe using HyperTerm, it works but only because HyperTerm quietly does some CRLF -> CR conversion. No one has mentioned here yet, but the Ultra 2 meter acknowledgment is hex 11, 0d on the wire.
Wow, big ups dsimms, I have been pounding my head on my desk for the past two days trying to connect to my Ultra 2. Changed the ack from 11 0a 0d to 11 0d, and it worked like a champ!
Ugh, who wrote this spec? I'd like to introduce them to my middle finger.
Anyway, thanks again! Now to see if the bluetooth cradle will work...
jjames
12-13-2007, 12:58 PM
I still can't believe that the US2 is still not "hacked" . . . kinda funny watching this thread!
someone
12-13-2007, 04:27 PM
I still can't believe that the US2 is still not "hacked" . . . kinda funny watching this thread!
I think someone here has successfully reverse engineered the protocol for the Ultra 2 but I guess they aren't going to give out the info. Too bad since I would love to see more open source diabetes software. If you want the protocol for the original Ultra, have a look at Glucomodul (http://glucomodul.sourceforge.net/).
Jay Levitt
12-31-2007, 09:49 AM
(I don't have diabetes, but my dad does, I probably will someday, and my cat does too - even though he's adopted!)
I'm not a lawyer, but I am good with intellectual property and contract law, and I can easily find expert representation in that field.
I don't want to give much away here, but I can see a good half dozen ways around the LifeScan "agreement" for their protocol. (That said, if you're planning to reverse engineer it yourself, and you can do so without ever agreeing to that agreement, and especially without looking at the PDF or text versions of the "official" protocols, don't look!)
I don't have time to do the reverse engineering or write code. But if anyone's interested in setting up a legal clearinghouse for the Lifescan protocols as reverse-engineered, let's chat privately. I have some ideas.
JasonJayhawk
12-31-2007, 10:06 AM
I love the d-community. Instant friends with just about everyone!
I think the UltraSmart protocol would be a lovely open-source tool.
I hope someone manages to break the encryption in the OmniPod, too...
Jay Levitt
01-01-2008, 09:45 AM
PS - For those who haven't made any agreements, and haven't yet read the protocols, read up on Clean Room design (http://en.wikipedia.org/wiki/Clean_room_design) before you do anything.
Again, I think there are probably ways around the existing agreement, but hey, belt and suspenders never hurt.
bpietsch
02-05-2008, 01:36 AM
The evil last byte is a CRC7. Yes, I have code that is downloading all the records from the meter unassisted, and for all BG records, parsing the timestamp and BG value.
Condensr, would you mind sharing your CRC calculation? The CRC is one of the few pieces of this puzzle I have not been able to crack. Thanks much!
mauorrizze
03-25-2008, 08:04 AM
Condensr, would you mind sharing your CRC calculation? The CRC is one of the few pieces of this puzzle I have not been able to crack. Thanks much!
I know it's been a long time since you wrote the post, Condensr, but you'd make me really happy, too, if you posted the CRC7 data or algorithm you use, or someone else who succeeded. I wrote a program to check several polynoms, but I must do something wrong. Thanks,
mauorrizze
sonnynet
04-25-2008, 04:04 AM
hallo
Could somebody of you decoder or "hack" the encryption of the data block of the OneTouch Ultra Smart meter?
The request of settings, date, time, insulin type and medical type is very simple, its clear plain text. (DMI01, DMO01, ...)
The main data block contains meter values, insulin, meal, ... Does somebody decode this part? (HT, HS, HR) It seems to be simple encrypted block by block.
Sorry for my english, its not so good. :)
Thank you for reply
I know it's been a long time since you wrote the post, Condensr, but you'd make me really happy, too, if you posted the CRC7 data or algorithm you use, or someone else who succeeded. I wrote a program to check several polynoms, but I must do something wrong. Thanks,
mauorrizze
What condensr wrote doesn't necessarily mean he uncovered the CRC variables. He may just as well have recorded all BG requests done by the DMS and simply replay them. I also looped through lots of parameters without any result and finally gave it up. :confused: That's why we returned to the OTU2.
Regards
mauorrizze
04-27-2008, 10:21 AM
What condensr wrote doesn't necessarily mean he uncovered the CRC variables. He may just as well have recorded all BG requests done by the DMS and simply replay them. I also looped through lots of parameters without any result and finally gave it up. :confused: That's why we returned to the OTU2.
Regards
Finally that's nearly what I did, too. Accidently I deleted all my data recently :D , so I couldn't record the 3000 or what crc codes. But I wrote a program that tries all codes and where it gets an answer, it stores the cheksum value in a file as an array. Took a while (5-6h), but it does almost work. I only still got some trouble with specific values, although I obtained a larger recorded file.
But knowing the used cheksum algorithm would be much more elegant, and as it was stated somewhere in this thread that it IS a crc7, i hoped it is also known which exact algorithm. Could also be that someone knows ist, but can't tell it because he got that info from Lifescan!?
mauorrizze
04-27-2008, 01:29 PM
Annotation:
(Sorry for double posting, but is here really no edit-button or am I just blind?^^)
The "still got some trouble with specific values" is a bit more trouble than I thought. When waiting for data from the glucometer I used a timeout of about 0.1-0.2 seconds. This is (on my hardware) enough for waiting to see if it answers, as long as there is data saved on the meter. When there is no data, the reply takes about 0.75 seconds. So I found out only a litte more than 100 correct crcs, all the other values are worthless. But I inserted fresh batteries and started the 'tryallcrcs'-programm on my server, let's see when it will be finished ^^.
But assuming it will finish one day ;) then I have a legal question:
may i publish these crc codes together with my source code under any licence (e.g. GPL)? I didn't obtain any information from Lifescan, thus didn't subscribe any contract. I just sniffed a bit data and found the checksums by trying out all the posibilities (well... I'm on it). If there is no concern about legal issues, i'd love to write and publish a program, cause I just can't find software, that I can use with my glucometer AND pump that satisfies me. But writing it just for me is boring...
Thanks (and by the way sorry for my "germish english" :D )
CompotatoJ
04-28-2008, 03:25 PM
Annotation:
(Sorry for double posting, but is here really no edit-button or am I just blind?^^)
The "still got some trouble with specific values" is a bit more trouble than I thought. When waiting for data from the glucometer I used a timeout of about 0.1-0.2 seconds. This is (on my hardware) enough for waiting to see if it answers, as long as there is data saved on the meter. When there is no data, the reply takes about 0.75 seconds. So I found out only a litte more than 100 correct crcs, all the other values are worthless. But I inserted fresh batteries and started the 'tryallcrcs'-programm on my server, let's see when it will be finished ^^.
But assuming it will finish one day ;) then I have a legal question:
may i publish these crc codes together with my source code under any licence (e.g. GPL)? I didn't obtain any information from Lifescan, thus didn't subscribe any contract. I just sniffed a bit data and found the checksums by trying out all the posibilities (well... I'm on it). If there is no concern about legal issues, i'd love to write and publish a program, cause I just can't find software, that I can use with my glucometer AND pump that satisfies me. But writing it just for me is boring...
Thanks (and by the way sorry for my "germish english" :D )
Yes, if you did not use any of the Lifescan specifications or copyrighted code, you are allowed to publish it. This is called clean room reverse-engineering, as Jay Levitt mentioned above.
By the way, I am writing a Linux Diabetes Management program in Mono/GTK#. I'm not finished, but when I have something that is at least semi-useful I will publish it.
JasonJayhawk
04-28-2008, 04:16 PM
Yes, if you did not use any of the Lifescan specifications or copyrighted code, you are allowed to publish it. This is called clean room reverse-engineering, as Jay Levitt mentioned above.
By the way, I am writing a Linux Diabetes Management program in Mono/GTK#. I'm not finished, but when I have something that is at least semi-useful I will publish it.
Thanks, Compotato (I like your name). Are you planning to use SourceForge? I'd love to check it out... as you know, side-projects are always a hard thing to keep on the front burner. :)
mauorrizze
04-28-2008, 04:53 PM
Yes, if you did not use any of the Lifescan specifications or copyrighted code, you are allowed to publish it. This is called clean room reverse-engineering, as Jay Levitt mentioned above.
Good to know, thanks.
My checksum-testings could have reached 3/4 by now, but as I accidentally unplugged the cable twice and my server's usb system freezed once again, I have only about 1,500 dates...
CompotatoJ
04-29-2008, 10:10 PM
Thanks, Compotato (I like your name). Are you planning to use SourceForge? I'd love to check it out... as you know, side-projects are always a hard thing to keep on the front burner. :)
Yeah, I will probably use SourceForge, Google Code, or Trac to host my project. I have an UltraSmart and I am trying to figure out how to interact with it and grab data. I found the driver for the USB cable is already in the Linux kernel, so all I have to do is figure out the protocol. I think some of you guys have been doing that too.
CompotatoJ
04-29-2008, 10:14 PM
If anyone can think of a good name for my Diabetes management software, I'd love to know.
Here are the features I'm planning on implementing:
- Meal inputting and nutrition fact fetching (for carb counting and stuff)
- Interaction with OneTouch glucose monitors
- Pretty graphs that you can scroll through and data to chart your insulin and glucose levels
- Maybe OmniPod interaction since I am planning on getting one... :)
JasonJayhawk
04-30-2008, 07:19 AM
Good luck with the Omnipod -- I wouldn't put that on the top of the list because it might take a long time. Insulet uses RSA(?) encryption on the communication, and unless you work for the NSA, you probably won't break it -- unless you can some how get ahold of the private key and break it. I don't know why they're so cautious of people using the data -- I guess they don't want someone developing an application that is better than theirs?
One day, some day, we might have open protocols...
I had a PDF document with one of the earlier OneTouch meters (It might have been the Ultra) that Lifescan had published on their website many years ago....but they took it off. I've seen at least one open source project with the OneTouch Ultra on SourceForge, so you might check into that.
CompotatoJ
04-30-2008, 12:57 PM
Good luck with the Omnipod -- I wouldn't put that on the top of the list because it might take a long time. Insulet uses RSA(?) encryption on the communication, and unless you work for the NSA, you probably won't break it -- unless you can some how get ahold of the private key and break it. I don't know why they're so cautious of people using the data -- I guess they don't want someone developing an application that is better than theirs?
One day, some day, we might have open protocols...
I had a PDF document with one of the earlier OneTouch meters (It might have been the Ultra) that Lifescan had published on their website many years ago....but they took it off. I've seen at least one open source project with the OneTouch Ultra on SourceForge, so you might check into that.
Maybe they don't want people to wirelessly hack into your OmniPod and mess with your insulin doses. :D
condensr
05-02-2008, 01:12 AM
Someone should continue this project- I have not worked on it in ages and certainly don't have the time anymore. This does not include the diabuddies client itself, that's BrionH's, but is a library for downloading data from meters, including the Freestyle Flash and various Onetouch series meters. It can easily be extended for downloading other devices.
I only ask that it not be used commercially, but remain open source for the betterment of the diabetes community. It would be great if platforms that currently don't have any decent libs for meter communication could gain them!
Oh, and this does not depend on any existing software from the meter manufacturers to function. It is entirely standalone, in C#/CLR 2.0.
This is source code and not compiled binaries.
Thanks,
Shane
condensr
05-02-2008, 01:30 AM
Oh, couple things to add:
This is not a finished, bulletproof project by any means.
Any calls to comm methods in the library should be made asynchronously on a separate thread (threadpool would be best.) Also, I used some kernel objects (Auto/ManualResetEvents) that could be changed to user-mode synchronization objects to improve performance by eliminating the kernel mode transitions imposed by these waithandles.
CompotatoJ
05-02-2008, 05:56 PM
Wow condensr, thank you so much! If I decide to use it, can I include it under a GPL (http://www.gnu.org/copyleft/gpl.html) license? Basically it says that you are freely able to distribute the and modify the source, as long as you publish your changes (so that others may benefit from the changes). If you want, I can include you under AUTHORS.
CompotatoJ
05-02-2008, 05:58 PM
That is awesome because the program I was writing is in C#, however I was planning on writing the backend in C. I guess this works too.
condensr
05-02-2008, 08:53 PM
No problem, you can distribute it under GPL and put it up on sourceforge.
JasonJayhawk
05-04-2008, 05:52 AM
Attached is an RTF document that Lifescan provided in the old days on talking with the classic OneTouch Ultra. Not sure if it would help anyone. I had retrieved it out of a Google cache because Lifescan removed it from their website.
Someone should continue this project- I have not worked on it in ages and certainly don't have the time anymore. This does not include the diabuddies client itself, that's BrionH's, but is a library for downloading data from meters, including the Freestyle Flash and various Onetouch series meters. It can easily be extended for downloading other devices.
I only ask that it not be used commercially, but remain open source for the betterment of the diabetes community. It would be great if platforms that currently don't have any decent libs for meter communication could gain them!
Oh, and this does not depend on any existing software from the meter manufacturers to function. It is entirely standalone, in C#/CLR 2.0.
This is source code and not compiled binaries.
Thanks,
Shane
:D Shane, you made my day / week / month / year !!! :D
Your algorithm works like a charm. I just compared the results with the meter data I recorded a year ago. I'm deeply grateful.
You're giving up on the Diabuddies project? You're not serious, are you? Independent diabetics need independent software. Why on earth are all open software projects dealing with diabetes doomed to failure? We need instruments that transfer our ideas on an efficient diabetes control into handy tools. That's a goal not always congruent with the industry's intentions.
Kind regards and many many thanks
Mica
JasonJayhawk
05-04-2008, 11:12 AM
I'd also like to thank Shane for sharing his code. It would be nice to see archived at a place like SourceForge, so that maybe someone else could keep it going.
My Liveabetes site (which only runs when my computer happens to be on) is also trailing downward. It involves creating data for data mining processing in temporal (time-based) analysis. I'd hate to make it disappear, but because it is a website-based system, I'm not sure if the source code would have any value to anyone. It's in PHP, and was only meant to be a prototype, but a lot of code/sweat went into making it.
I'd prefer Java / JSF / SQL-DB for several reasons, have some code form another project lying around here.
Mica
condensr
05-04-2008, 11:06 PM
Your algorithm works like a charm. I just compared the results with the meter data I recorded a year ago. I'm deeply grateful.