Thanks for this emulator. It looks like it will be very useful.
I'm working on Ubuntu 20.04, x86_64, fully patched. Python 3.8.10 is installed, and dependencies are installed. I cloned ELM327-emulator
, and ran it using python3 -m elm
. The emulator was waiting/listening on /dev/pts/3
.
$ python3 -m elm
2021-07-09 21:25:42,876 - root - INFO -
ELM327 OBD-II adapter emulator v3.0.1 started on pseudo-tty port "/dev/pts/3".
Welcome to the ELM327 OBD-II adapter emulator.
ELM327-emulator is running on /dev/pts/3
Type help or ? to list commands.
CMD> 2021-07-09 21:25:59,439 - root - CRITICAL - Error while processing '':
string index out of range
Traceback (most recent call last):
File "/home/jwalton/ELM327-emulator/elm/elm.py", line 848, in run
request_header, request_data, resp = self.handle_request(
File "/home/jwalton/ELM327-emulator/elm/elm.py", line 1802, in handle_request
if cmd[1] == 'T' and org_cmd.upper()[1] != 'T': # AT or ST shall be unspaced
IndexError: string index out of range
2021-07-09 21:25:59,440 - root - CRITICAL - Error while processing '':
string index out of range
Traceback (most recent call last):
File "/home/jwalton/ELM327-emulator/elm/elm.py", line 848, in run
request_header, request_data, resp = self.handle_request(
File "/home/jwalton/ELM327-emulator/elm/elm.py", line 1802, in handle_request
if cmd[1] == 'T' and org_cmd.upper()[1] != 'T': # AT or ST shall be unspaced
IndexError: string index out of range
2021-07-09 21:25:59,442 - root - INFO - Unknown ELM command: 'ELM327V1.5', header=7E0
2021-07-09 21:25:59,443 - root - INFO - Unknown ELM command: 'ELM327V1.5', header=7E0
2021-07-09 21:25:59,443 - root - WARNING - Invalid request: '>ATZ'
2021-07-09 21:25:59,443 - root - WARNING - Invalid request: '>ATZ'
2021-07-09 21:25:59,444 - root - WARNING - Invalid request: '>ATZ'
2021-07-09 21:25:59,444 - root - INFO - Unknown ELM command: 'ELM327V1.5', header=7E0
2021-07-09 21:25:59,444 - root - INFO - Unknown ELM command: 'ELM327V1.5', header=7E0
2021-07-09 21:25:59,445 - root - WARNING - Invalid request: '>'
2021-07-09 21:25:59,445 - root - WARNING - Invalid request: '>'
2021-07-09 21:25:59,445 - root - WARNING - Invalid request: '>'
2021-07-09 21:25:59,445 - root - WARNING - Invalid request: '>'
2021-07-09 21:25:59,445 - root - WARNING - Invalid request: '>'
2021-07-09 21:25:59,446 - root - INFO - Unknown ELM command: 'ELM327V1.5', header=7E0
2021-07-09 21:25:59,446 - root - CRITICAL - Error while processing '?':
string index out of range
Traceback (most recent call last):
File "/home/jwalton/ELM327-emulator/elm/elm.py", line 848, in run
request_header, request_data, resp = self.handle_request(
File "/home/jwalton/ELM327-emulator/elm/elm.py", line 1802, in handle_request
if cmd[1] == 'T' and org_cmd.upper()[1] != 'T': # AT or ST shall be unspaced
IndexError: string index out of range
2021-07-09 21:25:59,446 - root - CRITICAL - Error while processing '?':
string index out of range
Traceback (most recent call last):
File "/home/jwalton/ELM327-emulator/elm/elm.py", line 848, in run
request_header, request_data, resp = self.handle_request(
File "/home/jwalton/ELM327-emulator/elm/elm.py", line 1802, in handle_request
if cmd[1] == 'T' and org_cmd.upper()[1] != 'T': # AT or ST shall be unspaced
IndexError: string index out of range
2021-07-09 21:25:59,446 - root - WARNING - Invalid request: '>'
2021-07-09 21:25:59,446 - root - WARNING - Invalid request: '>'
2021-07-09 21:25:59,447 - root - CRITICAL - Error while processing '?':
string index out of range
Traceback (most recent call last):
File "/home/jwalton/ELM327-emulator/elm/elm.py", line 848, in run
request_header, request_data, resp = self.handle_request(
File "/home/jwalton/ELM327-emulator/elm/elm.py", line 1802, in handle_request
if cmd[1] == 'T' and org_cmd.upper()[1] != 'T': # AT or ST shall be unspaced
IndexError: string index out of range
2021-07-09 21:25:59,447 - root - CRITICAL - Error while processing '?':
string index out of range
Traceback (most recent call last):
File "/home/jwalton/ELM327-emulator/elm/elm.py", line 848, in run
request_header, request_data, resp = self.handle_request(
File "/home/jwalton/ELM327-emulator/elm/elm.py", line 1802, in handle_request
if cmd[1] == 'T' and org_cmd.upper()[1] != 'T': # AT or ST shall be unspaced
IndexError: string index out of range
2021-07-09 21:25:59,447 - root - WARNING - Invalid request: '>'
2021-07-09 21:25:59,447 - root - WARNING - Invalid request: '>ATZ'
2021-07-09 21:25:59,447 - root - WARNING - Invalid request: '>ATZ'
2021-07-09 21:25:59,447 - root - WARNING - Invalid request: '>ATZ'
2021-07-09 21:25:59,447 - root - WARNING - Invalid request: '>ATZ'
2021-07-09 21:25:59,447 - root - WARNING - Invalid request: '>ATZ'
2021-07-09 21:25:59,448 - root - WARNING - Invalid request: '>ATZ'
2021-07-09 21:25:59,448 - root - INFO - Unknown ELM command: 'ELM327V1.5', header=7E0
<skip many similar blocks of messages>
2021-07-09 21:26:01,542 - root - WARNING - Invalid request: '>'
2021-07-09 21:26:01,542 - root - WARNING - Invalid request: '>'
2021-07-09 21:26:01,542 - root - WARNING - Invalid request: '>'
2021-07-09 21:26:01,543 - root - WARNING - Invalid request: '>'
2021-07-09 21:26:01,544 - root - WARNING - Invalid request: '>'
2021-07-09 21:26:01,544 - root - WARNING - Invalid request: '>'
2021-07-09 21:26:01,587 - root - WARNING - Invalid request: '>'
2021-07-09 21:26:01,588 - root - WARNING - Invalid request: '>'
2021-07-09 21:26:01,638 - root - WARNING - Invalid request: '>'
2021-07-09 21:26:01,688 - root - WARNING - Invalid request: '>'
2021-07-09 21:26:01,688 - root - WARNING - Invalid request: '>'
2021-07-09 21:26:01,738 - root - WARNING - Invalid request: '>'
2021-07-09 21:26:01,739 - root - WARNING - Invalid request: '>'
2021-07-09 21:26:01,788 - root - WARNING - Invalid request: '>'
2021-07-09 21:26:01,839 - root - WARNING - Invalid request: '>'
2021-07-09 21:26:01,889 - root - WARNING - Invalid request: '>'
2021-07-09 21:26:01,939 - root - WARNING - Invalid request: '>'
2021-07-09 21:26:01,940 - root - WARNING - Invalid request: '>'
2021-07-09 21:26:01,990 - root - WARNING - Invalid request: '>'
<skip many similar messages>
I can provide my C test program, if interested. There's not much to it though. It just issues AT commands and reads responses. After some AT commands it uses ODB commands, like 01 00
and 09 02
. When testing with a knock-off ELM327 the command completes successfully. (I'm trying the ELM327-Emulator because it is faster and more convenient than doing stuff on the car in the garage).
I did not see a similar bug report, so I opened this one.
My apologies if I a doing something wrong here.