Comments (3)
Hey,
Cool, I didn't know that. I've never needed to talk to any other addresses.
I'd be open to a PR to change the address to which we are talking. Something like;
void setDestinationAddress(uint8_t address);
uint8_t getDestinationAddress() const;
Then we can use the getDestinationAddress()
call internally whenever we create request. We would default the value to the current address to make sure it still 'works out of the box' in most cases.
from obd9141.
If anyone else is interested in this topic, I have some more information.
In VAG cars with a K-line, address 0x33 will always refer to Universal OBDII diagnostics, commonly ISO9141 and sometimes KWP2000.
All other addresses use a proprietary protocol. Older cars use the in-house "KWP1281" protocol, for which I have written a library. Newer modules use KWP2000, but I cannot comment on whether or not it is the exact same protocol as "universal" KWP2000.
In any case the first difference is that KWP1281 modules send their part number, serial number etc. immediately after the 0x55, KW1 and KW2, and keep-alive is achieved by a constant back-and-forth of "acknowledge" messages. Every byte must receive its complement (inversion) from the other party. Real-time data is read from these modules using a "block" system, where a block may contain between 0 and 4 measurements, at any location within the maximum 255 block limit. Then each measurement from a block is described by a "formula" byte, which uses a look-up table to calculate a physical value. There is also a table of enumerated strings that correspond to a specific formula (you can find all of them in my library, extracted from a tester). The block stuff is also true for KWP2000 on modules other than 0x33, but I think the maximum block is 127 and to access anything after it, you actually access block-0x80 and process the response from the 5th measurement onward, if it exists. The fault codes are also different; they are known by a 5-digit value which is just the received code shown as an integer left-padded with 0s. It is a 2-byte value, whose description is retrieved by looking the code up in a table of strings (also found in my library). There is also a status/elaboration for each fault, I also have these strings, but they are different for KWP2000 which I haven't investigated too thoroughly.
All in all, it would not benefit your library to add the possibility of connecting to modules other than 0x33, since they won't use ISO9141.
from obd9141.
@domnulvlad , thanks for chiming in with these insights! I've added the resolved label and will mark it as closed. If anyone searches for this functionality they should be able to find this issue and their way to your library. Thanks for sharing.
from obd9141.
Related Issues (20)
- ESP32 support HOT 7
- problem 'serial_port' was not declared in this scope HOT 14
- For ESP32 HOT 3
- k-line speed study HOT 18
- How to make it work.... HOT 20
- How can I know if I'm doing everything right? HOT 5
- esp32 with OBD9141 not work HOT 19
- A special kind of communication with the ECU HOT 6
- ESP32 Serial1 crash... HOT 2
- KWP71 Compatibility HOT 2
- Unable to initialize obd.init() HOT 5
- The example for esp32 does not work. HOT 3
- PIDS HOT 8
- None of the examples is working HOT 3
- mitisuibishi MUT 2 (kline 5 baud init) HOT 1
- Usage with MCP2025 HOT 2
- LiquidCrystal_I2C problem. HOT 1
- sharing of your OBD9141 project HOT 1
- OBDII fault code names HOT 1
- initKWP not completing initialization HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from obd9141.