Closed OxMarco closed 11 months ago
I confirm the cause is very probably a reading error as all retrieved values are null even on Raspian
/usr/local/lib/python3.9/dist-packages/ebyte_lora_e22_rpi-0.0.2-py3.9.egg/lora_e22.py:398: RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings.
/usr/local/lib/python3.9/dist-packages/ebyte_lora_e22_rpi-0.0.2-py3.9.egg/lora_e22.py:399: RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings.
Initialization: {} Success
Retrieve configuration: {} Save mode returned not recognized!
------------- CONFIGURATION BEFORE CHANGE -------------
----------------------------------------
HEAD : 0x0 0x0 0x0
AddH : 0x0
AddL : 0x0
Chan : 0 -> 410
SpeedParityBit : 0b0 -> 8N1 (Default)
SpeedUARTDatte : 0b0 -> 1200bps
SpeedAirDataRate : 0b0 -> 0.3kbps
OptionSubPacketSett: 0b0 -> 240bytes (default)
OptionTranPower : 0b0 -> 33dBm (Default)
OptionRSSIAmbientNo: 0b0 -> Disabled (default)
TransModeWORPeriod : 0b0 -> 500ms
TransModeTransContr: 0b0 -> WOR Receiver (default)
TransModeEnableLBT : 0b0 -> Disabled (default)
TransModeEnableRSSI: 0b0 -> Disabled (default)
TransModeEnabRepeat: 0b0 -> Disabled (default)
TransModeFixedTrans: 0b0 -> Transparent transmission (default)
----------------------------------------
------------- CONFIGURATION AFTER CHANGE -------------
Data size not match!
----------------------------------------
Traceback (most recent call last):
File "/home/pi/EByte_LoRa_E22_python_raspberrypi_library/examples/set_configuration.py", line 79, in <module>
print_configuration(confSetted)
File "/usr/local/lib/python3.9/dist-packages/ebyte_lora_e22_rpi-0.0.2-py3.9.egg/lora_e22.py", line 277, in print_configuration
AttributeError: 'NoneType' object has no attribute '_COMMAND'
Hi OxMarco, other people have the same problem and normally It indicates a wiring problem or not sufficient power supply. But in this case, I think It is simply that E22T33D isn't an EByte model, I think you mean 400E22D. Bye Renzo
Hi, thank you for you prompt reply.
The item is a E22-400T33D, a LoRa 433MHz module featuring a maximum output power of 33dbm, UART version.
I double checked the wiring and tried with an USB-to-UART converter too, changing the port to the /dev/ttyUSB0
one with the same error coming up. Could it be that the library does not recognise the model?
You must insert 400T33D as model. Bye Renzo
I already changed the model to the new one, that is not the source of the problem
import serial
from lora_e22 import LoRaE22, print_configuration
from lora_e22_operation_constant import ResponseStatusCode
loraSerial = serial.Serial('/dev/serial0') #, baudrate=9600, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ON>
lora = LoRaE22('400T33D', loraSerial, aux_pin=18, m0_pin=23, m1_pin=24)
code = lora.begin()
print("Initialization: {}", ResponseStatusCode.get_description(code))
code, configuration = lora.get_configuration()
print("Retrieve configuration: {}", ResponseStatusCode.get_description(code))
print_configuration(configuration)
Issue solved by disabling the default shell on Serial port
For those having the same issue:
sudo raspi-config
> interface options > serial port > No > Yes
Thanks for your reply.
There seems to be a problem with the E22T33D module, on Ubuntu Server 22
On Raspian I am not getting the same error, except for