BLE init causes instant panic and continual rebooting

This is the first time I've used the esp32 but I've been using the Arduino for a few years with the atmega328. So I am thinking my problem here is probably my fault but I've stripped it down to a skeleton bit of code taken from the examples folder and its still happening. The board is an esp32wroom32.

Whats happening is that as soon as BLEDevice::init is called the device seems to panic and reboot. The reason seems to vary each time although its all flying past so fast that I'm not totally sure if there is actually a single error. I've attached a minicom log of the output during which I have pressed the reboot button a few times with a gap of a few seconds between but its not clear when exactly I pressed it and when it rebooted on its own. If there is an option to stop it rebooting itself on error and just stop that might help isolate the user reboot error from the self rebooting error, but OTOH maybe it does not matter.

I've assumed that I had the wrong libraries installed because I started using my usual old 1.8 version of arduino and installed the latest esp library. So I installed the latest 2.x arduino and the board lib but its still happening. I've also tried several different boards in the board manager but none work. So its a completely fresh install of 2.x arduino, latest esp32 board from espressif, and default settings, example code. Since its still happening I'm wondering if the hardware is toast. I can run other example projects from the arduino menu without this problem.

Code I am running which came from ble->server example (same result happens with original code but I stripped it down bit by bit to the ble::init line which is the point at which it panics).

#include <BLEDevice.h>
#include <BLEUtils.h>
#include <BLEServer.h>

#define SERVICE_UUID        "4fafc201-1fb5-459e-8fcc-c5c9c331914b"
#define CHARACTERISTIC_UUID "beb5483e-36e1-4688-b7f5-ea07361b26a8"

void setup() {
  Serial.begin(115200);
  Serial.println("Point 1");
  BLEDevice::init("ESP init");
  Serial.println("Point 2");
}

void loop() {
  delay(2000);
}

And output from minicom:

ets Jul 29 2019 12:21:46

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:1
load:0x3fff0030,len:4980
load:0x40078000,len:16612
load:0x40080400,len:3480
entry 0x400805b4
E (358) esp_core_äfŠ}™±…Íé Core dump data check failed:
Calculated checksum='699d2fde'
Image checksum='020cf01d'Point 1
ASSERT_ERR((((uint32_t)twosc << 10) & ~((uint32_t)0x001FFC00)) == 0), in ld.c at line 2664
Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x4008f64c: 0000f01d 00004136 f01d0000
Core  0 register dump:
PC      : 0x4008f653  PS      : 0x00060c30  A0      : 0x80087a55  A1      : 0x3ffd02b0  
A2      : 0x3ff9dc1d  A3      : 0x00000000  A4      : 0x00000000  A5      : 0x3ff9e033  
A6      : 0x00000a68  A7      : 0xfffffffb  A8      : 0x8000814b  A9      : 0x3ffd0220  
A10     : 0x00000000  A11     : 0x3ffd0244  A12     : 0x3ffd01ef  A13     : 0x00000034  
A14     : 0x00000000  A15     : 0x3ffd01f5  SAR     : 0x00000004  EXCCAUSE: 0x00000000  
EXCVADDR: 0x00000000  LBEG    : 0x400905fd  LEND    : 0x4009060d  LCOUNT  : 0xfffffffd  


Backtrace: 0x4008f650:0x3ffd02b0 0x40087a52:0x3ffd02d0 0x4003c3f2:0x3ffd02f0 0x4016e98a:0x3ffd0330 0x40055199:0x3ffd0350 0x4017a2f2:0x3ffd0370 0x401654ab:0x3ffd03b0 0x401659e3:0x3ffd03d0 0x40093aad:0x3ffd0400




ELF file SHA256: bce087efb


abort() was called at PC 0x40155975 on core 0


Backtrace: 0x40092f04:0x3ffcff50 0x40092ec9:0x3ffcff70 0x40099211:0x3ffcff90 0x40155975:0x3ffd0010 0x401567a6:0x3ffd0040 0x40155692:0x3ffd0110 0x4018d48c:0x3ffd0130 0x400d6b33:0x3ffd0160 0x400db409:0x3ffd0180 0x40081cd5:0x3ffd01d0 0x40083b44:0x3ffd01f0 0x4008f650:0x3ffd02b0 0x40087a52:0x3ffd02d0 0x4003c3f2:0x3ffd02f0 0x4016e98a:0x3ffd0330 0x40055199:0x3ffd0350 0x4017a2f2:0x3ffd0370 0x401654ab:0x3ffd03b0 0x401659e3:0x3ffd03d0 0x40093aad:0x3ffd0400




ELF file SHA256: bce087efb

Re-entered core dump! Exception happened during core dump!
Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_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:1
load:0x3fff0030,len:4980
load:0x40078000,len:16612
load:0x40080400,len:3480
entry 0x400805b4
E (358) esp_core_äfŠ}™±…Íé Core dump data check failed:
Calculated checksum='d10ef15d'
Image checksum='ffffffff'Point 1
ets Jul 29 2019 12:21:46

