As OpenLeo is home to automative-related projects, it is in the interest of all that some rules and guidelines be understood:
- OpenLeo's members are and as a collective is not responsible for what one do with the projects and specifications
- OpenLeo's specifications, software and hardware are provided as is and without any warranty
¶ Intro and philosophy
- Please understand that OpenLeo is a collective of hobbyists, even with the best intentions to make reliable software that follows best practices, we can't guarantee that the specifications projects are without issues
- Automotive projects are real fun, but automotive projects can ultimately kill people by deadlocking a car's software while driving, please be responsible and don't mess with safety critical systems
- If you aren't sure if what you're doing is safe, please don't do it in a real car (also, simulating a whole car on a PC can be fun too!)
- The automotive world is traditionally closed one, where most software and projects, even hobbyists, are kept proprietary. We encourage Open Source and contributions, let's build something better together!
- We keep a neutral position about commercial companies and projects, being neither for or against
- We do not condone any illegal activity, please refer to your local laws to check what you can and can't do to your car
- All OpenLeo specifications, projects and contributions are under the Apache 2.0 Licence
- Projects and contributions that are designed to facilitate odometer cheating or car stealing are forbidden
- Please be civil, rude behavior isn't allowed (that includes both on github and on discord)
- Refer to the best practices to make your projects the closest to "automotive-grave" as possible
-
- MISRA-C is a C ruleset for automotive, JPL's coding guideline extends on them
-
- ISO-26262 is a automotive safety standard for ECUs
- Please do proper safety analysis and tests before connecting anything to your car
- Most projects are made using these languages and tools (but it isn't mandatory to follow them, it would only make contributions easier)
-
- C/C++ and Python (with mostly Kivy)
-
- KiCAD for electronics design
-
- Esp32, STM32 and ARM platforms
- Please be aware that automotive code can mess with safety critical system, please very aware of that when prototyping with the car's electronics
- Also, be aware that things connected permanentely to a car will use the car's battery when the car isn't in use, make your projects as low power consuming as possible when idle, to avoid draining the battery
- Using an ELM327 on the OBD port (it is directly connected to the safety-critical bus, and most ELM327 dongles' quality is bad. this is a safety risk)
- Actually plugging anything other than diagnostics tools to the OBD port, it wasn't designed to have things plugged in it all the time, and is overall a very bad way to "access your car's electronics", by design
- Using arduino IDE/platform (these platforms have bad reliability as well)
- Using boards without any form of power management, especially power-hungry ones (that includes the raspberry pi) as they will drain your battery if left plugged for too long
- Using 3rd party libraries without checking/auditing them first (many aren't automotive-grade, and a lot aren't safe at all)
- Using complex systems without a deep understanding on how they work (the most common mistake being using android)
If you want to have fun with the car, the recommended path is to run the software locally, with emulators/simulators. but that's only half the fun, so the recommended way to connect to the CONF bus, which isn't safety critical (if you crash it, at most you lose your radio, climate control, information screen, cluster, and comfort devices) using the connector found on the back of the radio (as explained by alexandreblin), as it has pins to connect to the CONF bus (initially made for CD changers).
To connect to the CAN bus, the most common device is using an microcontroller with the MCP2515 module, but the CANAble dongles can be found for cheap (around 10-15EUR) and are natively supported on linux (providing a socketcan interface, which makes it much easier to work with it on linux). ESP32s (wroom32 and clones) and STM32s (bluepill and blackpill boards) can be easily found and has embedded CAN interfaces, you still need to add a transceiver (usually TJA1050) between it and the CAN bus (TJA1050 modules can also be found easily and for cheap as well).
If your car has VAN interfaces (eg. most *06 series, along with the first 307s and 807s), please refer to morcibacsi's and 0xCAFEDECAF's excellent repositories
For diagnostics, diagbox with XS evolution clones can be easily found but this is a grey area. If you decide to go that route, chose a "full chip" version as the cheaper, but partial ones are known to cause issues. Most ELM327 dongles, even if bad quality, are fine for basic diagnostics only (and they are really basic, you only have access to a small part of what's possible with diagbox), when plugged temporarily to check the error codes and some data (eg. when not plugged permanentely).
Don't hesitate to step by the OpenLeo discord server if you have any question or want to contribute!