So, this "project" was something I poked at between spring and autumn of 2021. Can't remember everything, but hopefully this is enough for you to do the same. I'm not experienced in electronics or Arduinos so you might notice that.
Anyway, watched the Hackers movie about a year ago and after that I had to have a Motorola Advisor pager. Bought one on Ebay and once it got from Kazakhstan, though Customs and all, to my hands, I noticed that it was on a marine VHF frequency. Luckily you can pull the radio receiver board out easily and put different one in, but those things are rare around here and/or I'd need a license to send messages... Then I had this MotoLoRa brainfart, which I'm trying to document here.
Parts used
- Obviously Motorola Advisor -- the "vanilla" one works, not sure about newer (Gold, Advisor II, Elite, etc.) models.
- Arduino Pro Mini, 3.3 volt version.
- RFM95W LoRa module.
- No-name voltage booster; boosts voltage to 3 volts from as low as 0.7 volts. Found here for example [Ebay.com].
My Advisor is actually Advisor Linquist which, AFAIK, knows Cyrillic characters, but no idea about other differences.
Lousy wiring graph
Connections
Advisor pager pin | Arduino Pro Mini pin | RFM95W module pin |
13 | SCK | |
12 | MISO | |
11 | MOSI | |
10 | SS | |
5 | RST | |
2 | DIO0 | |
9 | DIO1 | |
4 | 7 | |
7 | 3 |
Pager pin 1 is the one furthest away from the AA battery.
Wiring power
The no-name voltage booster has three pins: voltage in, ground, voltage out:
- Voltage in: wire to battery plus terminal.
- Voltage out: wire to Arduino VCC pin next to TXD, RXD, etc.
- Ground: ground pin on Arduino (next to pin 2) has a pin with two plastic spacers, wire to battery minus terminal.
LoRa module gets its power from Arduino: ground (between RST and RAW) and VCC (next to RST).
Advisor has one pin on the header (pin 1/B++), which outputs just above three volts, but apparently not enough current: Pro Mini got enough, but LoRa module caused the pager to shut down immediately. Another pin on the header (pin 3/B+) has battery voltage on it, but didn't bother to try it, because for me it's very annoying to solder wires to the header. (If you go too far and start making boards, this might be a way to power the board by not wiring directly to the battery.)
Rest of the hardware
If you wire everything neat enough, the combination of boards will be about the same size as original radio board. Sticked mine to the pager's board using double sided tape.
To reduce power consumption: knock off the useless LED on the Arduino, since it won't be visible. Some say the voltage regulator should be removed too, but I didn't bother, because I read about it after I had soldered the voltage booster board over the Arduino.
Since the LoRa module requires an antenna, I soldered a random wire to the module and put the wire around the pager's edges -- in photos it might look like its other end is connected back to the LoRa module, but it's not. Seem to receive alright, but I haven't tested its range.
Alright, hardware is good enough so software is next...
Basic idea
- Message is sent over LoRa in [RIC]:[message] format, like 12345:Hello over LoRa.
- LoRa board receives the message and throws it to Arduino.
- Arduino checks the message if it has a number and a colon in the beginning. If not, Arduino discards the message, but if it does...
- Arduino generates a POCSAG message and sends it to pager.
- Arduino resets itself to clean its slate.
Thanks to rpitx
Most of the crucial code is stolen from rpitx project, which is written for Raspberry Pi, so obviously it will not even fit modest Pro Mini as-is. That's why I removed all unnecessary stuff (like sending numeric pages). Also, running the code on Pro Mini required a tiny modification; the original line "uint32_t denominator = 0b11101101001 << 20;" caused that the denominator variable was always zero -> CRC was invalid and pager ignored everything. Looks stupid for a reason.
Interfacing with the pager
Arduino talks to the pager via pager header pin 4 by flipping its pin high & low. And yes, it needs to be a POCSAG message like Jason/coolacid pointed out on a tweet. I thought pager wants serial data, because pager schematics said SDI, SCK, SS and DATA on the pins, and I was silly enough to believe the schematics and wasted too much time & money to figure out why I don't see the clock signal. D'oh, but let's move on.
Arduino keeps an eye on pager header pin 7. Every x milliseconds (depends on configured baud rate) there's a short pulse, which enables original radio board to listen if there's a preamble in the air, I guess, and keeps it enabled if there's interesting stuff for the pager. That's a good enough way to figure out if the pager is on or off: if Arduino won't see the pulse for ~10 seconds, Arduino shuts off LoRa module, goes to deep sleep and waits for a change on its pin 3. When the pager is turned on, there's a quite long pulse, which kicks Arduino out of its sleep. That's how we'll save battery when pager is off.
Stuff in the code
If you look at the code, Arduino does some resets. They're there to... uhm, clean the slate. Since the functions generating POCSAG messages are from code for big'n'powerful Raspberry Pi, Arduino can do 2-3 messages and then something goes sideways, serial port throws trash, and so on.
Getting back up takes just a few seconds, so I don't think it's a big deal, and rather than explaining that I'm not experienced Arduino programmer, I'll call it "anti-spam" feature.
Speaking of features:
LoRa module settings are saved to Arduino's EEPROM and you can tweak them over Arduino's serial port by using an interactive menu system thingy. No need to flash the whole Arduino to change frequency or other little thing.
"POCSAG Keepalive" which makes Arduino to send null message to pager every x minutes, if you're programmed your pager to use "out of range" timer: antenna icons on the screen mean Arduino isn't running due to low battery or other fault.
The menu doesn't have RIC/CAP code setting, because the Arduino+LoRa module set does exactly like the original radio board: it does not care about the codes, it's up to the pager to react or not.
However, baud rate is fixed to 512.
You might notice in code that POCSAG bits are inverted so "Data Inversion" needs to be off in pager settings. Arduino sees pager pins high by default so the logic is inverted.
That's all, folks. I hope I remembered to mention all the required details.