rst:0x8 (TG1WDT_SYS_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:1
load:0x3fff0030,len:4980
load:0x40078000,len:16612
load:0x40080400,len:3480
entry 0x400805b4
E (492) esp_core_äfŠ}™±…Íé Core dump data check failed:
Calculated checksum='d10ef15d'
Image checksum='ffffffff'Point 1
ASSERT_ERR(0), in arch_main.c at line 1162
Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x4008f64c: 0000f01d 00004136 f01d0000
Core  0 register dump:
PC      : 0x4008f653  PS      : 0x00060830  A0      : 0x80087a55  A1      : 0x3ffd0390  
A2      : 0x3f406389  A3      : 0x00000000  A4      : 0x00000000  A5      : 0x3f40e00a  
A6      : 0x0000048a  A7      : 0xfffffffb  A8      : 0x8000814b  A9      : 0x3ffd0300  
A10     : 0x00000000  A11     : 0x3ffd0324  A12     : 0x3ffd02cf  A13     : 0x00000032  
A14     : 0x00000000  A15     : 0x3ffd02d5  SAR     : 0x00000004  EXCCAUSE: 0x00000000  
EXCVADDR: 0x00000000  LBEG    : 0x40090141  LEND    : 0x40090163  LCOUNT  : 0xffffffff  


Backtrace: 0x4008f650:0x3ffd0390 0x40087a52:0x3ffd03b0 0x40165ae6:0x3ffd03d0 0x40093aad:0x3ffd0400


<Z%íÿ€jpf ``ôr¢
ELF file SHA256: bce087efb<Z%íÿ€jpf ``ôr¢<Z%íÿ€jpf ``ôr¢ets Jul 29 2019 12:21:46

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:1
load:0x3fff0030,len:4980
load:0x40078000,len:16612
load:0x40080400,len:3480
entry 0x400805b4
E (358) esp_core_äfŠ}™±…Íé Core dump data check failed:
Calculated checksum='a1cd44b3'
Image checksum='ffffffff'Point 1
ASSERT_ERR((((uint32_t)twosc << 10) & ~((uint32_t)0x001FFC00)) == 0), in ld.c at line 2664
Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x4008f64c: 0000f01d 00004136 f01d0000
Core  0 register dump:
PC      : 0x4008f653  PS      : 0x00060c30  A0      : 0x80087a55  A1      : 0x3ffd02b0  
A2      : 0x3ff9dc1d  A3      : 0x00000000  A4      : 0x00000000  A5      : 0x3ff9e033  
A6      : 0x00000a68  A7      : 0xfffffffb  A8      : 0x8000814b  A9      : 0x3ffd0220  
A10     : 0x00000000  A11     : 0x3ffd0244  A12     : 0x3ffd01ef  A13     : 0x00000034  
A14     : 0x00000000  A15     : 0x3ffd01f5  SAR     : 0x00000004  EXCCAUSE: 0x00000000  
EXCVADDR: 0x00000000  LBEG    : 0x400905fd  LEND    : 0x4009060d  LCOUNT  : 0xfffffffd  


Backtrace: 0x4008f650:0x3ffd02b0 0x40087a52:0x3ffd02d0 0x4003c3f2:0x3ffd02f0 0x4016e98a:0x3ffd0330 0x40055199:0x3ffd0350 0x4017a2f2:0x3ffd0370 0x401654ab:0x3ffd03b0 0x401659e3:0x3ffd03d0 0x40093aad:0x3ffd0400




ELF file SHA256: bce087efb

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_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:1
load:0x3fff0030,len:4980
load:0x40078000,len:16612
load:0x40080400,len:3480
entry 0x400805b4
Point 1
ASSERT_PARAM(262144 0), in rwip.c at line 364
Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x4008f64c: 0000f01d 00004136 f01d0000
Core  0 register dump:
PC      : 0x4008f653  PS      : 0x00060c30  A0      : 0x80087c06  A1      : 0x3ffd0330  
A2      : 0x00000000  A3      : 0x00040000  A4      : 0x00000000  A5      : 0x3f40f1bd  
A6      : 0x0000016c  A7      : 0xfffffffc  A8      : 0x8000814b  A9      : 0x3ffd02a0  
A10     : 0x00000000  A11     : 0x3ffd02c3  A12     : 0x3ffd026f  A13     : 0x00000034  
A14     : 0x00000000  A15     : 0x3ffd0274  SAR     : 0x00000004  EXCCAUSE: 0x00000000  
EXCVADDR: 0x00000000  LBEG    : 0x4000c46c  LEND    : 0x4000c477  LCOUNT  : 0xffffffff  


Backtrace: 0x4008f650:0x3ffd0330 0x40087c03:0x3ffd0350 0x4017a3b7:0x3ffd0370 0x401654ab:0x3ffd03b0 0x401659e3:0x3ffd03d0 0x40093aad:0x3ffd0400




ELF file SHA256: bce087efb

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_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:1
load:0x3fff0030,len:4980
load:0x40078000,len:16612
load:0x40080400,len:3480
entry 0x400805b4
Point 1
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x400e5393  PS      : 0x00060a30  A0      : 0x8008f0b0  A1      : 0x3ffd02e0  
A2      : 0x00000000  A3      : 0xfffe01ff  A4      : 0x3ffd0768  A5      : 0x3ffc6d08  
A6      : 0x00000000  A7      : 0x00000002  A8      : 0x00000001  A9      : 0x3ffd02e0  
A10     : 0x00040004  A11     : 0x00060a24  A12     : 0x00060a20  A13     : 0x3fffd6c8  
A14     : 0x00000000  A15     : 0x0000001a  SAR     : 0x00000011  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000000  LBEG    : 0x400900d8  LEND    : 0x400900ee  LCOUNT  : 0x00000000  


