Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to play back fake speeds/etc? #39

Open
kenreider opened this issue Feb 17, 2024 · 1 comment
Open

How to play back fake speeds/etc? #39

kenreider opened this issue Feb 17, 2024 · 1 comment

Comments

@kenreider
Copy link

I've read through the documentation and various issues/questions, and am still at a mental block on how to proceed. I'm only posting this as I've hit a brick wall.

I am hoping to use this to simulate a car ECU, to an attached handheld ODB2 reader, via a USB ELM327 adapter. All I want to play to the ODB2 reader is vehicle speed and engine RPM - no other parameters matter. I want to get to the point where I can input a speed of 10km/hr on my computer, and see 10km/hr displayed on the handheld ODB reader.

The adapter is is available at /dev/tty.usbserial-A78KFBC2, so I am initializing the program with this:
elm -p /dev/tty.usbserial-A78KFBC2 -a 38400 -s car -B 38400 -S /dev/tty.usbserial-A78KFBC2

This seems to respond appropriately with:

2024-02-17 09:12:03,174 - root - INFO - 

ELM327 OBD-II adapter emulator v3.0.0 started on serial communication port "/dev/tty.usbserial-A78KFBC2".

Emulator scenario switched to 'car'
Welcome to the ELM327 OBD-II adapter emulator.
ELM327-emulator is running on serial communication port "/dev/tty.usbserial-A78KFBC2".
Type help or ? to list commands.

At this point, no USB activity lights appear on the EML327 adapter, and the OBD2 device says "communication failure" when trying to connect via ODB2.

Despite trying various commands from the documentation, the only thing I have noticed which results in activity lights on my ELM327 adapter using elm is when I accidentally ran the following - which illuminated the USB activity light, but ultimately didn't establish a connection:

CMD> test car
______Raw command:_______________
2024-02-16 23:28:58,027 - root - INFO - Write forward data: b'CAR\r'
2024-02-16 23:28:58,231 - root - INFO - Read forward data: b'CAR\r?\r\r>'
2024-02-16 23:28:58,231 - root - WARNING - Missing data in dictionary: 'CAR'. Answer:
"b'CAR\\r?\\r\\r>'"
2024-02-16 23:28:58,231 - root - INFO - Unknown ELM command: 'CAR', header=7E0
'<writeln>?</writeln>'

______Command output:____________
'?\r\r>'

At this point I can't tell if I'm barking up the wrong tree and trying to get ELM327-emulator to do something it's not supposed to do, or if I'm missing something obvious. Either way, any advice at all for getting me closer to what I'm trying to do would be greatly appreciated!

@Ircama
Copy link
Owner

Ircama commented Feb 24, 2024

test car is not correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants