Communication dropping out?

Good evening, all. I’m trying to diagnose a problem I’m having with one of my XBee ZB (Series 2) OEM modules. I’m running firmware 0x2841 on the module, and I’ve got a ConnectPort X4 as a coordinator. I’ve got one other end-node (also an OEM module) and a light/temp sensor on the network. No router’s in play right now.

I’ve got the XBee module connected to an Arduino µcontroller. When the devices power up, I see the associate LED flash regularly and data flows normally (data’s being sent into the UART by the µC). I’ve been observing that the data received from this µC/XBee device becomes intermittent. I just now saw that serial data is received by my Dia device driver when the associate LED is blinking, as expected. However, the associate LED frequently becomes solid, and occasionally turns off. When either of those happen, no data flows from the µC.

Any thoughts on what might be causing this?



It sounds as though your modules are slightly out of range or interference is causing your to drop communications. To resolve this, I would recommend adding a router.

2841 is Zigbee End Device AT, so what values are SP, SN, ST, SM, and SO of this module set to?

The SP * SN of Coordinator must be equal to or longer than the longest SP * SN of any device on your PAN, so how have you configured the SP/SN values of the CP-X4?

What might be happening is that the CP-X4 might be timing out the data coming from the Arduro due to SN of you Coordinator module not being set.

The SP value can be viewed on the CP-X4 WebUI at Configuration > XBee Network > click on extended address of Coordinator module, then the page for Advanced Settings.

SN unfortunately isn’t viewable via WebUI (it will be in the next firmware release), and by default is set to 1. You can query and set this value from the CommandLine Interface however.

To query:

set xbee addr= SN

Your output might look something like this:
SN: 1 0x0001

Which is the default. To set this to a higher value (using the example of my CP-X8 and setting SN=90):

#> set xbee addr=00:13:a2:00:40:0a:09:2c! SN=90

Don’t forget to write the value after setting it:

#> set xbee addr=00:13:a2:00:40:0a:09:2c! WR

Query example:

#> set xbee addr=00:13:a2:00:40:0a:09:2c! SN

SN: 90 0x005a


The module is literally sitting on top of the electric meter for my house, but the ConnectPort is on the other side of the wall, less than 24" away. I could add a router, but it’d actually be further away from the end device than the coordinator is.


What is your wall made of? 2x4, 2x6, Stucco? Is the remote module mount inside of the meter or next to it?

The remote module is plugged into a breadboard, unenclosed, and perched precariously on top of the meter housing, above the house sill. So vinyl siding on the exterior, probably a 2x4 stud wall, and sitting on top of a cinderblock foundation wall. Direct path is probably through the wall to the ConnectPort.


This is sounding more and more like it could be a power issue. if you bring the whole setup inside and use a AD/DC converter, do you see the same issue?

Just a wild thought: What does the electric company use to read the meter? A wireless interface? What frequency?
I’m thinking it may be RF interference. Even if the frequencies are different most receivers can be saturated by a strong, or very nearby, transmitter.

Try moving the XBee away from the power meter. If the problem goes away this may be the cause.

I thought of that, actually. Yeah, I ran it off a wall wart, too. I’m using Adafruit’s XBee breakout board with the 3v3 regulator on-board. The Arduino (Adafruit’s breadboard-able Arduino clone) is taking 9v from the DC adapter and outputting a regulated 5v, which is then re-regulated to 3.3v by the XBee breakout board.

I’ll try plugging in the XBee-Pro that came with my starter kit and see if it might be a hardware issue.

Good idea, waltr. It’s a Centron C1SR meter, and uses 910-920MHz frequency hopping for 2-way communication with the meter reader, who’s supposedly just driving down the street. The range isn’t supposed to be that great, but it’s a possibility. There’s a version of this meter with an embedded ZigBee module (which I don’t have, unfortunately) so I’d hoped there wouldn’t be any interference, but I’m obviously no RF engineer… :slight_smile:

Ok, I feel pretty stupid; Sleep Mode (SM) on this end device is set to 4 — cyclic sleep enabled. So it’s apparently just going to sleep. The default’s to not sleep at all, but this module’s apparently not adhering to the defaults. :slight_smile:

To continue the conversation and answer @admin’s questions, however:
the following values are set for the end device:

SP: 48 0x0030 — sleep period (480ms)
SN: 125 0x007d — number of sleep periods
ST: 5000 0x1388 — time before sleep (5 seconds)
SM: 4 0x04 — sleep mode (4-cyclic sleep enabled)
SO: 0 0x00 — sleep options

and on the coordinator:
SP: 48 0x0030 — sleep period (480ms)
SN: 125 0x007d — number of sleep periods

After sending RE (restore to defaults), the end device shows:
SP: 32 0x0020
SN: 1 0x0001
ST: 5000 0x1388
SM: 4 0x04
SO: 0 0x00

According to the manual (90000976_C), SM should default to 0 and I don’t see that. More curiously, when I attempt to set SM to 0, I get
SM: AT command error (-93)

I’ve set SM to 1 (pin sleep) and I will attempt to actually make use of that functionality in the near future, but for now, that should prevent the XBee from going to sleep, correct?

The Sleep Mode/SM issue is one of firmware types (currently). Since this is End Device firmware, you can’t tell it not to sleep, since that would make it a router. To make it a router, just load the Zigbee Router AT (2241) firmware version instead.

Due to code space restraints, this is currently the way things are done in the 2x41 firmware. When 2x64 is released (in a few days), you will again be able to use the same firmware for Router or End Device. Loading End Device firmware will control what the defaults are when the firmware is loaded in other words, but not which settable sleep options are available like in 2x41.

Here are the details of how this will work from the 2x64 release notes:

Router target can be set as an end device by setting SM > 0. Changing from router to end device, or vice-versa requires the device leave the network and join as the new device type.