Backtrace: 0x400e5390:0x3ffd02e0 0x4008f0ad:0x3ffd0300 0x400882dd:0x3ffd0330 0x4001788d:0x3ffd0350 0x4017a2da:0x3ffd0370 0x401654ab:0x3ffd03b0 0x401659e3:0x3ffd03d0 0x40093aad:0x3ffd0400




ELF file SHA256: bce087efb

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_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:1
load:0x3fff0030,len:4980
load:0x40078000,len:16612
load:0x40080400,len:3480
entry 0x400805b4
Point 1
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x400e5393  PS      : 0x00060a30  A0      : 0x8008f0b0  A1      : 0x3ffd02e0  
A2      : 0x00000000  A3      : 0xfffe01ff  A4      : 0x3ffd0768  A5      : 0x3ffc6d08  
A6      : 0x00040000  A7      : 0x00000002  A8      : 0x00000001  A9      : 0x3ffd02e0  
A10     : 0x00040004  A11     : 0x00060a24  A12     : 0x00060a20  A13     : 0x3ffbd6c8  
A14     : 0x00040000  A15     : 0x0000001a  SAR     : 0x00000011  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000000  LBEG    : 0x400900d8  LEND    : 0x400900ee  LCOUNT  : 0x00000000  


Backtrace: 0x400e5390:0x3ffd02e0 0x4008f0ad:0x3ffd0300 0x400882dd:0x3ffd0330 0x4001788d:0x3ffd0350 0x4017a2da:0x3ffd0370 0x401654ab:0x3ffd03b0 0x401659e3:0x3ffd03d0 0x40093aad:0x3ffd0400




ELF file SHA256: bce087efb

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_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:1
load:0x3fff0030,len:4980
load:0x40078000,len:16612
load:0x40080400,len:3480
entry 0x400805b4
Point 1
ASSERT_PARAM(262144 0), in rwip.c at line 364
Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x4008f64c: 0000f01d 00004136 f01d0000
Core  0 register dump:
PC      : 0x4008f653  PS      : 0x00060c30  A0      : 0x80087c06  A1      : 0x3ffd0330  
A2      : 0x00000000  A3      : 0x00040000  A4      : 0x00000000  A5      : 0x3f40f1bd  
A6      : 0x0000016c  A7      : 0xfffffffc  A8      : 0x8000814b  A9      : 0x3ffd02a0  
A10     : 0x00000000  A11     : 0x3ffd02c3  A12     : 0x3ffd026f  A13     : 0x00000034  
A14     : 0x00000000  A15     : 0x3ffd0274  SAR     : 0x00000004  EXCCAUSE: 0x00000000  
EXCVADDR: 0x00000000  LBEG    : 0x4000c46c  LEND    : 0x4000c477  LCOUNT  : 0xffffffff  


Backtrace: 0x4008f650:0x3ffd0330 0x400c7c03:0x3ffd0350 |<-CORRUPTED


<Z%íÿ€jpf ``ôr¢
ELF file SHA256: bce087efb<Z%íÿ€jpf ``ôr¢<Z%íÿ€jpf ``ôr¢Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_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:1
load:0x3fff0030,len:4980
load:0x40078000,len:16612
load:0x40080400,len:3480
entry 0x400805b4
Point 1
ASSERT_ERR((((uint32_t)twosc << 10) & ~((uint32_t)0x001FFC00)) == 0), in ld.c at line 2664
Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x4008f64c: 0000f01d 00004136 f01d0000
Core  0 register dump:
PC      : 0x4008f653  PS      : 0x00060c30  A0      : 0x80087a55  A1      : 0x3ffd02b0  
A2      : 0x3ff9dc1d  A3      : 0x00000000  A4      : 0x00000000  A5      : 0x3ff9e033  
A6      : 0x00000a68  A7      : 0xfffffffb  A8      : 0x8000814b  A9      : 0x3ffd0220  
A10     : 0x00000000  A11     : 0x3ffd0244  A12     : 0x3ffd01ef  A13     : 0x00000034  
A14     : 0x00000000  A15     : 0x3ffd01f5  SAR     : 0x00000004  EXCCAUSE: 0x00000000  
EXCVADDR: 0x00000000  LBEG    : 0x400905fd  LEND    : 0x4009060d  LCOUNT  : 0xfffffffd  


Backtrace: 0x4008f650:0x3ffd02b0 0x40087a52:0x3ffd02d0 0x4003c3f2:0x3ffd02f0 0x4016e98a:0x3ffd0330 0x40055199:0x3ffd0350 0x4017a2f2:0x3ffd0370 0x401654ab:0x3ffd03b0 0x401659e3:0x3ffd03d0 0x40093aad:0x3ffd0400




ELF file SHA256: bce087efb

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_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:1
load:0x3fff0030,len:4980
load:0x40078000,len:16612
load:0x40080400,len:3480
entry 0x400805b4
Point 1
ASSERT_ERR((((uint32_t)twosc << 10) & ~((uint32_t)0x001FFC00)) == 0), in ld.c at line 2664
Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x4008f64c: 0000f01d 00004136 f01d0000
Core  0 register dump:
PC      : 0x4008f653  PS      : 0x00060c30  A0      : 0x80087a55  A1      : 0x3ffd02b0  
A2      : 0x3ff9dc1d  A3      : 0x00000000  A4      : 0x00000000  A5      : 0x3ff9e033  
A6      : 0x00000a68  A7      : 0xfffffffb  A8      : 0x8000814b  A9      : 0x3ffd0220  
A10     : 0x00000000  A11     : 0x3ffd0244  A12     : 0x3ffd01ef  A13     : 0x00000034  
A14     : 0x00000000  A15     : 0x3ffd01f5  SAR     : 0x00000004  EXCCAUSE: 0x00000000  
EXCVADDR: 0x00000000  LBEG    : 0x400905fd  LEND    : 0x4009060d  LCOUNT  : 0xfffffffd  


