0

I am writing some code to read from an OBD II simulator using Python Serial. I am able to communicate with it as normal if I connect using 115200 bauds per second.

But in order to initialize it I need to write 0x33 through serial at 5 bauds per second. But the only baudrates I can use in Python Serial are the following:

(50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200)

Does anybody knows how to send the data at 5 bauds per second?

I have tried many crazy things (like sleeping beetween reads) without any succes.

Any help will be greatly appreciated!

  • Do you mean 5 *bits* per second? As far as I know that's not a standard baud rate for RS232 communication. Are you sure that's what the spec calls for? If so, then this means ODB II doesn't use the RS232 protocol for communication, so you will need to implement something yourself. Can you link to the part of the spec that describes this requirement? – Reticulated Spline Feb 22 '15 at 02:51
  • Assuming that 5 baud is really needed, you would have to manually reprogram the baud rate generator. That's not a typical task in an application program. – sawdust Feb 22 '15 at 23:18
  • I am using the Ecusim 200 with the ISO 9141-2 protocol. Here is a link to the user guide: [link](http://www.scantool.net/scantool/downloads/101/ecusim_2000-ug.pdf). And link to the description of the hardware: [link](http://www.scantool.net/ecusim-2000.html) – Mauricio Gomez Feb 23 '15 at 04:46
  • Forgot to say, please look at page 10, section 6.1 from the user guide. – Mauricio Gomez Feb 23 '15 at 15:34
  • Don't mixed `initial config` to `serial communication`. This is only accept logical input over serial port for `initial setup`. – dsgdfg Aug 31 '16 at 07:49

1 Answers1

0

I may be wrong, but you probably need to do a Slow Initiation: in the ELM327 datasheet it's specified that this is done via "ATSI" command:
"Protocols 3 and 4 use what is sometimes called a 5 baud, or slow initiation sequence in order to begin communications. Usually, the sequence is performed when the first message needs to be sent, and then the message is sent immediately after. Some ECUs may need more time between the two however, and having a separate initiation command allows you to control this time. Simply send AT SI, wait a little, then send the message. You may need to experiment a little to get the right amount of delay. Protocol 3 or 4 must be selected to use the AT SI command, or an error will result."

Hope it helps.