Hacker News new | past | comments | ask | show | jobs | submit login
Pyobd - a free and open source program for car diagnostics (github.com/barracuda-fsh)
223 points by madviper on Sept 15, 2023 | hide | past | favorite | 39 comments



I would love to see something like this for my Defender td5. It's not standard OBD but something proprietary. So you need a nanocom and the defender license, which is about 700€ or something in total. I just want to read out the errors, that would be nice. Does anybody know how I'd go about hacking on that?

/edit: I actually found something https://github.com/EA2EGA/Ekaitza_Itzali. Awesome!


Would be awesome if ancillary data like ABS and airbags was standardized for all vehicles under right to repair laws then it would be easy to add


Why should safety critical systems be able to be modified by a non-professional? Earnest question


Being unable to replace a broken headlight yourself because you cannot reset the error memory of your car is bullshit don't you think?

I don't know if you follow the recent trends on car engineering, but things that a person with two left hands could have done themselves 20 years ago are now impossible to do on your own and — not because ot is hard, but because they essentially require digital access for many things.

And if you modify such systems and they are not bricked after you did it that probably means you know more about the system than the "professional" who just uses the tools provided by the manufacturer. If it is bricked, you are no danger to others.


Is it any different to un-bolting something like the ABS pump on your car to replace it with another?

On the one hand, that's an obvious and trivial operation - undo 4 easy to reach nuts securing the pipes to the pump manifold body, undo 2 bolts holding the assembly to the car body. Fit new pump and do up the fasteners. If you have the hand-eye co-ordination to line up a wrench on nuts and bolts and you have the minor strength needed to turn these then you're capable of the operation.

Except... now you've got air in a crucial safety system affecting braking and stability and no amount of bleeding the brake system will help. You need to actuate that pump while toggling each solenoid in a particular order to clear the air.

We wouldn't reasonably stop people being able to do this so why should i not be able to manipulate something i own via a computer instead of via wrench?

There are already sufficient laws in place to handle the scenario where i do something reckless with my freedom.


Wheel attached to the hub is also a safety critical system, isn't it? If not tighten properly it may lead to a fatal accident. Where should the industry put the line of serviceable vs non-serviceable (by non-professional) parts?


Those parts containing explosives (like airbags) are pretty good candidates for "non-serviceable by non-professionals".


because even if I can't or shouldn't fix it, I want to be able to detect what is wrong with it


You can do it with €20k Bosch rig


Why should you be forced to buy a 20k€ Bosch rig? I don't see why there shouldn't be competing products offering the same functionality.


I don't know where the line ends, but it should start with air bags. :)


Because it's your car.

Because liability laws already work just fine.

Because if you create an "accreditation" barrier to modifying hardware you own it'll end up being used for the cartelization of repair services rather than to improve safety.


> Because it's your car.

Until you sell it. Buyer beware, I guess?

I agree with you in fact, but pointing out the likely reason why things like airbags might not be "user serviceable".


> Buyer beware, I guess?

I don't know how common it is (quite a lot I believe), but in my country (France), you need to provide a certificate of inspection guaranteeing that the car vital systems behave correctly when selling it.


For better or for worse, there are no such mandatory inspections nor certificates required when selling your car in the USA. Its a common trope/issue that people can often get misled by sellers when buying a vehicle, either by the seller clearing the engine codes or some other shady practice that would keep the car looking good until it drives off the lot


I see, thanks for the context.


I'd be all on board with a law that mandates a vehicle inspection certificate if you want to sell a car. I think buyers would probably like that too. It would cut down on lemons. It would make the second hand car market more efficient.

Obviously that would require accreditation but the accreditation bar for inspecting a car will be much lower than it would be for fixing it.

Or, you could take a different approach and just make it illegal to fix your own car if you're not part of a government mandated car fixing cartel.


While it is not a law (in my area at least), I would not buy a car without a recent inspection.

I would support a law that requires a special, more in-depth inspection in order to sell a car. My area has a (kind of) similar law...if you are buying an R title vehicle from out of state, then you have to get an "enhanced" inspection, with pictures before you can register it. I like that law and I would support making the enhanced inspection manditory for all car sales...I would put the onus on the seller though, but that's just me.


Could be read-only in OBD, and need special tool for modification. Also, security through obscurity is never good.


These systems (brakes, airbags) have robust and trivial design, to eliminate any tendency to break on their own. As a side effect, replacing a replaceable airbag is something a layperson can do with a little to none room for screwup, unlike for example a repair of a non safety critical engine, where there is a lot of that room.


Many years ago, I wrote a tool that logs OBDII and GPS data - it was one of the first around [pre-dates things like bluetooth ODBII devices and github], I never really focused on usability or anything, but what I made was cool: http://icculus.org/obdgpslogger/

