Thursday, February 21, 2019

Prototype of SSH over 900MHz XBee

Hey all,

Thought you might be interested in a little project I've been coding lately. Use case if for embedded Linux applications that need long range, low data rate networking. They apparently used to make these 900MHz products called WaveLAN, but the only one on the market today (AvaLAN) costs nearly one grand a pair. So, I wrote a little program in Python to run IP networking over Digi's XBee 900HP (it would work with other XBees, but if 2.4 GHz is acceptable you may as well use WiFi) modules which are only $40 a piece. They have UART and SPI interfaces and of course you can throw in an FTDI chip for USB serial.

The modules have a 200Kbps RF data rate, and actual optimum throughput it only 30Kbps, so this is definitely a use case of M2M, embedded devices (unless you just like dialup speeds). They come with a proprietary DigiMesh protocol which is similar to Ethernet. You program each module's flash with a frequency hopping pattern, preamble, and network ID all of which must match, there is no join/deauth pattern like with WiFi. Regular MACs are used for addressing. The firmware has built-in AES encryption, which would be a good choice as TLS will reduce bandwidth even further.

Rather than broadcasting ARP packets to resolve the IP's, I made use of a "node ID" feature that comes in the DigiMesh protocol. The code sets the Node ID to a string representation of the IP address, and then uses built-in "node discover" feature to . The downside is that this incurs a fixed time penalty because it will always take the timeout to respond back over serial (the responding radio uses this time to avoid interrupting "real" traffic). There is a way to do broadcasts but they are repeated numerous times to ensure transmission across the mesh and so they would have a greater performance impact.

GitHub Link: https://github.com/aidanh010/StrangeNet

Demo Video: https://send.firefox.com/download/19fa2e0025/#vk_kjb8igC2Gn7xewCrhrg

I actually wrote this for my high school robotics team to use for transmitting scouting data at events, because WiFi networks are banned (they are used for the actual robots and they've had interference issues before) and we didn't want to violate the spirit of the rule with a different 2.4 GHz network (they are fine with Bluetooth due to its low power, but its range is not at all suitable). We are using CouchDB so a way to send regular TCP packets was a must.



No comments:

Post a Comment