Backtrace: 0x4008f650:0x3ffd02b0 0x40087a52:0x3ffd02d0 0x4003c3f2:0x3ffd02f0 0x4016e98a:0x3ffd0330 0x40055199:0x3ffd0350 0x4017a2f2:0x3ffd0370 0x401654ab:0x3ffd03b0 0x401659e3:0x3ffd03d0 0x40093aad:0x3ffd0400




ELF file SHA256: bce087efb

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_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:1
load:0x3fff0030,len:4980
load:0x40078000,len:16612
load:0x40080400,len:3480
entry 0x400805b4
Point 1

assert failed: esp_efuse_utility_process esp_efuse_utility.c:84 (bits_counter <= req_size)


Backtrace: 0x40092f04:0x3ffd00f0 0x40092ec9:0x3ffd0110 0x40099301:0x3ffd0130 0x400d99a2:0x3ffd0270 0x400d983e:0x3ffd02b0 0x400dd171:0x3ffd02d0 0x400dd217:0x3ffd0310 0x400dd2cb:0x3ffd0330 0x400834ea:0x3ffd0360 0x40165371:0x3ffd0380 0x40165440:0x3ffd03b0 0x401659e3:0x3ffd03d0 0x40093aad:0x3ffd0400




ELF file SHA256: bce087efb

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_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:1
load:0x3fff0030,len:4980
load:0x40078000,len:16612
load:0x40080400,len:3480
entry 0x400805b4
Point 1
ASSERT_PARAM(262144 0), in rwip.c at line 364
Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x4008f64c: 0000f01d 00004136 f01d0000
Core  0 register dump:
PC      : 0x4008f653  PS      : 0x00060c30  A0      : 0x80087c06  A1      : 0x3ffd0330  
A2      : 0x00000000  A3      : 0x00040000  A4      : 0x00000000  A5      : 0x3f40f1bd  
A6      : 0x0000016c  A7      : 0xfffffffc  A8      : 0x8000814b  A9      : 0x3ffd02a0  
A10     : 0x00000000  A11     : 0x3ffd02c3  A12     : 0x3ffd026f  A13     : 0x00000034  
A14     : 0x00000000  A15     : 0x3ffd0274  SAR     : 0x00000004  EXCCAUSE: 0x00000000  
EXCVADDR: 0x00000000  LBEG    : 0x4000c46c  LEND    : 0x4000c477  LCOUNT  : 0xffffffff  


Backtrace: 0x4008f650:0x3ffd0330 0x40087c03:0x3ffd0350 0x4017a3b7:0x3ffd0370 0x401654ab:0x3ffd03b0 0x401659e3:0x3ffd03d0 0x40093aad:0x3ffd0400


<Z%íÿ€jpf ``ôr¢
ELF file SHA256: bce087efb<Z%íÿ€jpf ``ôr¢<Z%íÿ€jpf ``ôr¢Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_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:1
load:0x3fff0030,len:4980
load:0x40078000,len:16612
load:0x40080400,len:3480
entry 0x400805b4
Point 1
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x400e5393  PS      : 0x00060a30  A0      : 0x8008f0b0  A1      : 0x3ffd02e0  
A2      : 0x00000000  A3      : 0xfffe01ff  A4      : 0x3ffd0768  A5      : 0x3ffc6d08  
A6      : 0x00040000  A7      : 0x00000002  A8      : 0x00000001  A9      : 0x3ffd02e0  
A10     : 0x00000004  A11     : 0x00060a24  A12     : 0x00060a20  A13     : 0x3ffbd6c8  
A14     : 0x00000000  A15     : 0x0000001a  SAR     : 0x00000011  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000000  LBEG    : 0x400900d8  LEND    : 0x400900ee  LCOUNT  : 0x00000000  


Backtrace: 0x400e5390:0x3ffd02e0 0x4008f0ad:0x3ffd0300 0x400882dd:0x3ffd0330 0x4001788d:0x3ffd0350 0x4017a2da:0x3ffd0370 0x401654ab:0x3ffd03b0 0x401659e3:0x3ffd03d0 0x40093aad:0x3ffd0400




ELF file SHA256: bce087efb

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_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:1
load:0x3fff0030,len:4980
load:0x40078000,len:16612
load:0x40080400,len:3480
entry 0x400805b4
Point 1
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x400e5393  PS      : 0x00060a30  A0      : 0x8008f0b0  A1      : 0x3ffd02e0  
A2      : 0x00000000  A3      : 0xfffe01ff  A4      : 0x3ffd0768  A5      : 0x3ffc6d08  
A6      : 0x00040000  A7      : 0x00000002  A8      : 0x00000001  A9      : 0x3ffd02e0  
A10     : 0x00000004  A11     : 0x00060a24  A12     : 0x00060a20  A13     : 0x3ffbd6c8  
A14     : 0x00000000  A15     : 0x0000001a  SAR     : 0x00000011  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000000  LBEG    : 0x400900d8  LEND    : 0x400900ee  LCOUNT  : 0x00000000  


