Skip to content

Commit d5a0fcd

Browse files
Ircamaalistair23
authored andcommitted
Support slow OBD adapters
Increase "0100" query (PIDS_A) timeout to support inexpensive/slow OBDII adapters. This patch fixes the case in which "SEARCHING" is not shown after "0100", due to slow response of cheap devices. ``` [obd.elm327] write: '0100\r' [obd.elm327] read: b'SEARCHING...\r... ``` It should also fix the case in which the debug mode needs to be active: in fact the debug logs might slow down the query timeout enough to be able to catch the query answer. Reference brendan-w#205 Reference brendan-w#200 Reference brendan-w#187
1 parent c14db6a commit d5a0fcd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

obd/elm327.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def auto_protocol(self):
244244
r = self.__send(b"ATSP0")
245245

246246
# -------------- 0100 (first command, SEARCH protocols) --------------
247-
r0100 = self.__send(b"0100")
247+
r0100 = self.__send(b"0100", delay=1)
248248
if self.__has_message(r0100, "UNABLE TO CONNECT"):
249249
logger.error("Failed to query protocol 0100: unable to connect")
250250
return False

0 commit comments

Comments
 (0)