Why can't an XBee coordinator send to a specific end device? - xbee

I'm experimenting with a pair of XBee S1 modules on XBee Explorer USB interfaces. I have them hooked up to XCTU and have them configured with 16-bit addresses, as follows:
Coordinator
End device
So, coordinator MY address is 0xD0, the other module's MY address is 0xD1.
Using this configuration, I can easily send from the end device to the coordinator, using either transparent or API TX Request (16-bit addressing). This works fine. However, I cannot send from the Coordinator back to a specific end device (transmit always fails). For example, with the configuration exactly as shown, in AT mode, if I open console windows and type in the end device console, it shows up in the Coordinator console. But if I type in the Coordinator console... nothing.
I can get it to work if I send to DL=FFFF (PAN broadcast address) - but I don't want to have to broadcast to all devices. Right now there are only 2 devices so it wouldn't matter, but later there will be more and I need to address them individually.
So is this possible? If so, what am I doing wrong?

Related

Trim frame details in XBee output

I would like to set up 3 XBee devices in API mode, one coordinator, two nodes. The coordinator will send payloads to either one of the nodes and address the XBee frames accordingly. The nodes will send messages only to the coordinator (never to each other).
Is it possible for the serial output of the node modules to trim off all API header/frame/checksum info before passing down data to the serial port (the device they are connected does not understand XBee API frame data). Likewise is it possible for the node modules to automatically add the relevant header/frame/checksum data when sending to the coordinator, again the device connected to the XBee serial port doesn't understand XBee frames so doesn't know how to add the frame data, only the payload.
I have complete control over the software at the coordinator end, so can manage the XBee frame data in my code there.
Yes, it's possible to run the non-coordinator devices in "AT mode" or "Transparent Serial" mode. It's also referred to as "Serial Cable Replacement Mode" because you can replace a serial cable with paired modules.
Configure DH and DL on the non-coordinators as 0 to automatically send serial data to the coordinator.
You can use Transmit API frames on the coordinator to address target nodes, and they will just send the payload out on the serial port.
You can even configure the modules with different baud rates.

C UART not working all the time

I'm having an issue connecting a serial device to an embedded device I'm writing code for.
The device I am writing has two serial ports, an incoming from my laptop, and an outgoing to an external device.
When I connect both terminals to my laptop and view the data, I get exactly the data I am expecting.
When I connect my laptop to the external device directly, I am getting exactly what I expect, and a response.
When I connect the laptop and the external device to the embedded device I am working on, the laptop sends data to it, it receives it, it passes it on to the external device. This works as expected.
However, the external device doesn't send back the response.
If I send data to the external device from the embedded device, each new message I send allows it to send the original reply.
I know the first message got through correctly because the external device whirrs to live, and I know when it is sending the response by running and logic analyser on the tx/rx comms and viewing the traffic.
I considered that the embedded device is holding the rx line and preventing its transmission, but I don't see how that possible in the code. Also if that is the case it shouldn't work when I plug both lines into my laptop.
I also considered the DTR was not set high, but checked this and it appears to be set high.
Does anyone know a reason which would prevent a device from responding?
Note: When I say Serial Ports I am referring to the UART when referring to the embedded device. All device use a DB9 connector running RS232.
Edit: Operating System on laptop is Windows 10. Embedded device is a Atmega324p.
Edit 2: Did some more testing. It appears that it sometimes work and sometimes doesn't.
I have added an image which show a almost perfect signal of the response.
The blue section is a gap in the signal that shouldn't be there.
Ended up finding a solution.
The RTS line was held via the embedded device at 1.2v, while the Pc was holding it at 5.2v.
Pulling the RTS line up to 5v fixed the issue.

Communication between Xbee Series 1 and different RF Module(TI-CC2538)