Backtrace: 0x400e5390:0x3ffd02e0 0x400cf0ad:0x3ffd0300 |<-CORRUPTED




ELF file SHA256: bce087efb

ets Jul 29 2019 12:21:46

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:1
load:0x3fff0030,len:4980
load:0x40078000,len:16612
load:0x40080400,len:3480
entry 0x400805b4
E (358) esp_core_äfŠ}™±…Íé Core dump data check failed:
Calculated checksum='1e5f04b3'
Image checksum='ffffffff'Point 1
ASSERT_ERR((((uint32_t)twosc << 10) & ~((uint32_t)0x001FFC00)) == 0), in ld.c at line 2664
Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x4008f64c: 0000f01d 00004136 f01d0000
Core  0 register dump:
PC      : 0x4008f653  PS      : 0x00060c30  A0      : 0x80087a55  A1      : 0x3ffd02b0  
A2      : 0x3ff9dc1d  A3      : 0x00000000  A4      : 0x00000000  A5      : 0x3ff9e033  
A6      : 0x00000a68  A7      : 0xfffffffb  A8      : 0x8000814b  A9      : 0x3ffd0220  
A10     : 0x00000000  A11     : 0x3ffd0244  A12     : 0x3ffd01ef  A13     : 0x00000034  
A14     : 0x00000000  A15     : 0x3ffd01f5  SAR     : 0x00000004  EXCCAUSE: 0x00000000  
EXCVADDR: 0x00000000  LBEG    : 0x400905fd  LEND    : 0x4009060d  LCOUNT  : 0xfffffffd  


Backtrace: 0x4008f650:0x3ffd02b0 0x40087a52:0x3ffd02d0 0x4003c3f2:0x3ffd02f0 0x4016e98a:0x3ffd0330 0x40055199:0x3ffd0350 0x4017a2f2:0x3ffd0370 0x401654ab:0x3ffd03b0 0x401659e3:0x3ffd03d0 0x40093aad:0x3ffd0400




ELF file SHA256: bce087efb

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_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:1
load:0x3fff0030,len:4980
load:0x40078000,len:16612
load:0x40080400,len:3480
entry 0x400805b4
Point 1
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x400e5393  PS      : 0x00060a30  A0      : 0x8008f0b0  A1      : 0x3ffd02e0  
A2      : 0x00000000  A3      : 0xfffe01ff  A4      : 0x3ffd0768  A5      : 0x3ffc6d08  
A6      : 0x00040000  A7      : 0x00000002  A8      : 0x00000001  A9      : 0x3ffd02e0  
A10     : 0x00000004  A11     : 0x00060a24  A12     : 0x00060a20  A13     : 0x3ffbd6c8  
A14     : 0x00000000  A15     : 0x0000001a  SAR     : 0x00000011  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000000  LBEG    : 0x400900d8  LEND    : 0x400900ee  LCOUNT  : 0x00000000  


Backtrace: 0x400e5390:0x3ffd02e0 0x4008f0ad:0x3ffd0300 0x400882dd:0x3ffd0330 0x4001788d:0x3ffd0350 0x4017a2da:0x3ffd0370 0x401654ab:0x3ffd03b0 0x401659e3:0x3ffd03d0 0x40093aad:0x3ffd0400




ELF file SHA256: bce087efb

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_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:1
load:0x3fff0030,len:4980
load:0x40078000,len:16612
load:0x40080400,len:3480
entry 0x400805b4
Point 1
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x40054c15  PS      : 0x00060e30  A0      : 0x8017a300  A1      : 0x3ffd0340  
A2      : 0x3ffee70c  A3      : 0x9c510192  A4      : 0x00040004  A5      : 0x40013f14  
A6      : 0x3ffb8360  A7      : 0x0000160c  A8      : 0x80054c10  A9      : 0x3ffd02f0  
A10     : 0x3ffb03f2  A11     : 0x00000000  A12     : 0xffffff00  A13     : 0x00040000  
A14     : 0xffffff7f  A15     : 0xffefffff  SAR     : 0x00000010  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x9c51019a  LBEG    : 0x40090141  LEND    : 0x40090163  LCOUNT  : 0xffffffff  


Backtrace: 0x40054c12:0x3ffd0340 0x4017a2fd:0x3ffd0370 0x401654ab:0x3ffd03b0 0x401659e3:0x3ffd03d0 0x40093aad:0x3ffd0400




ELF file SHA256: bce087efb

ets Jul 29 2019 12:21:46

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:1
load:0x3fff0030,len:4980
load:0x40078000,len:16612
load:0x40080400,len:3480
entry 0x400805b4
E (358) esp_core_äfŠ}™±…Íé Core dump data check failed:
Calculated checksum='dc628aa4'
Image checksum='c2004136RøPoint 1
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x400e5393  PS      : 0x00060a30  A0      : 0x8008f0b0  A1      : 0x3ffd02e0  
A2      : 0x00000000  A3      : 0xfffe01ff  A4      : 0x3ffd0768  A5      : 0x3ffc6d08  
A6      : 0x00040000  A7      : 0x00000002  A8      : 0x00000001  A9      : 0x3ffd02e0  
A10     : 0x00000004  A11     : 0x00060a24  A12     : 0x00060a20  A13     : 0x3ffbd6c8  
A14     : 0x00000000  A15     : 0x0000001a  SAR     : 0x00000011  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000000  LBEG    : 0x400900d8  LEND    : 0x400900ee  LCOUNT  : 0x00000000  


