almeyras / IP-over-LoRa

Bash and Python scripts to get IP over LoRa working on Raspberry Pi using a variety of EBYTE chips and programs (tncattach, kissattach, slattach, pppd...).
11 stars 2 forks source link

IP over LoRa

Collection of scripts aimed for configuring EBYTE E22 / E32 UART LoRa modules along with Raspbian for serial transmission using LoRa modulation. EBYTE modules are kind of different from typical modules: they use serial UART protocol instead of the SPI protocol of barebone LoRa modules. They include an MCU on top of the barebone LoRa radio for making UART conversion possible and managing config and Tx/Rx buffers.

The pinout used for connecting the EBYTE modules to the Raspi is:

EBYTE | Raspberry

If you have a Waveshare LoRa HAT, then lucky you, I chose the same pinout.

EBYTE chip configuration

Keep in mind that EBYTE chips are configured via UART just like a normal binary frame transmission but setting M0=1, M1=0 before. You can do it via GPIO (3.3V for high) or jumper wires.

If you use E22 and have Windows installed, you can go for the easy option with the app RFSetting. In other case, you will have to send the configuration frame using the config scripts below. Refer to the user manual of your precise module for detailed information.

Warning: Always comply with your national usage restrictions. Unlicensed ISM bands are also regulated. When configuring your radio settings, pay special attention to: EIRP (max Tx power + ant gain), bandwidth, and duty cycle/LBT).

Scripts

Before you start:

Now, for the IP over LoRa scripts...

Fully commented configuration scripts. In order to the modules to communicate in the same network, these scripts have to be configured with similar parameters:

Point to point transmission with TNC Attach:

Point to point transmission with PPPD:

Point to point transmission with Serial Line Internet Protocol Attach (SLIP attach, slattach):

Point to multipoint transmission with TNC Attach:

Interesting links