Diabetes Forums » General » Diabuddies » OneTouch UltraSmart Communication via RS232


Welcome to Diabetes Forums!

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.


Reply
OneTouch UltraSmart Communication via RS232 LinkBack Thread Tools Display Modes
  #151 (permalink)  
Old 04-30-2008, 12:57 PM
Junior Member
I am a: Type 1
 
Join Date: Apr 2008
Location: Berkeley, CA
Posts: 6
Quote:
Originally Posted by JasonJayhawk View Post
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.
__________________
  • Diagnosed with Type 1 Diabetes in March 2008 with an A1c of 14%
  • Started using OmniPod with Humalog on 05/26/08
  • 06/2008: A1c of 7.5%
Reply With Quote
  #152 (permalink)  
Old 05-02-2008, 01:12 AM
Member
I am a: Type 1
 
Join Date: Feb 2006
Location: Western WA
Posts: 460
Lightbulb Give this a try.

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
Attached Files
File Type: zip OneTouchDownloadLib.zip (22.1 KB, 49 views)
__________________
-Shane
T1 ~11 yrs
Minimed 522 w/ CGMS
Lifescan Ultra2 / BD Logic
Reply With Quote
  #153 (permalink)  
Old 05-02-2008, 01:30 AM
Member
I am a: Type 1
 
Join Date: Feb 2006
Location: Western WA
Posts: 460
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.
__________________
-Shane
T1 ~11 yrs
Minimed 522 w/ CGMS
Lifescan Ultra2 / BD Logic
Reply With Quote
  #154 (permalink)  
Old 05-02-2008, 05:56 PM
Junior Member
I am a: Type 1
 
Join Date: Apr 2008
Location: Berkeley, CA
Posts: 6
Wow condensr, thank you so much! If I decide to use it, can I include it under a GPL 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.
__________________
  • Diagnosed with Type 1 Diabetes in March 2008 with an A1c of 14%
  • Started using OmniPod with Humalog on 05/26/08
  • 06/2008: A1c of 7.5%
Reply With Quote
  #155 (permalink)  
Old 05-02-2008, 05:58 PM
Junior Member
I am a: Type 1
 
Join Date: Apr 2008
Location: Berkeley, CA
Posts: 6
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.
__________________
  • Diagnosed with Type 1 Diabetes in March 2008 with an A1c of 14%
  • Started using OmniPod with Humalog on 05/26/08
  • 06/2008: A1c of 7.5%
Reply With Quote
  #156 (permalink)  
Old 05-02-2008, 08:53 PM
Member
I am a: Type 1
 
Join Date: Feb 2006
Location: Western WA
Posts: 460
No problem, you can distribute it under GPL and put it up on sourceforge.
__________________
-Shane
T1 ~11 yrs
Minimed 522 w/ CGMS
Lifescan Ultra2 / BD Logic
Reply With Quote
  #157 (permalink)  
Old 05-04-2008, 05:52 AM
JasonJayhawk's Avatar
Senior Member
 
Join Date: Jul 2004
Location: MIdwest, USA
Posts: 1,067
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.
Attached Files
File Type: zip onetouchdoc.zip (15.6 KB, 13 views)
__________________
Reply With Quote
  #158 (permalink)  
Old 05-04-2008, 11:06 AM
Junior Member
I am a: Parent
 
Join Date: Apr 2007
Posts: 7
Talking

Quote:
Originally Posted by condensr View Post
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
Shane, you made my day / week / month / year !!!

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
Reply With Quote
  #159 (permalink)  
Old 05-04-2008, 11:12 AM
JasonJayhawk's Avatar
Senior Member
 
Join Date: Jul 2004
Location: MIdwest, USA
Posts: 1,067
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.
__________________
Reply With Quote
  #160 (permalink)  
Old 05-04-2008, 12:11 PM
Junior Member
I am a: Parent
 
