cthuun / python-xbee

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

escaped=False as default? #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Run my test program
2. The remote EP1 sends back data to the CO3 coordinator
3. Nothing is being displayed

What is the expected output? What do you see instead?

Some data coming back from EP1 should be displayed

What version of the product are you using? On what operating system?

XBee 2.0.0, Linux Kubuntu 10.10

Please provide any additional information below.

Seems the default is escaped=False (see base.by)
Changing this explicitely to escaped=True in the ZigBee(ser,..., escaped=True) 
now prints out data coming from the remote EP1.
Same for the (slightly modified) receive_samples_async.py example program: 
setting escaped=True made received packets be printed out.

Since API=2 (API mode, escaped characters) is set for xbee-api, I expected 
wrongly this is default here too. Is there a reason escaped=False by default?

Using this as default is fine for me now, but as before, an example program 
describing this parameter would be nice as otherwise the result is simply 
nothing being printed out, which looks like an utter failure, while in truth 
just a small parameter is missing.

The usual "Use the source, Luke" is of course the solution for this, and this 
is how I found out, but it's a tedious way, especially for non (resp. not-yet) 
Python users like me.

Original issue reported on code.google.com by harald.k...@gmail.com on 12 Feb 2011 at 2:17

Attachments:

GoogleCodeExporter commented 9 years ago
Nicer example. Cleaned up a bit. Ready and free to use as an example for 
xbee-python.

Original comment by harald.k...@gmail.com on 12 Feb 2011 at 2:42

Attachments:

GoogleCodeExporter commented 9 years ago
I just realized it's python-xbee. I wish I could edit my old comment...

Original comment by harald.k...@gmail.com on 12 Feb 2011 at 2:44

GoogleCodeExporter commented 9 years ago
Hi Harald,

My apologies for taking so long to comment on your issue; I'm not sure how this 
slipped under my radar.

If you read the documentation posted in the 'Downloads' section of the Google 
Code project page, under the 'API Reference' section, you would see that this 
parameter, and it's default value, has been documented.

This default has been in place for quite some time; escaped mode communication 
with XBee devices was developed a while after standard communication was 
developed. As such, this change would likely cause backwards incompatibility 
for many users. I'm don't think that aligning our interface with that of 
another library is worth that cost.

Unless you can come up with stronger support to offset the cost, I'm inclined 
to close this issue as Won'tFix.

Thanks for your input,
~Paul Malmsten

Original comment by pmalms...@gmail.com on 13 May 2011 at 5:14

GoogleCodeExporter commented 9 years ago
Hi Paul,

No worries. After all, I found a solution, so there was no urgency.

Seems for whatever reasons I looked at the 1.9.2 docs which has no such 
reference.
The 2.0.0 docs do have it, so I can only blame myself for not seeing this.

Nah, don't worry. Backward compatibility is (sometimes) well worth it, 
and in this
case the overhead of keeping this compatibility is close to zero.
I would keep it as it is too.

Thanks for coming back to me with this!
Harald

Original comment by harald.k...@gmail.com on 14 May 2011 at 7:29

GoogleCodeExporter commented 9 years ago

Original comment by pmalms...@gmail.com on 21 May 2011 at 2:26