Backtrace: 0x400e5390:0x3ffd02e0 0x400cf0ad:0x3ffd0300 |<-CORRUPTED




ELF file SHA256: bce087efb

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_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:1
load:0x3fff0030,len:4980
load:0x40078000,len:16612
load:0x40080400,len:3480
entry 0x400805b4
Point 1

assert failed: esp_efuse_utility_process esp_efuse_utility.c:84 (bits_counter <= req_size)


Backtrace: 0x40092f04:0x3ffd00f0 0x40092ec9:0x3ffd0110 0x40099301:0x3ffd0130 0x400d99a2:0x3ffd0270 0x400d983e:0x3ffd02b0 0x400dd171:0x3ffd02d0 0x400dd217:0x3ffd0310 0x400dd2cb:0x3ffd0330 0x400834ea:0x3ffd0360 0x40165371:0x3ffd0380 0x40165440:0x3ffd03b0 0x401659e3:0x3ffd03d0 0x40093aad:0x3ffd0400




ELF file SHA256: bce087efb

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_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:1
load:0x3fff0030,len:4980
load:0x40078000,len:16612
load:0x40080400,len:3480
entry 0x400805b4
Point 1
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x400e5393  PS      : 0x00060a30  A0      : 0x8008f0b0  A1      : 0x3ffd02e0  
A2      : 0x00000000  A3      : 0xfffe01ff  A4      : 0x3ffd0768  A5      : 0x3ffc6d08  
A6      : 0x00040000  A7      : 0x00000002  A8      : 0x00000001  A9      : 0x3ffd02e0  
A10     : 0x00000004  A11     : 0x00060a24  A12     : 0x00060a20  A13     : 0x3ffbd6c8  
A14     : 0x00000000  A15     : 0x0000001a  SAR     : 0x00000011  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000000  LBEG    : 0x400900d8  LEND    : 0x400900ee  LCOUNT  : 0x00000000  


Backtrace: 0x400e5390:0x3ffd02e0 0x4008f0ad:0x3ffd0300 0x400882dd:0x3ffd0330 0x4001788d:0x3ffd0350 0x4017a2da:0x3ffd0370 0x401654ab:0x3ffd03b0 0x401659e3:0x3ffd03d0 0x40093aad:0x3ffd0400




ELF file SHA256: bce087efb

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_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:1
load:0x3fff0030,len:4980
load:0x40078000,len:16612
load:0x40080400,len:3480
entry 0x400805b4
Point 1
ASSERT_ERR((((uint32_t)twosc << 10) & ~((uint32_t)0x001FFC00)) == 0), in ld.c at line 2664
Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x4008f64c: 0000f01d 00004136 f01d0000
Core  0 register dump:
PC      : 0x4008f653  PS      : 0x00060c30  A0      : 0x80087a55  A1      : 0x3ffd02b0  
A2      : 0x3ff9dc1d  A3      : 0x00000000  A4      : 0x00000000  A5      : 0x3ff9e033  
A6      : 0x00000a68  A7      : 0xfffffffb  A8      : 0x8000814b  A9      : 0x3ffd0220  
A10     : 0x00000000  A11     : 0x3ffd0244  A12     : 0x3ffd01ef  A13     : 0x00000034  
A14     : 0x00000000  A15     : 0x3ffd01f5  SAR     : 0x00000004  EXCCAUSE: 0x00000000  
EXCVADDR: 0x00000000  LBEG    : 0x400905fd  LEND    : 0x4009060d  LCOUNT  : 0xfffffffd  


Backtrace: 0x4008f650:0x3ffd02b0 0x40087a52:0x3ffd02d0 0x4003c3f2:0x3ffd02f0 0x4016e98a:0x3ffd0330 0x40055199:0x3ffd0350 0x4017a2f2:0x3ffd0370 0x401654ab:0x3ffd03b0 0x401659e3:0x3ffd03d0 0x40093aad:0x3ffd0400




ELF file SHA256: bce087efb

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_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:1
load:0x3fff0030,len:4980
load:0x40078000,len:16612
load:0x40080400,len:3480
entry 0x400805b4
Point 1
ASSERT_ERR((((uint32_t)twosc << 10) & ~((uint32_t)0x001FFC00)) == 0), in ld.c at line 2664
Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x4008f64c: 0000f01d 00004136 f01d0000
Core  0 register dump:
PC      : 0x4008f653  PS      : 0x00060c30  A0      : 0x80087a55  A1      : 0x3ffd02b0  
A2      : 0x3ff9dc1d  A3      : 0x00000000  A4      : 0x00000000  A5      : 0x3ff9e033  
A6      : 0x00000a68  A7      : 0xfffffffb  A8      : 0x8000814b  A9      : 0x3ffd0220  
A10     : 0x00000000  A11     : 0x3ffd0244  A12     : 0x3ffd01ef  A13     : 0x00000034  
A14     : 0x00000000  A15     : 0x3ffd01f5  SAR     : 0x00000004  EXCCAUSE: 0x00000000  
EXCVADDR: 0x00000000  LBEG    : 0x400905fd  LEND    : 0x4009060d  LCOUNT  : 0xfffffffd  


