M17 packet mode reception with a RPi Zero CC1200 hotspot shield

Remember our CC1200 shield for Raspberry Pi Zero? After about a year of stall, I pulled it out of my drawer to test its M17 packet mode reception capabilities. Since the hardware bug in the PCB is minor and doesn’t even seem to affect the device’s operation, I was all set. By the way: all the open issues on its GitHub should be addressed soon.

Now, a quick reminder: CC1200 is a complete RF transceiver chip from Texas Instruments. It covers 70cm amateur band and allows for arbitrary frequency modulation schemes use. In our case, that’s M17 with its square root raised cosine filtered 4FSK. The chip has been proved to offer much better RF and baseband performance than the popular ADF7021. The latter remains popular, as there are numerous boards and shields using it along with a well-known software suite.

The transmitter was my modified Nokia 3310. I used my favorite (and actually IARU-R1 designated!) frequency of 433.475 MHz.

Let’s move on to the receiver part. RPi-interface (and therefore CARI with its commands) was used to control the CC1200 shield over UART (/tty/AMA0) – the reception frequency and baseband’s sample rate were set. To pass the baseband stream further, I used picocom:

picocom /dev/ttyAMA0 -b 460800 > /tmp/fifo1

Use of this named pipe was required to move further with the GNU Radio flowgraph including a symbol synchronizer. Its output was set to another named pipe: /tmp/fifo2. The flowgraph expects a baseband stream coming from the RF chip at 24 kHz sample rate. Each sample received over UART is a signed 8-bit value, so conversion to floats was necessary. One tricky part was to set the scale coefficient just right, so the 4FSK-RRC symbol set of \(\{-3, -1, +1, +3\}\) had correct amplitudes. Plotting a histogram using a short filtered baseband data dump helped a lot. As an extra, the flowgraph removes the DC component of the signal by subtracting a moving average calculated over the last 100ms. The CC1200 offers an internal AFC that can be enabled, but I was too lazy to mingle with the rpi-interface code to enable it.

After generating the python code for the flowgraph, one line of it required a quick edit to be executable by Raspberry Pi’s GNU Radio 3.8:

gr.top_block.init(self, "Headless M17 symbol synchronizer", catch_exceptions=True)

The catch_exceptions=True part had to be removed. From there, it was easy-peasy. To test the whole setup, I used m17-packet-decode from the M17_Implementations tool set.

The decode was flawless. Time to move on to something more meaningful: transferring packets to a reflector. This is the point where I used marvellous Go code from Jim N1ADJ.

All my text messages reached the reflector and were successfully passed to connected clients.

Many thanks to both Jim N1ADJ and Tom N7TAE for helping me out with the Internet side of the M17 protocol. You guys are awesome.

Comments

2 responses to “M17 packet mode reception with a RPi Zero CC1200 hotspot shield”

  1. Martin O'Shield Avatar

    Extra Cool! Thanks for posting this and if you ever put everything on a Github, that would be great!

    1. Wojciech Kaczmarski Avatar

      It’s all on GitHub already 🙂 Send me an email if you can’t find a particular thing, or just ask here, I’ll help you out.

Leave a Reply

Your email address will not be published. Required fields are marked *