designer2k2 / tbeam-lorawan-mapper

LoRaWan GPS Mapper for TTN and Helium Network, using the TBeam1.2 SX1262
GNU General Public License v3.0
7 stars 0 forks source link

Initialise radio failed(-2) #5

Closed FunnyPaul closed 2 months ago

FunnyPaul commented 2 months ago

Unfortunately, I can't get the application to work properly on my brand new T-Beam 1.2 (LILYGO 868/915 Mhz). The original software (meshtastic) worked without any problems, I think the hardware is OK. After flashing and restarting, the following appears in the serial console:

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13232
load:0x40080400,len:3028
entry 0x400805e4
[   456][I][esp32-hal-psram.c:96] psramInit(): PSRAM enabled
BOOT #1!  cause:0 ext1:00000000
[   480][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
No Mapper prefs -- using defaults.
[   489][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
No deadzone prefs -- using defaults.
[   498][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
No screen prefs -- using defaults.
[   508][I][esp32-hal-i2c.c:75] i2cInit(): Initialising I2C Master: sda=21 scl=22 freq=100000
AXP192 PMU at 0x34
OLED at 0x3C
[   537][I][XPowersCommon.tpp:421] begin(): SDA:21 SCL:22
[   543][W][Wire.cpp:301] begin(): Bus already started in Master Mode.
AXP2101 PMU init succeeded, using AXP2101 PMU
Battery Charge Level: 99%
=========================================
DC1  : +   Voltage: 3300 mV
DC2  : -   Voltage: 0500 mV
DC3  : -   Voltage: 0500 mV
DC4  : -   Voltage: 1800 mV
DC5  : -   Voltage: 3300 mV
ALDO1: -   Voltage: 1800 mV
ALDO2: +   Voltage: 3300 mV
ALDO3: +   Voltage: 3300 mV
ALDO4: -   Voltage: 3300 mV
BLDO1: -   Voltage: 1800 mV
BLDO2: -   Voltage: 3300 mV
=========================================

Lorawan Mapper 0.0.5
[   609][W][Wire.cpp:301] begin(): Bus already started in Master Mode.
[   617][E][Wire.cpp:416] beginTransmission(): Unfinished Repeated Start transaction! Expected requestFrom, not beginTransmission! Clearing...
[   630][E][Wire.cpp:416] beginTransmission(): Unfinished Repeated Start transaction! Expected requestFrom, not beginTransmission! Clearing...
[   643][E][Wire.cpp:416] beginTransmission(): Unfinished Repeated Start transaction! Expected requestFrom, not beginTransmission! Clearing...
[   656][W][Wire.cpp:301] begin(): Bus already started in Master Mode.
[deprecated] Print functionality now handles buffer management automatically. This is a no-op.

After a few seconds:

Initialise radio failed(-2)

Then nothing happens :-(

I also noticed that according to the circuit diagram, the RESET pin of the LORA module should be connected to the IO23 pin as before. I changed this as a test, unfortunately without a positive result.

FunnyPaul commented 2 months ago

It turned out that a SX1276 (HPD13A) was installed on the board. After making the change, this error went away, but after the OTAA registration attempt, error -6 (RADIOLIB_ERR_RX_TIMEOUT) occurred. This was because the IO1 and IO2 pins were connected to other pins on the ESP32. After correction (see circuit diagram for V1.2) it now works.

designer2k2 commented 1 week ago

@FunnyPaul great you got it working for the SX1276! Would you share the needed changes? I would like to include them in here

FunnyPaul commented 1 week ago

Unfortunately, I didn't pursue the project any further here, as there seemed to be more problems. I took the original project and transferred the excellent implementation of the power supply from it. I also noticed that the boards, which all seem to look the same, are equipped with different LoRaWan chips :-(