Closed GoogleCodeExporter closed 9 years ago
Hi there, following further investigation, it would appear that if anything,
the problem is possibly related to the Pyserial library, and not with the
python-XBee libraries. I base that on the following (referring to the expected
results listed in my original post, as well as the actual results, also listed
above:
x40 = ascii @
x79 = ascii y
xe6 = seems undefined in ascii, therefore seems to be coming through OK as xe6
x5f = ascii underscore (_)
Therefore, my theory is that for some reason, pyserial stops treating the
stream / string (or whatever the correct technical term is) following the last
x00 in \x00\x13\x2A\x00 and then start adding ascii characters instead. Using a
terminal program which is reliant on the Pyserial library, on the RasPi, I
already receive the data wrong.
If you have an appropriate forum to move this non-python-XBee issue to, it
might help others, once I find a solution to the issue. Should you have any
advice for me, I would be grateful.
Regards,
Abrie
Original comment by abrie.wi...@gmail.com
on 20 Jun 2013 at 7:38
I have a similar issue, my source address is printing the character "K" at the
end, when it should be "\x4B" (the last byte of the address of my coordinator,
which happens to be the ASCII code for "K").
Original comment by alias.ne...@gmail.com
on 25 Jun 2013 at 9:28
My apologies for the delay in getting back to you; somehow I missed this thread
earlier.
This is a feature of Python; it will print any ASCII bytes it encounters in a
byte string as its equivalent printed character. You can try this by typing the
following into a Python 2.X shell:
>>> '\x40'
'@'
A similar result will be printed for Python 3.X.
Also FYI, python-xbee and your XBee device validate their messages to one
another using a simple checksum, so it is unlikely that your message(s) were
tampered with during transmission.
Does this answer your question?
Original comment by pmalms...@gmail.com
on 25 Jun 2013 at 11:07
Closing this as WontFix since no code change was required.
Original comment by pmalms...@gmail.com
on 21 Sep 2013 at 12:13
Original issue reported on code.google.com by
abrie.wi...@gmail.com
on 18 Jun 2013 at 12:39Attachments: