read xbee network traffic on xbee hooked to computer - xbee

I have a bunch of equipment that communicate with each other using xbee series 1 radios. I'd like to read that traffic from this network on my computer (which has an xbee hooked to it's USB port). Using XCTU, I can read the traffic for a particular xbee in the network by setting MY in my computer's xbee to the MY of the particular xbee. But what I'd really like to do is read traffic from all of the xbees. How would I configure my xbee to do that? Thanks!

You need to get an 802.15.4 packet sniffer to monitor the 802.15.4 network traffic. It isn't possible to sniff traffic with the XBee module itself.
If you're on a budget, various manufacturers have free software that works with their 802.15.4 dongles. For example, Texas Instruments has sniffer software that works with a $49 USB dongle.

Related

How does serial console communication work in a microcontroller?

My doubt is regarding the physical layer of the communication, I know from practice that for using for example teraterm to communicate with a MCU is simply enabling and configuring an UART peripheral, and then connect via USB the microcontroller and voila.
But it doesnt make sense to me yet that if USB connects to DN and DP, and an UART uses RX and TX, how does the host effectively communicates to the microcontroller?
There are two possibilities.
You connect to a USB/UART bridge such as devices made by FTDI or Prolific,
The microcontroller has a USB device controller and USB stack implementing the CDC/ACM device class (virtual COM port).
In the first instance, the bridge chip presents the CDC/ACM device to the host and exchanges data with a UART connected to the microcontroller UART. I/O control such as setting the baud rate have no impact on the USB connection, rather they are used to configure the UART link.
In the bridge arrangement, the bridge chip may be on the micro board, or it may be in a USB/serial adapter cable. Moreover internally the bridge chip is a microcontroller with a CDC/ACM device stack.
Unlike say RS-232, USB is not a peer-to-peer full duplex connection, and is not merely an electrical connection; USB requires quite complex device and host controllers and is more analogous to a device bus such as PCI than it is to UART serial connections. A CDC/ACM class device conforms to a specific protocol to allow a "virtual" UART to appear at the host. The UART you see at the PC is emulated, and is not physically the UART in the bridge.
The physical actual USB connection is a master-slave connection, with data and I/O control commands (such as baud rate and flow control) sent in USB packets to be unpacked, interpreted and transferred to the application layer via the CDC/ACM USB stack. In this arrangement the device, acting as a slave cannot initiate an exchange; rather the host continuously polls the device to which the device may return a packet containing its "tx" data. The polling and data rate of USB are fast enough to allow the simplex master-slave exchange to emulate a full-duplex UART connection, at higher throughput than can normally be achieved by a typical real UART, and certainly faster than a physical RS-xxx connection.
You can get an idea of how all this works by observing the raw USB data exchange using a tool such as WireShark. You will see that a lot more than just your application "serial" data is being exchanged.
You need to use a uart-usb interface IC that can convert uart to usb (and vice versa).

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?

Is client connected on XBee s6b

I have an XBee S6B setup in wireless access mode and physically connected to a Raspberry PI. I connect my laptop to the XBee WiFi access point and I can send data back and forth between the Raspberry PI and the XBee over WiFi.
Can someone tell me if there is a way for the Raspberry PI to know that the laptop has successfully connected or disconnected? Are there any commands the Raspberry PI can send to the XBee to establish if something has connected/disconnected?
There’s no Node Join frame, but if it’s in Access Point mode then you could just periodically ping the other device. You would know its address since there can’t be more than one external device in AP mode.

Linux Serial Device Server over USB?

I have an embedded Linux solution and want to create a command service over serial USB. The idea being that when a computer connects to my embedded via USB, they see a serial device and send serial commands to me through that port and I send responses back.
I need some help in the direction to proceed. Do I need to emulate a serial device so they see me as a COM port? Is there build in Linux solutions to broadcast my details as a serial device? Are there code examples? I can see block devices connect with my embedded solution like a USB storage device. When I plug into another computer, I would like it to see me as a serial COM port.
I just need help in the direction of which path I should go down to solve this.
Thanks in advance.
What you are looking for is the Linux USB serial gadget. The Linux USB gadgets framework allows devices to behave as a variety of standard USB devices, including serial devices, Ethernet adapters, and mass storage devices.
Note that USB gadgets will only work on targets with a USB controller that can be set to operate as a USB device. Not all USB controllers and target devices are compatible with this configuration. For instance, most PCs have a host-only USB controller, and the Raspberry Pi Model B is not compatible with gadgets because it contains an embedded USB hub upstream of the USB ports. (However, the Pi Zero is fully compatible with gadgets.)

XBee Wi-Fi - decoding UDP packets of sampled data

I just bought an XBee Wi-Fi S6B. (I was expecting it to be similar to the WiFly that can easily post sampled I/O data to a webpage.) I am going to hook two temperature sensors to the analog inputs. Note - there are no Arduinos in this project.
I have configured the XBee to send UDP packets to my computer on port 3054 (0xBEE) - I can see them using Netcat.
My question: Is there any existing software out there for Linux or the Raspberry Pi that can receive these packets and decode them? I'd rather not have to re-invent the wheel. I've searched extensively, but everything I found was for API mode with an arduino attached. I'm interested in just running the XBee with the two temperature sensors.
Many of the search results I've seen are for talking to another XBee connected to my computer via a serial port. I'd rather not buy an extra XBee, because my computer is already on the same network.
Here's a small program I just created to listen for XBEE UDP packets. It listens currently for one temperature sensor, but is easily configurable to add on other sensors.
https://github.com/bseeger/XBEE_Listener

Resources