The real enduring piece, though, was an OBDII simulator; I didn't want to keep going out to my car to work on the logger, and none of the other simulators out there were a) software, and b) supported most of the ELM327/OBDII protocol. So I wrote one.

The website isn't pretty, but if anyone actually wants to learn OBDII programming stuff, the simulator is still, AFAICT, one of the best out there: http://icculus.org/obdgpslogger/obdsim.html


Cool program, it looks like an easy way to get started with ODB-II, thank you for sharing!

> Currently it only displays live data - no recording and replay is possible. NOTE: The program only displays the engine data, not airbags, ABS and body control systems. Even if your adapter supports that, you will need a more specialized program for that.

If you have more sophisticated requirements, it seems like Wireshark has the ability to stream and record data in real-time: https://www.csselectronics.com/pages/can-bus-to-usb-wireshar... is an ~$70 adapter which shows up as a serial port

Alternatively, https://canable.io/ with USB port seems to support several open source software packages (there are clones of Canable 2.0 Pro available for ~$17 on AliExpress, but hopefully the official version will come back in stock soon):

- Cangaroo (Windows, Linux): Send/receive standard and FD frames, decode messages from DBC files

- SocketCAN (Linux) Native Linux support using slcand (can record and pass into Wireshark)

- python-can (Windows, Linux, Mac) Easily interface with the CAN bus using your CANable and Python scripts

You can also use SigRok to visualize the CAN frames: https://kentindell.github.io/can2

Disclaimer: I have no affiliation and have not used either of these, just posting them as possible options.


This is the remake of the program pyobd, a free and open source program for autodiagnostics.


A shame it doesn't use udsoncan as a backend. Udsoncan is pretty well done and indirectly support doip which is going to be ubiquitous in those new software defined vehicles..


For an application that is limited to stadardize services doip will only matter for future EVs. Anything with ICE will continue to provide data on CAN.


I feel like a lot of people on HN aren't (or weren't) full time mechanics, so they might not fully embrace what's going on:

We should somehow force (incentivize) car manufacturers to standardize on stuff like this:

https://www.acdelcotds.com/subscriptions (GM / Chevy vehicles) https://app.n.fcawitech.com/wt2/auth/login.html (Chrysler vehicles)

Similar systems exist for your favorite modern (And relevant) car manufacturer.

We need to get car manufacturers to stop producing their own proprietary systems, or at least, implement a standard.

OBD2 is such a small standard which covers emissions, we need the entire car!


Newb question, can I use this to change something in the configuration of the car? I have parking sensors that are absolute garbage (overtriggering all the time), and I would like to permanently turn them off. The turn off button works only for a moment.


I also have backup sensors that are garbage. I ended up wiring a rocker switch in the power line for the beeper/beeper control unit. When I’m backing up to connect a trailer now, I can focus on the backup cam/helper person outside without being subject to the constant beep


If a device has been produced and used, that sits inline on the can bus and changes the odometer reading, I'm pretty sure it is doable for something like reversing sensors too.


No, that would involve coding, and that is vendor specific. You can look for your car manufacturers diagnostic tools, eg mercedes star diag, or vagcom.


Thanks. Does "coding" also go through the same OBD cable?


Same port but the cable you want depends on the brand, for example BMWs use DCAN so you need a cable with a chipset that supports that protocol. They can be had for fairly cheap, I'm sure other brands are similar.


Why is it RE-uploaded? Was it taken down for some (legal?) reasons?

Does it support KWP2000 protocol? (Is that the legacy protocol?)


Not just re-uploaded, but also modernized. The old code was over 15 years old and didn't run any more. It's in the first paragraph of the description.


How does it compare in completeness to Torque (android app)? And (if anybody knows) how does Torque compare in completeness to the commercial OBD scanners that garages have?


Nothing compares to commercial scanners whatsoever. Even the Chinese android ones are nearly $1k+ for good ones. The amount of proprietary vendor extensions within OBD2 they use make so many repairs impossible without it.


Torque is great for creating a mobile real-time display of custom metrics specific to your vehicle!

There is a misconception in the USA that you can just 'wipe' a car's computer -- not so much. When you wipe the (standard complaint) OBD2 system, it causes the system to run all the verification tests (like an extended BIOS Power On Self Test), and these take several cycles to run. Torque can tell you in seconds if the vehicle passed all the POST verifications.

Torque is terrible for diagnosing vehicle and manufacturer specific problems. Anything past standardized O2 emissions things should prefer the commercial grade, manufacturer specific software.

So, in the case of a Chevy Volt (or any GM vehicle), AC Delco TDS (acdelcotds.net) is great: it can give you in-depth reports on every module in the car.


Does anybody have hardware recommendations to connect via this interface?

I would like to do real time monitoring for a bus


The page has some devices that are known to work with this software listed: https://github.com/barracuda-fsh/pyobd#prerequisites




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: