This is a project I’ve been working on intermittently for 4 or 5 years. Many of you probably know that railfans listen for the audible bursts of data from the EOT and HOT (end-of-train, head-of-train) transceivers to get advanced warning of a coming train. Several years ago, a guy named Matt Shelburne created a Windows program called SoftEOT to decode the transmissions. I have no interest in running Windows, and wanted to build a handheld decoder, so I started reverse engineering the protocol. It took a LOOOOONG time. AREMA does NOT want you know how this stuff works.
Last summer, I finally pulled the pieces together and developed a Python program that can generate arbitrary packets, including the BCH encoding and (very light) encryption. Once I had a packet generator, I could start working on receiving/demodulating/slicing/decoding/validating packets. I got distracted, but finally circled back this week, and got it working!
In the video below, I’m looping a wave file (recorded from a scanner) though a GNU Radio flow that demodulates the AFSK signal and slices it into a bitstream. The bitstream is fed to a TCP port. In the terminal window, I’m running a Python script that monitors the bitstream. When it sees the sync word, it grabs the packet that follows, decodes and validates it, and prints some of the interesting data to the screen.
My vision is to have a fleet of Raspberry Pis with RTL-SDR dongles along the rail line, feeding data to central server.