ConnectPort X4 and ADC readings

All,

I have run into some trouble using my shiny new ConnectPort X4 to take analog sensor readings via its ADC and through it’s Python interface.

Background:
I have a CPX4 in the NEMA enclosure (I think that makes it an X4H). When I purchased it, it had a Digi XBee Pro S2B inside of it. But since my application needs to use 802.15.4 and I couldn’t find a version of the X4 for sale anywhere with the S1 radio in it… I ripped it apart once I received it, took out the S2B and dropped in an S1.

I then updated the X4’s firmware to: 2.14.1.15 (Version 82001536_K2 03/08/2012). To round out the details, the firmware on the S1 inside of the X4 is 0x10EC.

Application:
Simple… I just want to make use of the screw-terminal style IO port in the X4H to make a simple analog sensor reading via the X4’s python interpreter.

Problem:
Unfortunately, when I use the digihw and xbee python modules to make the sensor reading in a style shown in some example files like: analog_example.py (inside of 40002640_B) or localain.py (inside of DigiXBeeDrivers.zip inside of 40002640_B), I always end up with some errors.

The main error is that when the parse_IS method tries to parse the response from the IS command (which tries to parse the string returned from a xbee.ddo_get_param(None, “IS”) call, it says it can’t parse a 0 length string.

The reason why None is passed as the first parameter in that func call is because I just want to query the local radio.

I do first set the IO0 port to be in ADC mode (via something like xbee.ddo_set_param(None, “d0”, 2)). So I know that it’s not responding with nothing since no ports are ADC enabled. In fact, if I don’t first set an IO port to be ADC enabled… the “IS” command returns an error… but once the port is set… silence from the “IS” command :frowning:

The kicker:
When I toss the S2B back into the X4 and carryout the same sequence of python commands… I DO receive an ADC reading. But unfortunately, I can’t use the S2B in this application for other reasons.

Sensing that there may be something wrong with my S1 radio, I bought a new one and tried it out… same thing… no data coming back from an “IS” command.

So here are my questions:

  • Why would the S1 and S2B behave differently here? Both are XBee Pro radios… supposed to be pretty much interchange-able for something that doesn’t even use the radio such as ADC reads, right?

  • Why would the X4H be able to get a reading back from the S2B but not S1? Since I have kinda a frankenstein X4 (being that I had to buy it with the S2B inside but then drop a S1 in and change the X4 firmware as soon as I got it), could there be anything about how the X4 communicates with XBee Pros (outside of the X4 firmware) that was pre-configured for the S2B but not the S1 which I could or should change?

  • I’ve gotten plenty of experience with ConnectPorts in the last few months but less with XBee Pro radios… so I don’t know much about X-CTU yet. What could I do inside of X-CTU with both my S1 and S2B to zoom in and try to see why one would respond to an “IS” command but not the other? If I were to try to issue low level AT commands in the X-CTU terminal, what should I look for with each radio? Does API mode matter at all once I get down to this level?

Any help or comments or even just thoughts of encouragement would be appreciated now :slight_smile:

Dave

I hate to do this as I have no new info… but I’d like to selfishly keep my post towards the top of the stack… so there is a better chance to find someone who could offer some advice. This problem seems so odd to me and I’d really love it if Digi could offer some support for a touted feature in their products without trying to charge me hundreds of dollars for a few hours of phone conversations.

Hopefully my faux reply will do that.

Dave