A couple of weeks ago, I started working on another of my infinite small projects.
This time, I needed a tool that could show me what was going on with another piece of firmware I was working on that was transmitting data regularly in the unlicensed 2.4 GHz frequency band.
The problem is this: I have multiple transmitters using the same frequency to send data to a single receiver. When the data rate starts to creep upward and the interval between transmissions decreases, you start getting serious resource contention.
It’s a classic multi-user situation, which is solved in other wired and wireless standards using things like Carrier Sense Multiple Access / Collision Detection (CSMA/CD). (In Ethernet or Wi-Fi, example.)
I don’t have access to the specialized off-the-shelf tooling needed to monitor the radio spectrum (it’s pretty expensive). So I decided to build my own, very limited, very specific tool.
That tool is Noisefloor, a small tool to help me visualize and debug a Time Division Multiple Access multiplex scheme by sampling the TDMA timeslot and plotting out when the various nodes are transmitting.
Specifically: the nRF51422, nRF52832, and nRF52840.
That’s right, there’s a single binary file to load, compiled to the ARM v6-M specification, that runs on the off-the-shelf nRF51-DK, nRF52-DK, and nRF52840 Dongle development boards.
Part of the fun of developing this firmware was figuring out how to do write-once, run-anywhere code that dynamically adapts to the underlying microcontroller.
Anyways, thus far, I’ve pushed three posts out on the topic, and am documenting it as I go, including Requirements and Architecture specs. The code is almost feature-complete, and I’ll be slowly writing that up, too.
Print pages 1, 3 and 2, 4 back-to-back on the same piece of paper, and you can always see 6 months at a time by flipping and placing the sheets next to each other.
For instance, when checking some images I can see that there’s a ton of EXIF information in there, including the precise location where the image was taken:
✔ ~/blog
$ exiftool ./2019/11/IMG_20191111_2029432-825x510.jpg
ExifTool Version Number : 11.76
[...]
GPS Version ID : 2.2.0.0
GPS Latitude Ref : North
GPS Longitude Ref : East
GPS Altitude Ref : Above Sea Level
GPS Time Stamp : 19:29:43
GPS Dilution Of Precision : 16.132
GPS Img Direction Ref : Magnetic North
GPS Img Direction : 178
GPS Processing Method : fused
GPS Date Stamp : 2019:11:11
[...]
GPS Altitude : AA.A m Above Sea Level
GPS Date/Time : 2019:11:11 19:29:43Z
GPS Latitude : DD deg MM' SS.SS" N
GPS Longitude : DD deg MM' SS.SS" E