Config via BLE Crashing? ESP32 with SX1262

New here, sorry if this is a known issue. Just worried I’m doing something wrong.

I’ve wired a SX1262 TXCO module to a ESP32 WROOM board and flashed the DIY V1 firmware (2.3.2.63df972 Beta). It seems to work, except I notice when I try to access the Configuration via the android app using BLE, the device seems to freeze and the task watchdog triggers a reboot.

Is it possible I’ve wired something wrong? Used the wrong firmware? I don’t want to assume it’s a bug when I’m pretty amateur at micro controllers.

Below is the reproducible serial output when I open a Configuration item via the android app:

DEBUG | ??:??:?? 46 [RadioIf] PACKET FROM PHONE (id=0x09fa471e fr=0x00 to=0x7c, WantAck=1, HopLim=3 Ch=0x0 Portnum=6 WANTRESP priority=70)
DEBUG | ??:??:?? 46 [RadioIf] Enqueued local (id=0x09fa471e fr=0x00 to=0x7c, WantAck=1, HopLim=3 Ch=0x0 Portnum=6 WANTRESP priority=70)

E (140182) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (140182) task_wdt: - loopTask (CPU 1)
E (140182) task_wdt: Tasks currently running:
E (140182) task_wdt: CPU 0: btController
E (140182) task_wdt: CPU 1: loopTask
E (140182) task_wdt: Aborting.
abort() was called at PC 0x401453f4 on core 0
Backtrace: 0x4008436d:0x3ffbf46c |<-CORRUPTED
ELF file SHA256: 823e3998d07b8373
E (18864) esp_core_dump_flash: Core dump flash config is corrupted! CRC=0x7bd5c66f instead of 0x0
Rebooting…

Were you able to transmit and receive Meshtastic messages on another node?

I’m not an expert here, but you probably should also specify how you wired up the SX1262 to the ESP32 (what pins you used). There are a few ESP32-based DIY targets for Meshtastic (at least one called “DIY”, another called “Hydra”).

Having trouble testing radio to radio coms, since it crashes so quickly on Bluetooth. I tried getting it on wifi, but it always crashes before I can set the config. Also, it’s important to note that it crashes the same way with no radio (just also displays a warning that it didn’t find a valid radio).

I suspect I shouldn’t have just used the Web Flasher’s “DIY V1” firmware. I think I need to compile and upload it in VS Code. Was just trying to avoid coding anything (feels too much like my job for a hobby). Think that’s a step in the right direction?

My wiring is below if anyone is interesting. (SX1262 > ESP32)
GND > GND
REST > D23
NSS > D18
SCK > D5
MOSI > D27
MISO > D19
GND > GND
VCC > 3.3V
NC (DIO0) > D26

That appears to largely match with what the DIY v1.1 targets specify, except DIO1/2 (BUSY and IRQ), for the SX1262. The DIY firmware targets also include a UBlox GPS module and OLED. I’m pretty sure the OLED is optional, detected at runtime. I’m not sure about the GPS, but I think that’s also optional - if I’m wrong about that, you’ll need to rebuild.

An SX1262 has DIO1,DIO2, DIO3 and BUSY pins.

DIO2 and DIO3 are mostly not used.

DIO1 is normally used to indicate RX and TX done and some libraries can run without DIO1, but you do need BUSY.

Thank you so much! Good info. Do you know what data pin on a ESP32 WROOM those would need to be linked to or a good resource I can use to find out?

I had a lot of trouble wiring this since I couldn’t find any good reference. I ended up adapting a wiring chart for an older LoRa module and guessing at the missing pieces until Meshtastic successfully discovered the radio.

DIO1 and BUSY both need to be connected to inputs on the ESP32, you can mostly use any available, but check the list below for ones to avoid.

ESp32 - which pins to use.

Try BUSY to IO32 and IRQ to IO33 to match the DIY targets if you want to use that firmware. You’ll otherwise need to re-compile for your new target.

1 Like

Thanks. Perfect! Using those pins seems to have resolved everything! It now works like I expected.

My final wiring (working):
(SX1262 > ESP32)
GND > GND
REST > D23
NSS > D18
SCK > D5
MOSI > D27
MISO > D19
GND > GND
VCC > 3.3V
NC (DIO0) > D26
NC (DIO1) > D33
BUSY > D32

Glad to hear that helped. :slight_smile: