Blog IndexPosts by TagHome

Adafruit Feather 32u4 LoRa (RFM69) as a Pager Transmitter

Posted <2024-03-30 Sat 23:21> by Aaron S. Jackson.

Spent the past couple of evenings/days writing some code an Adafruit Feather LoRa board. The 433MHz variant has an RFM69 radio onboard, which conveniently supports FSK with configurable baud rates and frequency deviations. To my surprise, it wasn't actually that difficult to get it to send POCSAG message. I wrote some notes about this which you can read on github. In theory I could hook this up to DAPNET - I'm already using the standard DAPNET frequency (439.9875MHz - which means this requires an amateur radio license).

The challenging part was trying to encode the POCSAG messages. I was torn between trying to write my own, vs using one someone had already written. I eventually settled on the latter and began porting pocsag-tool to AVR. Since the native integer size is 2 bytes, some lines of code which look entirely fine, actually do something completely different. For example,

batches[i] |= (1 << NUM_BITS_INT);

That "1" digit is interpreted as an a 16 bit int, but the shifting was 31, which meant it essentially dropped off. Easily fixed by forcing the type to uint32_t, once you spot the issue.

batches[i] |= ((uint32_t)1 << NUM_BITS_INT);

With a bunch of other small changes such as that, I had it working! And moments later, Parcelforce arrived with the AlphaPoc 602R pager, ordered from Germany. This pager is quite cool because a variety of bands are supported (based on the model you buy), with configurable frequency and multiple RICs (these are your "pager numbers", and on the AlphaPoc they're configurable).

The Adafruit Feather LoRa boards do not have WiFi or Ethernet, but I wanted to bridge my messaging to MQTT. At first I tried an ENC28J60 module but couldn't get it to talk properly - I might come back to this. Instead I wrote a quick ESP8266 sketch to bridge MQTT messages to the UART. And with that, I can send pager messages from MQTT, and since MQTT ties in nicely with Home Assistant automations, silly things around my house, such as…

I'm not sure why my current hyperfixation is pagers but I'm not complaining. Aside from general notifications I'm not sure what else I care to receive notifications about. Still fun though :-)

<2024-04-15 Mon> Update! I designed a small PCB to join the bits together so it wasn't a jumble of wires. The board also adds support for remote power off, which is a license requirement for unattended operation. This is done using GPIO2 of the ESP8266 directly to the Adafruit Feather's enable pin. Pulling this pin low will turn off the 3.3v voltage regulator on the Feather, thus disabling the radio. Originally I was intending to use the 3.3v from the Feather to power the ESP8266, so I ended up adding an LM317 (just because I have lots of them in stock).

I made two boards up, because I'm planning on running one from Nottingham Hackspace, eventually. The final task for this project is to build a case. I will laser cut one at the hackspace, probably spray paint it and add some cool orange decals.

Wanting to leave a comment?

Comments and feedback are welcome by email (aaron@nospam-aaronsplace.co.uk).

Related posts:

Tags: radio electronics hacks

Blog IndexPosts by TagHome

Copyright 2007-2024 Aaron S. Jackson (compiled: Mon 15 Apr 12:59:01 BST 2024)