baycom / rps

Restaurant Paging Service based on ESP32 and SX1278 for Long Range Systems, POCSAG or Retekess
GNU General Public License v3.0
34 stars 9 forks source link

Restaurant Paging Service (RPS)

Restaurant Paging Service based on ESP32 and SX1276/SX1278 using the Long Range Systems Protocol, plain POCSAG, RETEKESS OOK T112 (24bit), RETEKESS OOK TD161 (33bit) or RETEKESS 2-FSK T164.

A video explaining what this thing is good for can be found here: https://youtu.be/AoRPzNYkjQ0 RPS in action

This code is based on the Arduino framework and runs on a Heltec / TTGO SX1278 433Mhz LoRa module (for example from here https://www.ebay.de/itm/SX1278-LoRa-ESP32-0-96-blau-ESP8266-OLED-Display-Bluetooth-WIFI-Lora-Kit-32/152891174278)

Initial Setup

By default RPS sets up an accesspoint (SSID named 'RPS', No Encryption). Connect to the network and enter http://192.168.4.1 as URL into your web browser. Click on the red X to close the number pad. Open the configuration form by clicking on the button 'Settings'. The form is divided into three framesets 'WIFI', 'Transmitter' and 'Paging Service'. Set whatever you need to change. After that press 'Save & Restart'.

Currently frequencies have to be entered with an offset of -9,46kHz (see section 'Troubleshooting').

Settings Dialog

Besides the web frontend there is a HTTP based API at /page with these parameters:

Example:

http://<rps>/page?force=1&pager_number=17&alert_type=1&mode=1&pocsag_baud=1200&pocsag_telegram_type=2&message=this%20is%20a%20test

When using POCSAG with the LRS alpha numeric pagers the pager number (POCSAG address) is calculcated like that:

POCSAG address = (pager_num & 0x1fff) * 8 + 700000

In POCSAG-Mode programming pagers follows this scheme:

- Set welcome message: 
  Message 1: Address 100008, Function 3, Beep
  Message 2: Address 100000, Function 3, Alpha: [W<text>]
  Example: [WTest]

- Set addresses:
  Message 1: Address 100008, Function 3, Beep
  Message 2: Address 100000, Function 3, Alpha: [C10<single-address>]
  Example: [C10700008] = 1
  Message 3: Address 100008, Function 3, Beep
  Message 4: Address 100000, Function 3, Alpha: [C20<all-address>]
  Example: [C20707288] = 911
  Message 5: Address 100008, Function 3, Beep
  Message 6: Address 100000, Function 3, Alpha: [C30<system-address>]
  Example: [C30700000] = 0

Factory Reset

A factory reset can be issued by pressing the 'PRG' button (GPIO0) for more than 5 seconds.

Over The Air (OTA) Updates

There is a shell script called 'deploy' which generates a suitable configuration file for OTA. For proper OTA operation you have to increase the 'VERSION_NUMBER' in version.h for every new version. Set your update server location via web frontend at 'OTA URL'.

Building the code

This project uses Microsoft Visual Studio Code with PlattformIO. If you make changes to the web content in the data folder you have to run the script 'mkinc' in the include folder. The project depends on these libraries:

Troubleshooting