Join Date: Apr 2007
Posts: 7
I'd prefer Java / JSF / SQL-DB for several reasons, have some code form another project lying around here.

Mica
Reply With Quote
  #161 (permalink)  
Old 05-04-2008, 11:06 PM
Member
I am a: Type 1
 
Join Date: Feb 2006
Location: Western WA
Posts: 460
Quote:
Originally Posted by Mica View Post
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.
Glad it works for you.

Re: Diabuddies, the DB/webservice/interface isn't my project: that would be BrionH's brainchild. I don't know if he is giving up on it - I have not heard that he is.. I just wrote the library above for meter downloading, as well as the .Net ClickOnce app that is the actual client that downloads meter data from the serial port then uploads the results to diabuddies.com via the diabuddies webservice. It is possible I may continue work on the client, but it is tough as I only have a few actual devices to test on. For example, some users reported the inability to download their Freestyle Flash meters, but I never had a problem downloading my Flash. Also, discovering non-published protocols takes a LOT of time sniffing serial ports and drudging through assembly code and debuggers..
__________________
-Shane
T1 ~11 yrs
Minimed 522 w/ CGMS
Lifescan Ultra2 / BD Logic
Reply With Quote
  #162 (permalink)  
Old 05-18-2008, 07:43 AM
Junior Member
I am a: Type 1
 
Join Date: May 2008
Posts: 3
Hi,

still looking for a checksum code? For C++, try

int OTUS::CreateChecksum(int line)
{
int m = 0;
int max = 1 << 7;
int mask = max - 1;
int modifier = 13;
int modifierm2 = (modifier << 1) & mask;

line <<= 1;

if (line > 0)
{
while ((line & 1) == 0)
{
m <<= 1;
if (m >= max)
{
m = m & mask ^ modifier;
}
m ^= modifierm2;
line >>= 1;
}
}
return this->CheckSum ^= m;
}

with "line" being the record number to request. No record can be requested directly, you'll have to request all in the correct order.
If you need details on decoding record types, tell me ones still missing.

Anja
Reply With Quote
  #163 (permalink)  
Old 06-21-2008, 03:52 AM
Junior Member
I am a: Parent
 
Join Date: Apr 2007
Posts: 7
Quote:
Originally Posted by condensr View Post
Also, discovering non-published protocols takes a LOT of time sniffing serial ports and drudging through assembly code and debuggers..
Sure it does. Shane, did you already have a look at the UltraEasy, now also equipped with a computer interface, unfortunately with just another protocol including a 2-byte CRC-code.

BTW, I'm nearly fiinished with the interpretation of the OTUS protocol, only a few items like the 'invalid sample' flag are missing due to the lack of representative data. Is it allowed to upload a Windows binary (500k .zip file) to this forum that downloads OTUS data and stores them on disk in XML format? I have to admit, it still is in an early stage of development.

Regards, Mica
Reply With Quote
  #164 (permalink)  
Old 06-21-2008, 04:33 AM
Junior Member
I am a: Type 1
 
Join Date: May 2008
Posts: 3
Quote:
Originally Posted by Mica View Post
Sure it does. Shane, did you already have a look at the UltraEasy, now also equipped with a computer interface, unfortunately with just another protocol including a 2-byte CRC-code.

BTW, I'm nearly fiinished with the interpretation of the OTUS protocol, only a few items [...] are missing
Like said before... if you need some specifications on items... ask. I am using my own program to read the OTUS now for about four years.
Reply With Quote
  #165 (permalink)  
Old 06-21-2008, 03:17 PM
Junior Member
I am a: Parent
 
Join Date: Apr 2007
Posts: 7
Anja,

thanks for your offer. Well, to begin with, is there an equivalent for the OTU2 '?' parity error mark? And where is the number of available records stored?

Kind regards, Mica
Reply With Quote

Reply


Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


» Log in
User Name:

Password:

Not a member yet?
Register Now!

All times are GMT -7. The time now is 05:54 PM.

For Advertising:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32