Viewing blog entries in category: #Digi
As part of our project Hudson River "The River that Flows Both Ways" with my daughter, let's setup our communications device: the Digi XBee3 Cellular Module.
Spoiler: Now that we got to play with the Digi Development Kit, it may have just uprooted out entire plans (for the good). MicroPython to the rescue!
A Brief Introduction to XBee Communications
XBee modules allow two or more devices to talk bi-directional using serial ports via a wireless connection. You typically configure and load firmware directly onto the XBee modules; and, once they are powered on, they can connect to each other and transmit and receive data. Your device connected to the XBee module just needs to open a serial port to start sending bytes directly, which transmits to another XBee device where the bytes are received.
(Photo courtesy of Embedded Basics)
There are many projects out there showing many forms of these communications. However, we have a different setup this time around: the XBee3 Cellular Module.
The Digi XBee3 Cellular Module
This particular flavor of the XBee family has a unique feature in that it can connect via cellular, as the name implies. Something else not really mentioned in the sparse packaging was that it also has a Bluetooth radio! We won't be using that this time around as our project is too far away for that. We can also disable the Bluetooth radio to save power consumption as well.
Setting up an XBee3
Digi requires you to install software called Digi XCTU to configure and write the firmware to XBee modules. For this development kit we are using, Digi has setup a Setup Guide that walks you through step by step how to setup and configure the device to connect to your LTE carrier.
It took a little digging around the Digi website; but, we eventually found the full documentation to this device - and much more!
The additional examples all worked as well. My daughter especially had some funny conversations with the ELIZA Therapist Bot example (tip: don't use Eliza as a real therapist).
Connects Directly to Server?!
During the setup process, I was surprised by all the different methods of Cellular connectivity this module has:
The example demos in the documentation all center around TCP. However, I am eyeing that SMS option for a future project. And, UDP is quite interesting for increasing some bandwidth by lowering the overhead of the TCP stack.
However, even more surprising was that I could configure a "Destination Address" - to connect directly to a remote IP and TCP port!
This means I do not need another remote XBee3 Cellular module. I just need this one device to talk to a remote server!
MicroPython - On the XBee3!?
The surprises didn't end there. The documentation then calls out MicroPython availability directly on the device! It promotes this feature as:
> You can use MicroPython to enhance the intelligence of the XBee to enable you to do edge-computing by adding business logic in MicroPython, rather than using external components.
Considering our entire project was based on setting up a Raspberry Pi Zero to take a few base sensor data and send it over the XBee3, we may be able to eliminate the RPi all together and use the XBee3 Cellular module instead!
This is just too cool.
In the next session, we'll focus on the MicroPython's abilities on the XBee3 to put it through it's paces with a few sensors.