lhemmen / python-xbee

Automatically exported from code.google.com/p/python-xbee
MIT License
0 stars 0 forks source link

xbee.tx doesn't work #51

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.set up coordinator: panid 2001; baudrate:19200, api mode; router also api 
mode, the same setup as coordinator
2. use python and pyxbee module, run xbee.tx(dest_addr_long='full 
address',data='hello') and print(xbee.wait_read_frame())
3.error: some dest_addr_long with length 8 is not provided

What is the expected output? What do you see instead?
hello, see error report

What version of the product are you using? On what operating system?
2.1.0 for pyxbee, python 3.5

Please provide any additional information below.

Original issue reported on code.google.com by richardy...@gmail.com on 14 May 2014 at 6:43

GoogleCodeExporter commented 9 years ago
python-xbee throws this error when you provide the incorrect number of bytes to 
a parameter. In your case, you need to provide 8 bytes for the parameter 
dest_addr_long.

Too see how many bytes you are providing, you can use len() like so:

Python 3.2.1 (default, Jul 10 2011, 20:02:51) [MSC v.1500 64 bit (AMD64)] on 
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> len(b'\x00\x01')
2

Original comment by pmalms...@gmail.com on 15 Aug 2014 at 12:51