iwanders / OBD9141

A class to read an ISO 9141-2 port found in OBD-II ports.
MIT License
227 stars 70 forks source link

Custom request, and recv full data message #16

Open Mebius84 opened 5 years ago

Mebius84 commented 5 years ago

Good day! I need to send my own requests through Iso9141 at a speed of 4800 baud, is it possible with the help of your library?

Set the request header and send / receive data. my car works on its own protocol Subaru select monitor (ssm2), it is physically identical to ISO9141, but the method of obtaining data is different, instead of PID, I need to request reading from the address and parse the answer myself.

iwanders commented 5 years ago

Hey, what you need should all be possible.

You should be able to change the baud rate here.

the method of obtaining data is different, instead of PID, I need to request reading from the address and parse the answer myself.

You can probably get this to work by calling the request() method yourself, take a look at how getPID works, you can access the full data from the response through the readBuffer method. Let me know if this works for you, if you needed to modify more things to add flexibility to support your requirements feel free to send a PR this way. If you don't, I'd still like to hear whether you got it to work, good luck :)