I want to test communication between Xbee Series 1 and TI CC2538.
I built 802.15.4 protocol on CC2538 and i want to test whether it
can transmit and receive data with Xbee Series 1 through XCTU.
I tried to scan in XCTU program, but it couldn't find any device.
I set scenario that CC2538 RF chip is coordinator and Xbee S1 is a device trying to associate PAN network.
According to 802.15.4, device has to passive scan and receive beacon frame, after then, device should transmit association request mac command to coordinator which is CC2538.
How Xbee series 1 through XCTU's scan button is working ?
Does it wait for receiving Beacon frame or send beacon request or other frame ?
Is there other way to test communication between Xbee s1 and CC2538 with 802.15.4 which i built ?
I assume you are not trying to run ZigBee protocol on the CC2538. The XBee Series 1 is 802.15.4 and you would need to use a Series 2 for ZigBee.
You might need to use an 802.15.4 sniffer to monitor communications to see what's happening. Does the XBee module send a properly formatted association request? Can you capture another CC2538 successfully joining your network, and compare it to the XBee module's attempts to do so?
Make sure that the XBee module is configured with ATSC (Scan Channels) set to enable whatever channel the CC2538 has established.
I know that some XBee modules support an ATAS (Active Scan) command that will report on beacons seen, but I'm not sure whether the Series 1 supports that command. ATAI provides details on association.
Can you enable debugging on the CC2538 and have it report on the XBee module's attempts to join the network?

programming for Xbee meshing

i have one query actually i have 3 xbees series2.
i want xbee 1 (sensor+xbee(end device)) and xbee 2 as coordinator,where XBee2 will be attched to MCU.
now i have xbee 3 which again ((sensor+xbee(end device)).
now i want to make xbee3 also to communicate with coordinator(Xbee2).
now i have kept the same pan ID of Xbee1 and xbee3 as like Xbee2.
and again i have set xbee1 and xbee3 destination address for the Xbee 2 .
now my question are
how do i program the MCU using eclipse environment for receiving both Xbee1 and Xbee3 data?
and i want to communicate all Xbees with UART communication means i want to read data using pin 2 and 3 of Xbee..is it possible??
can anyone provide me the code for developing this procedure???
thanks
This is a common scenario. Run the coordinator in API mode and the end devices (you may want to start with those nodes as routers, and figure out the "sleeping end device" details once everything else is working) in AT mode.
The "AT mode" devices with DH and DL set to 0 will just pass serial data to the coordinator, and the MCU can parse the API frames to determine which device sent the data. The MCU can also address requests to the other devices -- either Remote AT Commands or data to send out the serial port.
Write code for the MCU however you normally would. There's a portable ANSI C library available if that's your language of choice. It can parse the API frames for you and simplify communications on the network.

XBee End device stops responding after network join

I have two XBee S2 modules.
First module has freshly uploaded ZigBee Coordinator API version 21A7. PAN ID = 1000; AP=2; the rest has default values.
Second has freshly loaded ZigBee End Device API version 29A7. PAN ID=1000; AP=2; the rest has default values.
While end device is not joined to coordinator, it responds to all AT commands. For example AT NI command (7E 00 04 08 01 4E 49 5F) returns correct AT Command Response.
After turning on coordinator, end device correctly joins coordinator's network, but stops responding to local (and transmitting remote) AT commands.
Despite this non-functionality end device is correctly responding to remote AT commands from coordinator.
Do you have some idea please?
It sounds like the end device might be sleeping once it's joined to the coordinator. You can't send serial data to it while it's sleeping, and may need to monitor the CTS signal coming from the XBee. Or, make use of the "sleep request" pin on the end device for the host to signal the XBee module to wake up.
If you don't have low power requirements on your project, I'd recommend using a "router" device configuration instead of a sleepy end device. Routers on the network form a mesh for transferring information, and you don't have to worry about multiple issues related to sleeping (host can't send serial data to sleeping end device, remote devices can only have one outstanding frame pending for a sleeping device, etc.)

Resources