Backtrace: 0x4008f650:0x3ffd02b0 0x40087a52:0x3ffd02d0 0x4003c3f2:0x3ffd02f0 0x4016e98a:0x3ffd0330 0x40055199:0x3ffd0350 0x4017a2f2:0x3ffd0370 0x401654ab:0x3ffd03b0 0x401659e3:0x3ffd03d0 0x40093aad:0x3ffd0400




ELF file SHA256: bce087efb

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_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:1
load:0x3fff0030,len:4980
load:0x40078000,len:16612
load:0x40080400,len:3480
entry 0x400805b4
Point 1
ASSERT_ERR((((uint32_t)twosc << 10) & ~((uint32_t)0x001FFC00)) == 0), in ld.c at line 2664
Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x4008f64c: 0000f01d 00004136 f01d0000
Core  0 register dump:
PC      : 0x4008f653  PS      : 0x00060c30  A0      : 0x80087a55  A1      : 0x3ffd02b0  
A2      : 0x3ff9dc1d  A3      : 0x00000000  A4      : 0x00000000  A5      : 0x3ff9e033  
A6      : 0x00000a68  A7      : 0xfffffffb  A8      : 0x8000814b  A9      : 0x3ffd0220  
A10     : 0x00000000  A11     : 0x3ffd0244  A12     : 0x3ffd01ef  A13     : 0x00000034  
A14     : 0x00000000  A15     : 0x3ffd01f5  SAR     : 0x00000004  EXCCAUSE: 0x00000000  
EXCVADDR: 0x00000000  LBEG    : 0x400905fd  LEND    : 0x4009060d  LCOUNT  : 0xfffffffd  


Backtrace: 0x4008f650:0x3ffd02b0 0x40087a52:0x3ffd02d0 0x4003c3f2:0x3ffd02f0 0x4016e98a:0x3ffd0330 0x40055199:0x3ffd0350 0x4017a2f2:0x3ffd0370 0x401654ab:0x3ffd03b0 0x401659e3:0x3ffd03d0 0x40093aad:0x3ffd0400




ELF file SHA256: bce087efb

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_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:1
load:0x3fff0030,len:4980
load:0x40078000,len:16612
load:0x40080400,len:3480
entry 0x400805b4
Point 1
ASSERT_ERR(0), in arch_main.c at line 1162
Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x4008f64c: 0000f01d 00004136 f01d0000
Core  0 register dump:
PC      : 0x4008f653  PS      : 0x00060830  A0      : 0x80087a55  A1      : 0x3ffd0390  
A2      : 0x3f406389  A3      : 0x00000000  A4      : 0x00000000  A5      : 0x3f40e00a  
A6      : 0x0000048a  A7      : 0xfffffffb  A8      : 0x8000814b  A9      : 0x3ffd0300  
A10     : 0x00000000  A11     : 0x3ffd0324  A12     : 0x3ffd02cf  A13     : 0x00000032  
A14     : 0x00000000  A15     : 0x3ffd02d5  SAR     : 0x00000004  EXCCAUSE: 0x00000000  
EXCVADDR: 0x00000000  LBEG    : 0x40090141  LEND    : 0x40090163  LCOUNT  : 0xffffffff  


Backtrace: 0x4008f650:0x3ffd0390 0x40087a52:0x3ffd03b0 0x40165ae6:0x3ffd03d0 0x40093aad:0x3ffd0400




ELF file SHA256: bce087efb

Any ideas here would be kindly appreciated.

Inadequate power is often a cause of rebooting, especially if rebooting is associated with the radio. Make sure yours can supply at least 300 mA (500 mA is better) at 3.3V.

With ESP32 radio modules, I use this 500 mA, 3.3V stepdown converter with an 18650 3500 mAh cell for trouble free operation.

