Active Topics

 



Notices


Reply
Thread Tools
m750's Avatar
Posts: 249 | Thanked: 345 times | Joined on Aug 2010 @ Italy
#61
Your ECU has a different initial answer "BUS INIT: OK"
Please, try to download this file
Uncompress it. (>pyobd_io.py)
The put it in
/home/opt/pyobd/
replacing the existing file.
Let me know if that resolve your problem.
__________________
maxcpu : change cpu's clock with a TAP!
savecpu : overheating control for overclocked n900.
shaketowake2 : Enable/Disable wake up/rest by shaking.
tilt2control : control mediaplayer by tilting your n900.
gpstracker-c : easy handle your gpstracker tk102.
pyOBD for maemo (OBD-II cars diagnostic)
 

The Following User Says Thank You to m750 For This Useful Post:
Posts: 36 | Thanked: 19 times | Joined on Feb 2011
#62
So this is interesting!

First of all, thank you!

I have one single ELM327 BT device and have tested it on two cars today. Peugeot 407, your new io file works 100%, whatever i can get atm from the odbII, i have.

But, i have also tested with the same BT interface in Toyota Yaris and guess what... it seem that the handshake is different (no matter the io file), atz, ate0, 0100 is not the init sequence:

~ $ /opt/pyobd/pyobd_start
Searching for BT dev...
-Found device: CHX (00:11:12:19:11:33)
Found BT SPP dev
/dev/rfcomm0
Send: atz

self.state: 1
Send: ate0
ate0
Send: 0100
BUS INIT: ERROR
Send: atz
ELM327 v1.4
self.state: 1
Send: ate0
ate0
Send: 0100
BUS INIT: ERROR
Send: atz
ELM327 v1.4
self.state: 1
Send: ate0
ate0
Send: 0100
BUS INIT: ERROR
Send: atz
ELM327 v1.4
self.state: 1
Send: ate0
ate0
Send: 0100
BUS INIT: ERROR
Send: atz
ELM327 v1.4
self.state: 1
Send: ate0
ate0
Send: 0100
BUS INIT: ERROR
Send: atz
ELM327 v1.4
self.state: 1
Send: ate0
ate0
Send: 0100

what could this be?
 
Posts: 36 | Thanked: 19 times | Joined on Feb 2011
#63
hmm, i will test different sequences, is there a list of them? i have found this: https://www.scantool.net/forum/index.php?topic=5575.0
 
m750's Avatar
Posts: 249 | Thanked: 345 times | Joined on Aug 2010 @ Italy
#64
I read also on other forums that there are problems with some ECU.
Try with this commands:
Code:
ATZ
ATE0
AT SP 0
0100
Let me know
__________________
maxcpu : change cpu's clock with a TAP!
savecpu : overheating control for overclocked n900.
shaketowake2 : Enable/Disable wake up/rest by shaking.
tilt2control : control mediaplayer by tilting your n900.
gpstracker-c : easy handle your gpstracker tk102.
pyOBD for maemo (OBD-II cars diagnostic)
 
Posts: 36 | Thanked: 19 times | Joined on Feb 2011
#65
the AT SP 0 seems to work OK in terminal, but when i included it:

Code:
             self.send_command("ate0")  # echo off
             time.sleep(0.2)
             print self.get_result()
             wx.PostEvent(self._notify_window, DebugEvent([2,"ate0 response:" + self.get_result()]))

             self.send_command("at sp 0")  # init II
             time.sleep(0.2)
             print self.get_result()
             wx.PostEvent(self._notify_window, DebugEvent([2,"at sp 0 response:" + self.get_result()]))

             self.send_command("0100")
             time.sleep(0.2)
             ready = self.get_result()
             print ready
             time.sleep(1.2)
             wx.PostEvent(self._notify_window, DebugEvent([2,"0100 response1:" + ready]))
the at sp 0 returns OK, but with this OK it hangs... timing?
 
Posts: 36 | Thanked: 19 times | Joined on Feb 2011
#66
seems like at sp0 returns nothing, so i commented the get results:

self.send_command("at sp 0") # init II
time.sleep(0.2)
#print self.get_result()
#wx.PostEvent(self._notify_window, DebugEvent([2,"at sp 0 response:" + self.get_result()]))

now i get this:

Code:
Nokia-N900:~# /opt/pyobd/pyobd_start 
Searching for BT dev...
 -Found device: CHX (00:11:12:19:11:33)
    Found BT SPP dev
/dev/rfcomm0
Send: atz
ELM327 v1.4
self.state: 1
Send: ate0
ate0
Send: at sp0
Send: 0100
SEARCHING...
Send: atz
ELM327 v1.4
self.state: 1
Send: ate0
ate0
Send: at sp0
Send: 0100
SEARCHING...
but, if in another window, i start terminal:

./miniterm.py -p /dev/rfcomm0

i get to see the replys
>1 00 BE 3E B8 13

if i try to connect manually, AT SP 0 returns OK

and i actually managed to send
ATZ
ATE0
AT SP0
0100

in such a way, that pyobd says connected, but this was not very reliable...
 
Posts: 36 | Thanked: 19 times | Joined on Feb 2011
#67
OK, it seems that it returns searchning, and then right away it responds, i managed to make it work with second:

