Home/Support/Support Forum/How to get remote Xbee's ADC values in Transparent mode (both) ?(Xbee S2C)

How to get remote Xbee's ADC values in Transparent mode (both) ?(Xbee S2C)

0 votes
Greetings,

I'm fairly new to these topic and want to know more. I have been using Xbee S2C module in transparent mode and has been successful in transfering via UART from both ends. Now that I have acheived that I want to know how I can get the status of remote Xbee(voltage across ADC and Digital Input values) which is in a standalone conditon(Not connected to any micro controller has a power source).

Note: I have managed to configure the pins of remote Xbee S2C using X-CTU.

Can you please direct me where should I start from?
asked May 10, 2018 in ZigBee PRO Featureset (and legacy ZNet 2.5) by Hitheshkaranth New to the Community (1 point)

Please log in or register to answer this question.

2 Answers

0 votes
Per the documentation it seems you will need to use API mode for remote sampling.

https://www.digi.com/resources/documentation/digidocs/90002002/default.htm#Reference/r_zb_i_o_sampling.htm

Look through that subsection to make sure it applies to your use-case, but in multiple places references varying forms of remote sampling only supported in API mode.
answered May 10, 2018 by jlovinger Veteran of the Digi Community (421 points)
0 votes
Thanks for answering at short notice I do went through the documentation and I am quite familiar with it however Im still sceptical about its Coding in python2.7 can you guid me through this?

Thanks in advance.
answered May 22, 2018 by Hitheshkaranth New to the Community (1 point)
edited May 23, 2018 by Hitheshkaranth
I haven't used it myself, but Digi provides a python XBee library which includes some IO samples (including remote ADC and DIO samples). I imagine using that as a base for your application would work well.

https://github.com/digidotcom/python-xbee/tree/master/examples/io
The link leads to the coding written in Python 3.0 as I previously mentioned I am looking for coding in Python 2.7. I did go through the library XBee2.3.2 however for the reasons I dont know its not installing throwing following error at the time of installation

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-3qnnba/XBee/

I did upgrade the pip although the results are still same.

Can you help me with this or suggest me any alternatives?
You may need to port the Python 3.0 lib to Python 2.7 or otherwise use it as a base for your own implementation. You may be able to find an existing tool to automate porting or at least cut down on the work.

Could also take a look at https://github.com/jordanh/cp4pc. That repo allows simulation of ZigBee functionality provided on a Digi XBee Gateway. Includes the ability to send remote AT commands you will need to do ADC/DIO reads. But not as well documented and a little more specialized. Probably take some judicious cutting to extract out only the pieces you need but again possibly useful as a base.

Why are you restricted to Python 2.7?
Once again thank you for replying. My platform (Beaglebone Black) which I have been using for quite a long time now has all the main program written in python 2.7 (for my application) now the requirement has remote Xbee data polling (ADC,GPIO states) and displaying it in GUI. Hence Im restricted to 2.7 for now.
I think you already tried it, but https://github.com/niolabs/python-xbee looks a good choice. If you're having trouble with Pip just try placing the package source directly into your workspace.

You've got a number of Python implementations to work from all of which can handle remote AT commands. Just gotta pick one and do the grunt work to get it going on your platform.
@jlovinger Thanks for replying. I have tried multiple example but none of the were sucessful in retriving IO samples or any functionality related to remote xbee. I have got output for using remote AT commands in XCTU but no luck with any functions when XBee is configured in API mode and connected to my system(beaglebone black).
Make sure you're handling the serial port on your embedded processor. Matches the baud rate, etc.

As a sanity test use the frame generator in XCTU to make a sample AT command (local OR remote). Then push that directly out your serial port to the XBee. Make sure you get the expected response.

All the libraries you've worked with can handle remote AT commands. You're most like mising something in the porting (probably related to the serial port) or your network just isn't configured correctly.
@jlovinger Sorry for the delayed response.  In for the network is concered Im getting IS command resonse for remote Xbee module in XCTU in API mode and as of the serial port is concerned The command sent using library  https://github.com/niolabs/python-xbee was vissible when seen in hyperterminal when cross connceted with USB to ttl converter. Im now suck with getting output at XCTU but no response to beaglebone bone end. Is there a parallel C library that I can work on ?
There is a C library at https://github.com/digidotcom/xbee_ansic_library but it is quite a bit less user-friendly and you would have to port and define a platform for your beaglebone (define low-level configuration, serial port access, etc).

If all you are doing is IS you might just make a very simple parser off the raw serial port rather than try to bring in a library. Could maybe use the library I linked above as a base in certain parts (like the frame parser, etc) but not the whole construct. Work your way up from the serial port.
...