Recently I had problems with a temperature sensor. It used to work
fine, and all of the sudden it stopped working. Using the owread
program worked however.
I went into the code and noticed that in the ownet/connection.read
routine, a value of "None" is returned whenever a ping is received.
That is not what happens in the c-code of owread, where there is a
loop while payload<0 (which is a ping, right?).
The code in question is in ownet/connection.py: I commented out the
"else" part of the loop.
while 1:
data = s.recv(24)
#print "data, len", data, len(data)
if len(data) is not 24:
raise exShortRead
ret, payload_len, data_len = self.unpack(data)
if payload_len >= 0:
data = s.recv(payload_len)
rtn = self.toNumber(data[:data_len])
break
#else:
# ping response
#rtn = None
#break
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers