On-air

To check if I actually got it right, I lifted the data-out pin from the PCB and hooked it up to an AT90USB1287 I had lying around. By toggling one of the pins, I was finally able to simulate sending messages to the pager! Took me a while to get everything right though...

In the meantime I bought an entire box of pagers for next to nothing online, to test if I could alphanumeric paging to work as well. Yep! Worked great (after some debugging of course). Cool, now what. All these pagers, sorta kinda working (wired to an AVR). Would it be possible to send messages wirelessly?

Well... sure. Paging providers are doing it too, so why wouldn't I be able to do it? Thing is, it's slightly illegal to send out messages on existing pager frequencies. Even if you don't give a rats ass about the law, think of the possible consequences. Some emergency service might miss a page because you're jamming their page. That would totally suck. If you absolutely want to transmit these signals into the ether, you need to do this on a frequency you're allowed to use. Get a HAM license, buy a new crystal for your pager in the same band as the original crystal, and solder it in. Please. You've been warned. If you get fined or arrested, or if aliens spawn in your living room, it's not my fault. Also be careful not to set your hair on fire. It really hurts and smells terrible. Even if you changed the frequency and all that, transmit into a dummy load using the least possible power. I don't want my or your programming mistakes to cause trouble. I am not liable for anything bad that happens if you choose to follow these instructions. Phew, got that out of the way. Cool.

POCSAG is transmitted (at least it is here in the Netherlands) using FSK with a 4,5 kHz shift centered around certain frequencies in the UHF range. In order to transmit this ourselves we need a transmitter that can be controlled by an AVR. Some experiments have been done with Baofeng UV-5R transmitters, but I'm not sure the baofeng chips can be instructed to shift its frequency around about 2400 times a second. A very cheap and useful alternative is the SI4432 module that can be bought cheaply on eBay (around $3 a pop). It's a pretty cool module that allows transmissions anywhere from 240 to 500 mhz. It can do stuff like packet handling on the chip itself, which is pretty sweet. It can be configured to generate an FSK signal, and can take its input from one of GPIO pins. Everything we need! Some research transmitting POCSAG using these devices has already been done by [ON1ARF], but it's based around Arduino. They're also using the same modules. Cool for some people, but I prefer programming in Atmel Studio and use their debugging tools. DebugWire for the win! I did use his CRC-generating code because I was too lazy.

Migrating from toggling the dataout pin on the radio board to the SI4432 board proved to be very straightforward. Just hook up the module using SPI, configure GPIO and frequency, and tell the module to start transmitting. Then, toggle the data pin just like we did in the wired prototype.

Again! Be careful when you transmit! The modules I bought of of ebay have a very cheap crystal oscillator that drifts. The SI4432 chip has a built-in temperature sensor and AD converter that may be used to improve the frequency drift of the oscillator, but I didn't implement any of that. In order to tune the crystal, you can enter a specific offset in a certain register. Use something like a RTL-SDR to adjust this offset. Make sure your RTL-SDR is calibrated using a known good source, because those things aren't known for their stability and accuracy either. Funny artifact: If you have a pager lying around, that pager might cause small periodic bursts of interference when it turns on its radio. If you're wondering what it is, it's exactly that.