esp-idf-sx126x
SX1262/SX1268/LLCC68 Low Power Long Range Transceiver driver for esp-idf
- 154
- C
- MIT
- 2 mo ago
Raspberry Pi python library to connect EByte E220 (LLCC68) devices
Repo xreef/EByte_LoRa_E220_python_raspberrypi_library, read from GitHub 2 h ago. xreef has not joined Take My Repo.
xreef/EByte_LoRa_E220_python_raspberrypi_library is a public repo on GitHub by xreef. Raspberry Pi python library to connect EByte E220 (LLCC68) devices. It declares no license on GitHub. Public does not mean open source: without a license, nobody is granted the right to reuse it. It is written mainly in Python, has 7 stars and last changed on 2025-01-28. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read from GitHub on 2026-11-23.
In the maintainer's words. Shown from GitHub; Take My Repo does not keep a copy.
To install the library execute the following command:
pip install ebyte-lora-e220-rpi
Here an example of constructor, you must pass the UART interface and (if you want, but It's reccomended) the AUX pin, M0 and M1.
from lora_e220 import LoRaE220
import serial
loraSerial = serial.Serial('/dev/serial0') #, baudrate=9600, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, bytesize=serial.EIGHTBITS)
lora = LoRaE220('400T22D', loraSerial, aux_pin=18, m0_pin=23, m1_pin=24)
code = lora.begin()
print("Initialization: {}", ResponseStatusCode.get_description(code))
from lora_e220 import LoRaE220, print_configuration
from lora_e220_operation_constant import ResponseStatusCode
code, configuration = lora.get_configuration()
print("Retrieve configuration: {}", ResponseStatusCode.get_description(code))
print_configuration(configuration)
The result
----------------------------------------
Initialization: {} Success
Retrieve configuration: {} Success
----------------------------------------
HEAD : 0xc1 0x0 0x8
AddH : 0x0
AddL : 0x0
Chan : 23 -> 433
SpeedParityBit : 0b0 -> 8N1 (Default)
SpeedUARTDatte : 0b11 -> 9600bps (default)
SpeedAirDataRate : 0b10 -> 2.4kbps (default)
OptionSubPacketSett: 0b0 -> 200bytes (default)
OptionTranPower : 0b0 -> 22dBm (Default)
OptionRSSIAmbientNo: 0b0 -> Disabled (default)
TransModeWORPeriod : 0b11 -> 2000ms (default)
TransModeEnableLBT : 0b0 -> Disabled (default)
TransModeEnableRSSI: 0b0 -> Disabled (default)
TransModeFixedTrans: 0b0 -> Transparent transmission (default)
----------------------------------------
You can set only the desidered parameter, the other will be set to default value.
configuration_to_set = Configuration('400T22D')
configuration_to_set.ADDL = 0x02
configuration_to_set.ADDH = 0x01
configuration_to_set.CHAN = 23
configuration_to_set.SPED.airDataRate = AirDataRate.AIR_DATA_RATE_100_96
configuration_to_set.SPED.uartParity = UARTParity.MODE_00_8N1
configuration_to_set.SPED.uartBaudRate = UARTBaudRate.BPS_9600
configuration_to_set.OPTION.transmissionPower = TransmissionPower('400T22D').\
get_transmission_power().POWER_10
# or
# configuration_to_set.OPTION.transmissionPower = TransmissionPower22.POWER_10
configuration_to_set.OPTION.RSSIAmbientNoise = RssiAmbientNoiseEnable.RSSI_AMBIENT_NOISE_ENABLED
configuration_to_set.OPTION.subPacketSetting = SubPacketSetting.SPS_064_10
configuration_to_set.TRANSMISSION_MODE.fixedTransmission = FixedTransmission.FIXED_TRANSMISSION
configuration_to_set.TRANSMISSION_MODE.WORPeriod = WorPeriod.WOR_1500_010
configuration_to_set.TRANSMISSION_MODE.enableLBT = LbtEnableByte.LBT_DISABLED
configuration_to_set.TRANSMISSION_MODE.enableRSSI = RssiEnableByte.RSSI_ENABLED
configuration_to_set.CRYPT.CRYPT_H = 1
configuration_to_set.CRYPT.CRYPT_L = 1
# Set the new configuration on the LoRa module and print the updated configuration to the console
code, confSetted = lora.set_configuration(configuration_to_set)
I create a CONSTANTS class for each parameter, here a list: AirDataRate, UARTBaudRate, UARTParity, TransmissionPower, ForwardErrorCorrectionSwitch, WirelessWakeUpTime, IODriveMode, FixedTransmission
Here an example of send data, you can pass a string
lora.send_transparent_message('pippo')
lora.send_fixed_message(0, 2, 23, 'pippo')
Here the receiver code
while True:
if lora.available() > 0:
code, value = lora.receive_message()
print(ResponseStatusCode.get_description(code))
print(value)
time.sleep(2)
If you want receive RSSI also you must enable it in the configuration
configuration_to_set.TRANSMISSION_MODE.enableRSSI = RssiEnableByte.RSSI_ENABLED
and set the flag to True in the receive_message method
code, value, rssi = lora.receive_message(True)
Result
Success!
pippo
Here an example of send data, you can pass a dictionary
lora.send_transparent_dict({'pippo': 'fixed', 'pippo2': 'fixed2'})
lora.send_fixed_dict(0, 0x01, 23, {'pippo': 'fixed', 'pippo2': 'fixed2'})
Here the receiver code
while True:
if lora.available() > 0:
code, value = lora.receive_dict()
print(ResponseStatusCode.get_description(code))
print(value)
print(value['pippo'])
time.sleep(2)
if you want receive RSSI also you must enable it in the configuration
configuration_to_set.TRANSMISSION_MODE.enableRSSI = RssiEnableByte.RSSI_ENABLED
and set the flag to True in the receive_dict method
code, value, rssi = lora.receive_dict(True)
Result
Success!
{'pippo': 'fixed', 'pippo2': 'fixed2'}
fixed
LoRa Smart Home (LLCC68) is a sub-GHz LoRa® RF Transceiver for medium-range indoor and indoor to outdoor wireless applications. SPI interface. Pin-to-pin is compatible with SX1262. SX1261, SX1262, SX1268, and LLCC68 are designed for long battery life with just 4.2 mA of active receive current consumption. The SX1261 can transmit up to +15 dBm, and the SX1262, SX1268, and LLCC68 can transmit up to +22 dBm with highly efficient integrated power amplifiers.
These devices support LoRa modulation for LPWAN use cases and (G)FSK modulation for legacy use cases. The devices are highly configurable to meet different application requirements for consumer use. The device provides LoRa modulation compatible with Semtech transceivers used by the LoRaWAN® specification released by the LoRa Alliance®. The radio is suitable for systems targeting compliance with radio regulations, including but not limited to ETSI EN 300 220, FCC CFR 47 Part 15, China regulatory requirements, and the Japanese ARIB T-108. Continuous frequency coverage from 150MHz to 960MHz allows the support of all major sub-GHz ISM bands around the world.
| LLCC68 | SX1278-SX1276 | |
|---|---|---|
| Distance | > 11Km | 8Km |
| Rate (LoRa) | 1.76Kbps – 62.5Kbps | 0.3Kbps – 19.2Kbps |
| Sleep power consumption | 2µA | 5µA |
Library for Ebyte LoRa E220 LLCC68 device for Arduino, esp32 or esp8266.
| Pin No. | Pin item | Pin direction | Pin application |
|---|---|---|---|
| 1 | M0 | Input(weak pull-up) | Work with M1 & decide the four operating modes. Floating is not allowed; it can be ground. |
| 2 | M1 | Input(weak pull-up) | Work with M0 & decide the four operating modes. Floating is not allowed; it can be ground. |
| 3 | RXD | Input | TTL UART inputs connect to external (MCU, PC) TXD output pin. It can be configured as open-drain or pull-up input. |
| 4 | TXD | Output | TTL UART outputs connect to external RXD (MCU, PC) input pin. Can be configured as open-drain or push-pull output |
5 | AUX | Output | To indicate the module’s working status & wake up the external MCU. During the procedure of self-check initialization, the pin outputs a low level. It can be configured as open-drain or push-pull output (floating is allowed). |
| 6 | VCC | Power supply 3V~5.5V DC | |
| 7 | GND | Ground |
As you can see, you can set various modes via M0 and M1 pins.
| Mode | M1 | M0 | Explanation |
|---|---|---|---|
| Normal | 0 | 0 | UART and wireless channels are open, and transparent transmission is on |
| WOR Transmitter | 0 | 1 | WOR Transmitter |
| WOR Receiver | 1 | 0 | WOR Receiver (Supports wake up over air) |
| Deep sleep mode | 1 | 1 | The module goes to sleep (automatically wake up when configuring parameters) |
Some pins can be used statically, but If you connect them to the microcontroller and configure them in the library, you gain in performance and can control all modes via software. Still, we are going to explain better next.
As I already said, It’s not essential to connect all pins to the microcontroller’s output; you can put M0 and M1 pins to HIGH or LOW to get the desired configuration. If you don’t connect AUX, the library set a reasonable delay to ensure that the operation is complete (If you have trouble with the device freezing, you must put a pull-up 4.7k resistor or better connect to the device. ).
When transmitting data can be used to wake up external MCU and return HIGH on data transfer finish.
When receiving, AUX goes LOW and returns HIGH when the buffer is empty.

It’s also used for self-checking to restore regular operation (on power-on and sleep/program mode).

LoRa or Long Range wireless data telemetry is a technology pioneered by Semtech that operates at a lower frequency than NRF24L01 (433 MHz, 868 MHz, or 916 MHz against 2.4 GHz for the NRF24L01) but at thrice the distance (from 5000m to 11000m).
| Name | Description | Address |
|---|---|---|
| ADDH | High address byte of the module (the default 00H) | 00H |
| ADDL | Low address byte of the module (the default 00H) | 01H |
| SPED | Information about data rate parity bit and Air data rate | 02H |
| OPTION | Type of transmission, packet size, allow the special message | 03H |
| CHAN | Communication channel(410M + CHAN*1M), default 17H (433MHz), valid only for 433MHz device check below to check the correct frequency of your device | 04H |
| OPTION | Type of transmission, packet size, allow the special message | 05H |
| TRANSMISSION_MODE | A lot of parameters that specify the transmission modality | 06H |
| CRYPT | Encryption to avoid interception | 07H |
UART Parity bit: UART mode can be different between communication parties
| UART parity bit | Constant value |
|---|---|
| 8N1 (default) | MODE_00_8N1 |
| 8O1 | MODE_01_8O1 |
| 8E1 | MODE_10_8E1 |
| 8N1 (equal to 00) | MODE_11_8N1 |
UART baud rate: UART baud rate can be different between communication parties (but not reccomended). The UART baud rate has nothing to do with wireless transmission parameters & won’t affect the wireless transmit/receive features.
| TTL UART baud rate(bps) | Constant value |
|---|---|
| 1200 | UART_BPS_1200 |
| 2400 | UART_BPS_2400 |
| 4800 | UART_BPS_4800 |
| 9600 (default) | UART_BPS_9600 |
| 19200 | UART_BPS_19200 |
| 38400 | UART_BPS_38400 |
| 57600 | UART_BPS_57600 |
| 115200 | UART_BPS_115200 |
Air data rate: The lower the air data rate, the longer the transmitting distance, better anti-interference performance, and longer transmitting time; the air data rate must be constant for both communication parties.
| Air data rate(bps) | Constant value |
|---|---|
| 2.4k | AIR_DATA_RATE_000_24 |
| 2.4k | AIR_DATA_RATE_001_24 |
| 2.4k (default) | AIR_DATA_RATE_010_24 |
| 4.8k | AIR_DATA_RATE_011_48 |
| 9.6k | AIR_DATA_RATE_100_96 |
| 19.2k | AIR_DATA_RATE_101_192 |
| 38.4k | AIR_DATA_RATE_110_384 |
| 62.5k | AIR_DATA_RATE_111_625 |
This is the max length of the packet.
When the data is smaller than the subpacket length, the serial output of the receiving end is an uninterrupted continuous output. The receiving end serial port will output the subpacket when the data is larger than the subpacket length.
| Packet size | Constant value |
|---|---|
| 200bytes (default) | SPS_200_00 |
| 128bytes | SPS_128_01 |
| 64bytes | SPS_064_10 |
| 32bytes | SPS_032_11 |
This command can enable/disable the management type of RSSI, and It’s essential to manage the remote configuration. Pay attention isn’t the RSSI parameter in the message.
When enabled, the C0, C1, C2, C3 commands can be sent in the transmitting mode or WOR transmitting mode to read the register. Register 0x00: Current ambient noise RSSI Register 0X01: RSSI when the data was received last time.
| RSSI Ambient noise enable | Constant value |
|---|---|
| Enable | RSSI_AMBIENT_NOISE_ENABLED |
| Disable (default) | RSSI_AMBIENT_NOISE_DISABLED |
You can change this set of constants by applying a define like so:
#define E220_22 // default value without set
Applicable for E220 with 22dBm as max power.
Low power transmission is not recommended due to its low power supply efficiency.
| Transmission power (approximation) | Constant value |
|---|---|
| 22dBm (default) | POWER_22 |
| 17dBm | POWER_17 |
| 13dBm | POWER_13 |
| 10dBm | POWER_10 |
Applicable for E220 with 30dBm as max power.
Low power transmission is not recommended due to its low power supply efficiency.
#define E220_30
| Transmission power (approximation) | Constant value |
|---|---|
| 30dBm (default) | POWER_30 |
| 27dBm | POWER_27 |
| 24dBm | POWER_24 |
| 21dBm | POWER_21 |
You can configure Channel frequency also with this define:
// One of #define FREQUENCY_433 #define FREQUENCY_170 #define FREQUENCY_470 #define FREQUENCY_868 #define FREQUENCY_915
When enabled, the module receives wireless data, and it will follow an RSSI strength byte after output via the serial port TXD
| Enable RSSI | Constant value |
|---|---|
| Enable | RSSI_ENABLED |
| Disable (default) | RSSI_DISABLED |
Transmission mode: The first three bytes of each user’s data frame can be used as high/low address and channel in fixed transmission mode. The module changes its address and channel when transmitted. And it will revert to the original setting after completing the process.
| Fixed transmission enabling bit | Constant value |
|---|---|
| Fixed transmission mode | FT_FIXED_TRANSMISSION |
| Transparent transmission mode (default) | FT_TRANSPARENT_TRANSMISSION |
When enabled, wireless data will be monitored before it is transmitted, avoiding interference to a certain extent, but may cause data delay.
| LBT enable byte | Constant value |
|---|---|
| Enable | LBT_ENABLED |
| Disable (default) | LBT_DISABLED |

If WOR is transmitting: after the WOR receiver receives the wireless data and outputs it through the serial port, it will wait for 1000ms before entering the WOR again. Users can input the serial port data and return it via wireless during this period. Each serial byte will be refreshed for 1000ms. Users must transmit the first byte within 1000ms.
| Wireless wake-up time | Constant value |
|---|---|
| 500ms | WAKE_UP_500 |
| 1000ms | WAKE_UP_1000 |
| 1500ms | WAKE_UP_1500 |
| 2000ms (default) | WAKE_UP_2000 |
| 2500ms | WAKE_UP_2500 |
| 3000ms | WAKE_UP_3000 |
| 3500ms | WAKE_UP_3500 |
| 4000ms | WAKE_UP_4000 |
First, we must introduce a simple but practical method to check if something is in the receiving buffer.
int available();
It’s simple to return how many bytes you have in the current stream.
Normal/Transparent transmission mode sends messages to all devices with the same address and channel.

Fixed transmission have more scenarios

Now you have all information to do your work, but I think It’s important to show some real examples to understand better all the possibilities.
xreef/EByte_LoRa_E220_python_raspberrypi_library is a public repo on GitHub by xreef. Raspberry Pi python library to connect EByte E220 (LLCC68) devices.
It declares no license on GitHub. Public does not mean open source: without a license, nobody is granted the right to reuse it.
Its maker tagged it for Linux. That is declared by the maker; Take My Repo has not tested it.
Open "Take it" on its page: Take My Repo writes an install plan for your machine and hands it to your AI agent (Claude Code, Codex or Cursor), which asks you before each step. Take My Repo has not tested it on any machine.
SX1262/SX1268/LLCC68 Low Power Long Range Transceiver driver for esp-idf
Its last change on GitHub was on 2025-01-28. Take My Repo does not judge from that whether it is maintained.
Nobody has reviewed it on Take My Repo yet, which says nothing about its quality.
:house_with_garden: Open source home automation that puts local control and privacy first.
π RuView turns commodity WiFi signals into real-time spatial intelligence, vital sign monitoring, and presence detection — all without a single pixel of video.

MicroPython LoRa EBYTE E220 LLCC68 device library complete and tested with Arduino, esp8266, esp32, STM32 and Raspberry Pi Pico (rp2040 boards).
Arduino LoRa EBYTE E32 device library complete and tested with Arduino, esp8266, esp32, STM32 and Raspberry Pi Pico (rp2040 boards). sx1278/sx1276

PCF8574 library. i2c digital expander for Arduino, Raspberry Pi Pico and rp2040 boards, esp32, SMT32 and ESP8266. Can read write digital values with only 2 wire. Very simple to use and encoder support.

A simple FTP server for Arduino, ArduinoSAMD WiFiNINA, esp8266, esp32, stm32 and Raspberry Pi Pico W

Arduino LoRa EBYTE E22 device library complete and tested with Arduino, esp8266, esp32, STM32 and Raspberry Pi Pico (rp2040 boards).. sx1262/sx1268

Arduino LoRa EBYTE E220 LLCC68 device library complete and tested with Arduino, esp8266, esp32, STM32 and Raspberry Pi Pico (rp2040 boards)..

Arduino, esp32, Esp8266 EMailSender with Arduino IDE, simple library to send email via smtp with attachments.
This page is also available as structured data, with the same sources and dates.
/api/v1/resources/gh/xreef/EByte_LoRa_E220_python_raspberrypi_libraryTake My Repo has not tested this on your machine. Requirements come from the project's own documentation.