Slashdot Mirror


Breathalyzer Source Code Revealed

Nonillion writes "New Jersey attorney Evan M. Levow was finally able to get an order from the Supreme Court of New Jersey forcing the manufacturer of the popular Draeger AlcoTest 7110 to reveal the source code. Levow turned the code over to experts, Base One Technologies, to analyze. Initially, Base One found that, contrary to Draeger's protestations that the code was proprietary, the code consisted mostly of general algorithms: 'That is, the code is not really unique or proprietary.' In other words, the 'trade secrets' claim which manufacturers were hiding behind was completely without merit." Following up an earlier discussion here, the state of Minnesota has (without explanation) missed a deadline to turn over the code for a different breathalyzer.

12 of 501 comments (clear)

  1. Re:Frosty Pist by quantum+bit · · Score: 5, Funny

    You must first blow into this tube before your Slashdot post is accepted.

    Processing... Processing... Done! (31 errors ignored)

    Sorry, your blood alcohol is over the limit for Slashdot first-posting. Please try again later.

  2. Learn something new every day by Mateo_LeFou · · Score: 5, Funny

    I didn't know SCO made breathalizers.

    --
    My turnips listen for the soft cry of your love
  3. Shocked by UbuntuDupe · · Score: 5, Funny

    You mean, the creator of an intellectual work thinks it's more creative than it really is? That very rarely happens.

  4. Let's whiteboard this people by Anonymous Coward · · Score: 5, Funny

    if ( drunk ) {
    goto JAIL;
    }

    1. Re:Let's whiteboard this people by quantum+bit · · Score: 5, Funny

      if ( drunk ) {
      goto JAIL;
      } else {
      collect(200);
      }

  5. Re:Frosty Pist by bladesjester · · Score: 5, Funny

    Sorry, your blood alcohol is under the limit for Slashdot first-posting. Please try again later.

    There. Fixed it for you =]

    --
    Everything I need to know I learned by killing smart people and eating their brains.
  6. Re:"code" is probably in the hardware by MBCook · · Score: 5, Informative

    You don't seem to have read the "article", but then again this is /.

    Even in such a simple case there are many things it should be testing. Is the A/D output sane? Does it take 3 quick samples while someone is blowing and average them or just take it once (which could be wrong for some reason)?

    According to the article, it doesn't look like it does. It calibrates the wind sensor, but doesn't check that the calibration is sane. It doesn't report errors unless they happen 32 times in a row. It disables the watchdog timer. It disables the interrupt for illegal instructions. It doesn't meet any coding standards. It contains code with things like "this is temporary for now" in it.

    There is an obvious reason why they didn't want the code released.

    --
    Comment forecast: Bits of genius surrounded by a sea of mediocrity.
  7. Re:"code" is probably in the hardware by Nos. · · Score: 5, Informative
    Well, looks like its a bit more than that (FTA):
    • Several sections are marked as "temporary, for now"
    • Converters will substitute arbitrary, favorable readings for the measured device if the measurement is out of range
    • The software takes an airflow measurement at power-up, and presumes this value is the "zero line" or baseline measurement for subsequent calculations. No quality check or reasonableness test is done on this measurement
    • It would fail software standards for the (FAA) and (FDA), as well as commercial standards used in devices for public safety
    What is this thing, alpha?
  8. The reason MN doesn't have the code by crimguy · · Score: 5, Interesting

    The reason why no source code has been released in MN is that the manufacturer of the breathalyzer in that case, CMI, refuses to hand it over to anyone. They are asserting that it is a trade secret, and are resting on the fact that there is little a court in MN can do to force them, a Kentucky corporation, to hand it over.

    I represent three clients in Phoenix, AZ, who have been trying to get the code from CMI for the same reasons, and have been met with nothing but frustration. Fortunately, a couple judges here have agreed with the defense that examination of the code is necessary to mount a defense, under due process grounds. We (myself and a number of other attorneys) have had dismissals in a total of about 11 cases in the City of Phoenix, all of which are being appealed. There are a few cases in superior court that will be appealed shortly as well. It's been a busy time in the world of DUI litigation.

    Unfortunately, many judges here do not see the relevance. Further, they have enacted legislation to prevent the preclusion of breathalyzer results, despite the inability to examine the "schematics or source code" of the machines.

    Believe me when I tell you - these machines are unreliable, and subject to many errors, most glaringly the result of RFI screwing up the results. I've read the findings of the independent lab on the NJ case, and it does raise many concerns. My biggest problem is that law enforcement can essentially hide behind a foreign corporation, and a jury never hears about many of the problems at hand.

  9. The entire 12 problems by poetmatt · · Score: 5, Informative
    Please read here at http://www.sandiegodrunkdrivingattorney.net/2007/0 8/successful-dui-breath-test-machine.html where they have all the information on the flaws. I will post the summary line of each result from Base one (link to their homepage) as follows:

    1. The Alcotest Software Would Not Pass U.S. Industry Standards for Software Development and Testing
    2. Readings are Not Averaged Correctly: When the software takes a series of readings, it first averages the first two readings.
    3. Results Limited to Small, Discrete Values: The A/D converters measuring the IR readings and the fuel cell readings can produce values between 0 and 4095.
    4. Catastrophic Error Detection Is Disabled: An interrupt that detects that the microprocessor is trying to execute an illegal instruction is disabled
    5. Implemented Design Lacks Positive Feedback: The software controls electrical lines, which switch devices on and off, such as an air pump, infrared source, etc. The design does not provide a monitoring sensory line (loop back) for the software to detect that the device state actually changed. This means that the software assumes the change in state is always correct, but it cannot verify the action.
    6. Diagnostics Adjust/Substitute Data Readings: The diagnostic routines for the Analog to Digital (A/D) Converters will substitute arbitrary, favorable readings for the measured device if the measurement is out of range, either too high or too low.
    7. Flow Measurements Adjusted/Substitute d: The software takes an airflow measurement at power-up, and presumes this value is the "zero line" or baseline measurement for subsequent calculations.
    8. Range Limits Are Substituted for Incorrect Average Measurements: In a manner similar to the diagnostics, voltage values are read and averaged into a value.
    9. Code Does Not Detect Data Variations
    10. Error Detection Logic: The software design detects measurement errors, but ignores these errors unless they occur a consecutive total number of times
    11. Timing Problems: The design of the code is to run in timed units of 8.192 milliseconds, by means of an interrupt signal to a handler, which then signals the main program control that it can continue to the next segment.
    12. Defects In Three Out Of Five Lines Of Code: A universal tool in the open-source community, called Lint, was used to analyze the source code written in C. This program uncovers a range of problems from minor to serious problems that can halt or cripple the program operation.

    Sorry if this is redundant, I didn't see it listed anywhere that I could tell up front. If you note that list is pretty serious. They picked a "top 5" type thing for the other link, but this one is pretty accurate. Note these guys were called in as expert witnesses and their information on their website shows they have extensive experience working with government. If these guys find flaws that is definitely pretty serious.

  10. Re:"code" is probably in the hardware by letxa2000 · · Score: 5, Insightful

    Even in such a simple case there are many things it should be testing. Is the A/D output sane? Does it take 3 quick samples while someone is blowing and average them or just take it once (which could be wrong for some reason)?

    I have an even more important question: Does the friggin' device work? I agree that reading through the observations, the code doesn't instill confidence. But the real important question is whether or not it works. There must be some requirement as to how many false positives/negatives are allowed because no matter how good your code, nothing is infallible. So what is the requirement in terms of acceptable false positives and/or false negatives, and does the device meet that requirement?

    Is there is a real and legitimate belief that this device doesn't work? Or is this just some escapade launched by an attorney to free a guilty drunk driver?

  11. Re:"code" is probably in the hardware by russotto · · Score: 5, Informative

    Converters will substitute arbitrary, favorable readings for the measured device if the measurement is out of range

    that's more reasonable than reporting you have enough alcohol in you to kill two bull African elephants and a wildebeest.
    No, it isn't. If it, due to some error, detects enough alcohol in you to kill an elephant, it's obviously malfunctioning and should not report any value. Reporting the absurd value is second-best, because it allows you (or your attorney) to challenge the value. Reporting a reasonable-sounding value is manufacturing of evidence.

    Consider, for instance, if radar guns reported "91mph" any time they detected too high a value (say, above 200mph). You could be driving by at 75mph, some malfunction could cause the gun to detect 600mph, it would report "91mph", and you'd be screwed. If it reported 600mph and you got pulled over based on it, you'd probably win in court because your car can't do 600mph.