Skip to content

A payload byte counter for LoRa, written in Micropython

License

Notifications You must be signed in to change notification settings

aprs434/payload-counter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LoRa Payload Counter

This LoRa payload counter is based on Micropython and a modified version of the u‑lora library by Martyn Wheeler. It is intended to work with ESP32, ESP8266 and Raspberry Pi Pico microcontrollers.

Payload counts are those as being reported by the LoRa chip.

Limitations

  • No attempt was made to render this tool user friendly. This might be done in the future. Right now, it is a quick and dirty way of having a LoRa chip count the payload bytes of received LoRa packets.
  • The LoRa sync word is currently fixed to the default LoRaWAN value of 0x34.

1. Installing esptool.py and rshell

$ pip install esptool rshell

2. Installing Micropython

3. Using pyboard.py

The pyboard.py utility comes preinstalled with this repository. Here is the official pyboard.py documentation.

4. Installing the Firmware Scripts

From within the cloned repository folder, copy the firmware scripts main.py and ulora.py to the device flash drive, called :

$ pyboard.py --device /dev/ttyUSB2 -f cp main.py ulora.py :

The correct device port was derived from the dmesg device messages on Linux.

5. Using rshell to Access the Micropython REPL

A device running Micropython has a shell environment, called the read–eval–print loop (REPL). It can be accessed by running the rshell tool.

$ rshell -p /dev/ttyUSB2 -b 115200
repl
  1. After typing repl followed by a Return, hit Ctrl+D to soft reboot the device.
  2. You can now monitor the output of the main.py script running on the device.
  3. Hit once or twice Ctrl+X to leave the REPL and to return to rshell.
  4. Hit Ctrl+D again to leave rshell and to return to the command line.

About

A payload byte counter for LoRa, written in Micropython

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%