|
From: <ppo...@po...> - 2015-03-04 15:45:13
|
Hi I have problems initializing connection to a ELM 327 device. From the terminal log (below) I suppose the problem is caused by 9600 baud initialization. It looks to me that the initialization leaves some characters in the chip buffer so the command seen by the chip is ?ATZ<CR> instead of just ATZ<CR>. Note 'received 1 bytes' after 9600 attempt. I have tried to resolve issue by issuing SET SPEED 38400 but the ELM driver apparently ignores that setting. I see several options to resolve the issue: - use defined speed e.g. 38400 from the beginning - wait 20+ seconds after trying 9600 baud - send ATZ again after receiving "?" as a response Regards P.Potempa > scantool> DEBUG ALL 15 > Debug values: L0 0xF, L1 0xF, L2 0xF L3 0xF CLI 0xF > scantool> DEBUG L0 255 > L0 debug is 0xFF: OPEN CLOSE READ WRITE IOCTL PROTO INIT DATA > scantool> DIAG CONNECT > diag_l2.c:361: l2_open ELM on \\.\COM8, L1proto=1 > diag_l1.c:158: diag_l1_open ELM on \\.\COM8 with l1 proto 1 > diag_l0_elm.c:310: open subinterface \\.\COM8 protocol 1 > diag_tty_win.c:57: Device \\.\COM8 opened, fd 0000008C > diag_tty_win.c:185: dev 0000008C; 9600bps 8,1,3 > diag_l0_elm.c:350: elm_open : sending ATZ @ 9600.. > diag_l0_elm.c:207: sending command to ELM: ATZ > diag_l0_elm.c:237: sent 4 bytes > diag_l0_elm.c:238: received 1 bytes > diag_l0_elm.c:241: (got ) > diag_l0_elm.c:256: ELM not ready (no prompt received): > diag_l0_elm.c:257: Unspecified Error. > diag_l0_elm.c:357: sending ATZ @ 9600 failed; trying @ 38400... > diag_tty_win.c:185: dev 0000008C; 38400bps 8,1,3 > diag_l0_elm.c:207: sending command to ELM: ATZ > diag_l0_elm.c:237: sent 4 bytes > diag_l0_elm.c:238: received 8 bytes > diag_l0_elm.c:241: (got ATZ > ? > > >) > diag_l0_elm.c:276: ELM returned error : ? > diag_l0_elm.c:277: Unspecified Error. > diag_l0_elm.c:207: sending command to ELM: ATPC > diag_l0_elm.c:237: sent 5 bytes > diag_l0_elm.c:238: received 10 bytes > diag_l0_elm.c:241: (got ATPC > OK > > >) > diag_l0_elm.c:124: link 003D1450 closing > diag_tty_win.c:119: diag_tty_close : closing fd 0000008C > diag_l0_elm.c:375: sending ATZ @ 38400 failed. > diag_l0_elm.c:376: L0 adapter comms failed. > diag_l2.c:391: Unspecified Error. > l2_generic_start: open failed for protocol 1 with ELM on \\.\COM8 > scantool.c:893: Unspecified Error. > > Connection to ECU failed > Please check :- > Adapter is connected to PC > Cable is connected to Vehicle > Vehicle is switched on > scantool> set SPEED > speed: Connect speed: 38400 > scantool> set INITMODE > initmode: Initmode to use with above protocol is FAST > scantool> set L1PROTOCOL > l1protocol: Layer 1 (H/W) protocol to use ISO9141 > scantool> set L2PROTOCOL > l2protocol: Layer 2 protocol to use ISO9141 > scantool> set interface elm \\.\COM8 > interface is now ELM on \\.\COM8 > scantool> set L2PROTOCOL > l2protocol: Layer 2 protocol to use ISO9141 > scantool> set L1PROTOCOL > l1protocol: Layer 1 (H/W) protocol to use ISO9141 > scantool> set INITMODE > initmode: Initmode to use with above protocol is FAST > scantool> set ADDRTYPE > addrtype: functional addressing > scantool> |