Hi and thanks very much for the reply. I did wonder about power - I guess as the radio turns on there is an increased power demand suddenly - but its just powered via USB from a laptop and that seemed natural for testing purposes. I assumed 500mA is available via the USB which is a lot more than I thought the radio needed (I've seen 140mA as the figure with radio on). Since it needs to be plugged in for the minicom connection whats the usual way to supply power in this situation, is it a powered hub, or extra power via the pins and if so is there no risk to the computer from power going the wrong way up the USB cable? Do you power it with 3.3V to prevent that being possible? I had a quick look at the adapter you showed (I have something similar in my parts box actually) but just not sure how you plug it all in.

If there's some howto that deals with these questions please just point me towards it rather than go into detail, appreciate the reply as I say thanks.

Not necessarily. The radio is 3.3V only and USB provides about 5V, so the power has to go through a voltage regulator. If that regulator cannot supply enough current, end of story.

Post a link to the product page for the ESP32 module that you have. Also, test the module with a different standard, unmodified BLE example program that is known to be reliable. The Random Nerds website has excellent tutorials and examples.

Finally, Espressif updated the ESP32 core and a bunch of libraries in the last year or so, which broke many working programs. Make sure everything is up to date and compatible.

I had a quick look at the adapter you showed (I have something similar in my parts box actually) but just not sure how you plug it all in.

The voltage regulator module is connected to the battery, 3.3V power and GND.

So re the example program I tried the server example from the arduino IDE in completely unmodified form before stripping it down and it was the same. The reason I stripped it down was because I hoped to isolate where the problem happened hoping to get a clue to its cause. Re the random nerds its interesting you mention that because initially I had copied one of their projects (the BLE webserver one) and hit the problem, and worked backwards to the server example in the IDE etc. Good to know they are respected though because initially I thought it was their code that was broken.

This ESP32 module I bought in March 2022 and has sat in the parts bin for ages. I never used it and only now I am trying it out. So relating to your comment that Espressif has updated stuff, does it mean firmware or bootloader on the module I have could be the problem and needs to be updated? I'm only familiar with the atmega really but even with that fuse settings, as an example, could I guess break things in this way. Is there any way I can tell if my esp32 is correctly set up?

The product I bought was from ebay and seems to still have the page up there on this url:

https://www.ebay.co.uk/itm/194890262237

It describes it as 'SP-32 ESP32 WROOM NodeMcu Development Board 30 pins Dual Core WLAN WiFi -UK' but I doubt thats very useful. On the board back it says 'D01T ESP 32 DEVKTT V1 www.boltom', and on the metal screening case it says 'ESP-WROOM-32' and theres an fcc number lower down too '2AC7Z'. The board itself reports itself as 'ESP32-D0WDQ6'.

That is certainly a possibility. I believe that your ESP32 board predates the changes to the ESP32 Arduino core and the libraries, and given the difficulties of making sure that all the code modules are compatible, you may be better off just buying a new one and starting over from scratch.

I recommend Adafruit because they support their products, make a real effort to provide readable, reliable getting started guides, keep examples and libraries up to date, and host a forum staffed by professional engineers.

Unfortunately I ordered a non Adafruit one earlier but if they are more reliable I will get one from them too as the price seems hardly higher. What are the core libraries, are they installed on the module already (in the form of firmware?) or is that something you install in the Arduino environment? I can't help get the feeling I am loading a incorrect library since it panics so immediately and reliably. and I wonder if there is anything I can try now. But the esp32 lib from espressif seems like the only one I need to manually install, is that right?

Sorry, I've never used Bluetooth or BLE on the ESP32 (only WiFi), but I understand that a rather large firmware module is required.

If you are interested in the Adafruit products, go through their getting started or Learning Guides carefully. I've noticed a number of comments about replacing outdated firmware.

Well its looking more and more like hardware as I tried adding power and also downloaded the latest firmware from Espressif and loaded that, neither have worked. It looks like Pi hut are the UK sellers of Adafruit so I will be taking a look today at their products, as there seem to be several. Also if I need to wait I'm thinking about the promicro nrf52840 as its BLE power consumption seems more in line with a battery device (I think the esp32wroom has poor power consumption once you turn BLE on iirc). I need several ADC inputs so that restricts my choice a bit. Thanks again for your comments re this issue!

Your link does not explicitly say "with bluetooth" , what Board did you select from the IDE?

Edit.Just learned that apparently all ESP32 boards have Bluetooth build in.

I just tested your code on my ESP32 WROOM , no errors.

rst:0x1 (POWERON_RESET),boot:0x12 (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:1
load:0x3fff0030,len:1344
load:0x40078000,len:13964
load:0x40080400,len:3600
entry 0x400805f0
Point 1
Point 2

Not true.
The ESP32-S2 does not have Bluetooth at all and most others only have BLE

Thanks for the info , that's why I said apparently .. one of those AI searches again!

Thanks appreciate that, good to know the code itself is not faulty. Can I ask what your version of Arduino and of the ESP32 Espressif board lib is? I am using arduino 2.3.6 and I've tried ESP32 3.3.2, 3.0.0, and 2.0.0 but if you are using a particular version maybe I'll download it and try just in case.

Yes this one is the ESP32WROOM-32 apparently. It reports as 'ESP32-D0WDQ6', and on the datasheet for that chip it refers to the wroom-32 and links to it. Following that link takes you to this page: Espressif Documentation which seems to 'prove' the link between the chips self reported ID and the wroom-32.

In that datasheet it says:

Bluetooth V4.2 BR/EDR and Bluetooth LE specification

So that seems right.

But there are a couple of possible issues. Maybe the chip is badly fake and has been programmed to report as a wroom-32 when its in fact something else, not sure if this is actually possible. Along the lines of high capacity flash drives reporting fake sizes etc.

And the other problem I have is that the IDE provides a board called the esp32 wroom-da but not one called the esp32 wroom-32. And I've seen references to the wroom-1 and wroom-2 but haven't figured out how these all relate to each other and whether I am using the right libraries for it all. I've tried many boards from the IDE menu though and none work but there are hundreds there so who knows.

EDIT: just to add I've seem quite a few references in howtos for Arduino to use the esp32 dev module which I've also tried!

Don't post junk from AI unless you have actually verified it's validity, it's almost always wrong.

Was you statement about the code working also AI generated?

No , I posted a screenshot from the Serial Monitor.

If you set Core debug level to "Verbose" and uncheck autoscroll on the serial monitor you will see alot of additional information that may help debug the problem.

I tested with Arduino IDE 2.3.6 and Board Manager 2.0.11 and 3.3.0.

On the top metal can "ESP32-WROOM-32"
The bottom side says ESP32S.

Works with ESP32 WROOM and ESP32 DEV KIT selection in the IDE.

Where did you see this?

This what I get in the Serial Monitor.

Connecting....
Connected to ESP32 on COM1:
Chip type:          ESP32-D0WD-V3 (revision v3.1)
Features:           Wi-Fi, BT, Dual Core + LP Core, 240MHz, Vref calibration in eFuse, Coding Scheme None
Crystal frequency:  40MHz
MAC:                ac:15:18:eb:4d:e8