time.sleep(0.2)
ready = self.get_result()
print ready
time.sleep(1.2)
wx.PostEvent(self._notify_window, DebugEvent([2,"0100 response1:" + ready]))



so it now looks like this:
Code:
             self.send_command("ate0")  # echo off
             time.sleep(0.2)
             print self.get_result()
             wx.PostEvent(self._notify_window, DebugEvent([2,"ate0 response:" + self.get_result()]))

             self.send_command("at sp0")  # init II
             time.sleep(0.5)
             #print self.get_result()
             #wx.PostEvent(self._notify_window, DebugEvent([2,"ate0 response:" + self.get_result()]))

             self.send_command("0100")
             time.sleep(0.2)
             ready = self.get_result()
             print ready
             time.sleep(1.2)
             wx.PostEvent(self._notify_window, DebugEvent([2,"0100 response1:" + ready]))

             time.sleep(0.2)
             ready = self.get_result()
             print ready
             time.sleep(1.2)
             wx.PostEvent(self._notify_window, DebugEvent([2,"0100 response1:" + ready]))
EDIT:
i can confirm this working with both tested cars now

EDIT2:
sometimes i get: UNABLE TO CONNECT right away, but then after several attempts it connects.

Last edited by vanous; 2012-02-18 at 11:33.
 
m750's Avatar
Posts: 249 | Thanked: 345 times | Joined on Aug 2010 @ Italy
#68
Hi @vanous
I don't have understand. Please, print what answer ELM with this command:

ATZ
ATE0
AT SP 0
0100

then with this

ATZ
ATE0
AT SP0
0100

(the protocola standard indicate AT SP 0, not AT SP0)
__________________
maxcpu : change cpu's clock with a TAP!
savecpu : overheating control for overclocked n900.
shaketowake2 : Enable/Disable wake up/rest by shaking.
tilt2control : control mediaplayer by tilting your n900.
gpstracker-c : easy handle your gpstracker tk102.
pyOBD for maemo (OBD-II cars diagnostic)

Last edited by m750; 2012-02-18 at 12:29.
 
Posts: 36 | Thanked: 19 times | Joined on Feb 2011
#69
The reply from AT SP 0, or AT SP0 is always OK:

ATZ
LM327 v1.4
ATE0
AT SP 0
OK
SEARCHING... 1 00 98 3B 00 11


this is from pyobd, if i add at sp 0 and wait for its result. it hangs, although at sp 0 returns OK.

Code:
Searching for BT dev...
 -Found device: CHX (00:11:12:19:11:33)
    Found BT SPP dev
/dev/rfcomm0
Send: atz
ELM327 v1.4
self.state: 1
Send: ate0
ate0
Send: at sp 0
OK
when changed it to at sp0, it remains the same and hangs after OK again:

Code:
Send: atz
ELM327 v1.4
self.state: 1
Send: ate0
ate0
Send: at sp0
OK
so what i had to do was to comment out the awaiting for response, like this:

Code:
          self.send_command("at sp0")  # init II
             time.sleep(0.5)
             #print self.get_result()
             #wx.PostEvent(self._notify_window, DebugEvent([2,"ate0 response:" + self.get_result()]))
But, this wasn't enough. The program then hanged on SEARCHING, look here:

Code:
Send: atz
ELM327 v1.4
self.state: 1
Send: ate0
ate0
Send: at sp0
Send: 0100
SEARCHING...
so i added second reply fetching after 0100 being sent, like this:

Code:
             self.send_command("0100")
             time.sleep(0.2)
             ready = self.get_result()
             print ready
             time.sleep(1.2)
             wx.PostEvent(self._notify_window, DebugEvent([2,"0100 response1:" + ready]))

             time.sleep(0.2)
             ready = self.get_result()
             print ready
             time.sleep(1.2)
             wx.PostEvent(self._notify_window, DebugEvent([2,"0100 response1:" + ready]))
this produces:


Code:
Send: atz
ELM327 v1.4
self.state: 1
Send: ate0
ate0
Send: at sp0
Send: 0100
SEARCHING...
UNABLE TO CONNECT
Send: atz
ELM327 v1.4
self.state: 1
Send: ate0
ate0
Send: at sp0
Send: 0100
SEARCHING...
41 00 98 3B 00 11 
Now: 41 00 98 3B 00 11 
sensor: 0
Send: 0100
data: 41 00 98 3B 00 11 
CODE: 4100983B0011
obd_sensors.hex_to_bistring(str): 983B0011
Sensor:              Supported PIDs 1
sensor: 32
Send: 0120

Last edited by vanous; 2012-02-18 at 12:32.
 

The Following 3 Users Say Thank You to vanous For This Useful Post:
m750's Avatar
Posts: 249 | Thanked: 345 times | Joined on Aug 2010 @ Italy
#70
OK, maybe the problem is "only" delayed response from the ECU.
Please wait 5 minutes, I will post a new version from pyobd_io, so you can test it.
__________________
maxcpu : change cpu's clock with a TAP!
savecpu : overheating control for overclocked n900.
shaketowake2 : Enable/Disable wake up/rest by shaking.
tilt2control : control mediaplayer by tilting your n900.
gpstracker-c : easy handle your gpstracker tk102.
pyOBD for maemo (OBD-II cars diagnostic)
 

The Following User Says Thank You to m750 For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 03:01.