Coder Social home page Coder Social logo

contour-next's Introduction

This is an implementation to read the messurements from Bayer Contour Next USB Device.

At the moment it only read the whole data from the device and print it to standard output. The data is fomated as ASTM 1394-91 packets. Each line contain one packet. Fortunately ASTM 1394-91 is composed only with printable characters, BUT this is not checked by the program. Therefore be carefully using the program.

For this implementation I had no complete protocol specification. The most knowledge I got by reverse engineering the protocol. To be more exact I implementet three protocols. The first one I call "simple protocol" (.src/simple_protocol/). I'm not sure whether this protocoll follows some kind of standard or if it is a properitary protocol. It is a very simple protocol. The second one looks like ASTM 1381-95. For this protocol I had or complet specification, since one have to pay to get the specification (http://www.astm.org/Standards/E1394.htm). But i got some information from other sources (http://www.inovadx.com/portal/Technical%20Support/QUANTA%20Link/QL_ASTM_protocol.pdf). The third one looks like ASTM 1394-91 (http://www.astm.org/DATABASE.CART/HISTORICAL/E1381-95.htm). I got some information from the same soruces as for ASTM 1381-95.

compiling:

./configure make

to access the device one needs either root privileges or you can add a new udev rule. For example you can create a new group:

groupadd --system glucometer

create a new udev rule in "/etc/udev/rules.d/30-glucometer.rules" containing following line:

ACTION=="add", KERNEL=="hiddev*", ATTRS{idVendor}=="1a79", ATTRS{idProduct}=="7410", GROUP="glucometer", MODE="0660"

as long as the user is member of the gorup glucometer you can run the tool with:

./src/contour-next-usb/contour-next

TODOs:

  • The datatransmission from the computer to the device is a quick hack (see: main() in ./src/contour-next-usb/contour.c)
  • Implement protocol to change device settings
  • ASTM 1394-91 implementation is not complete, only basics
  • Dangerous assumption in ./src/astm/astm-1381-95.c in _asmt1381_95_textframe()

contour-next's People

Contributors

der-b avatar

Stargazers

 avatar

Watchers

 avatar  avatar

contour-next's Issues

contour-next does not work

Hi,

if i call,

src/contour-next-usb/contour_next

i get no output,

server01 contour-next # src/contour-next-usb/contour_next

server01 contour-next #

but i get this issue in the kernel log:

[Sa Jun 9 16:26:46 2018] hid-generic 0003:1A79:7410.000B: usb_submit_urb(out) failed: -28

Any suggestions how to fix this?

Readout freezes randomly (how to debug?)

I own a next-one meter, and have modified contour.h to use its id (7800).

The readout stops at random places, and if I ^C the process and restart it, the reading resumes - leaving a gap of a single record. This may happen multiple times until the capacity of 800 records is reached, and again, after the L|1||N record, the program doesn't finish.

I've checked the forks, and @cabreu's seems to incorporate all known models, but
otherwise didn't mae any changes to the parser.

I presume that some sync bit gets lost at a random frequency, and resyncing isn't possible (yet). That the code continues at the point where it stopped is giving me hope that this could be fixed rather easily - although there seems to be no way to get debugging information from the program now.

Any suggestions?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.