Home › Forum › Schede esp32 › ESP32 BLE Scan e Connect
- Questo topic ha 6 risposte, 2 partecipanti ed è stato aggiornato l'ultima volta 4 anni, 3 mesi fa da
Renzo Mischianti.
-
AutorePost
-
-
9 Febbraio 2021 alle 18:51 #9767
A Natale mi sono affacciato al mondo Arduino & Co. quando ho regalato a mio figlio una scatola con vari aggeggi dentro…
Premetto che non conosco alcun linguaggio di programmazione, ma cerco comunque di capire cosa fa il programma e prendendo spunti e leggendo qui e li cerco di adattare a ciò che vorrei fare.Poi ho cominciato a fare ricerche su google e a vedere cosa si poteva fare con questi microcontrollori.
Mi sono fatto prendere la mano e mi è balenata l’idea di fare un termostato a “stanze” ovvero vorrei mettere un termometro in ogni stanza e poi controllare delle elettrovalvole che dovrei montare sul “clarinetto” dell’impianto di riscaldamento.
Tutto bello a guardare i video su Youtube, tutto facile, ma poi l’ignoranza la fa da padrona e non riesco neanche a collegare la scheda ESP32 ad un termometro BLE MIija che nel frattempo ho comprato.
Mi spiego meglio, ho trovato girovagando pezzi di codice per la connessione ESP32 – Mijia, li ho adattati e riesco a leggere i valori di temperatura e umidità. Poi ho spento il sensore, per simulare la batteria scarica… ed ecco il primo intoppo dal quale non esco: ESP32 non trovando il MAC address onair, va in crash.
Ho provato ad associare la scansione alla connessione, ma niente.
Mi sono scordato di dire che per fare il tutto utilizzo Arduino IDE.
Chiedo lumi a voi esperti del settore per sormontare questi ostacoli.
Ringrazio.
Marco.
-
9 Febbraio 2021 alle 21:48 #9771
Ciao Marco,
non mi è molto chiaro come si verifica il problema, potresti postare il tuo codice, e magari anche un Serial log per avere maggiori dettagli.
Ciao Renzo
-
10 Febbraio 2021 alle 09:42 #9790
Buongiorno,
di seguito il codice per arduino IDE:
#include #define LYWSD03MMC_ADDR "xx:xx:xx:xx:xx:xx" //CONNECT #define LYWSD03MMC_ADDR2 "xx:xx:xx:xx:xx:xx" //CONNECT #define LYWSD03MMC_ADDR3 "ZZ:ZZ:ZZ:ZZ:ZZ:ZZ" //CONNECT #define LYWSD03MMC_ADDR4 "xx:xx:xx:xx:xx:xx" //CONNECT #define LYWSD03MMC_ADDR5 "xx:xx:xx:xx:xx:xx" //CONNECT #define LYWSD03MMC_ADDR6 "xx:xx:xx:xx:xx:xx" //CONNECT #define LYWSD03MMC_ADDR7 "xx:xx:xx:xx:xx:xx" //CONNECT #define LYWSD03MMC_ADDR8 "xx:xx:xx:xx:xx:xx" //CONNECT #define LYWSD03MMC_ADDR9 "xx:xx:xx:xx:xx:xx" //CONNECT #define LYWSD03MMC_ADDR10 "xx:xx:xx:xx:xx:xx" //CONNECT #define LYWSD03MMC_ADDR11 "xx:xx:xx:xx:xx:xx" //CONNECT #define LYWSD03MMC_ADDR12 "xx:xx:xx:xx:xx:xx" //CONNECT static BLEAddress htSensorAddress(LYWSD03MMC_ADDR); //CONNECT static BLEAddress htSensorAddress2(LYWSD03MMC_ADDR2); //CONNECT static BLEAddress htSensorAddress3(LYWSD03MMC_ADDR3); //CONNECT static BLEAddress htSensorAddress4(LYWSD03MMC_ADDR4); //CONNECT static BLEAddress htSensorAddress5(LYWSD03MMC_ADDR5); //CONNECT static BLEAddress htSensorAddress6(LYWSD03MMC_ADDR6); //CONNECT static BLEAddress htSensorAddress7(LYWSD03MMC_ADDR7); //CONNECT static BLEAddress htSensorAddress8(LYWSD03MMC_ADDR8); //CONNECT static BLEAddress htSensorAddress9(LYWSD03MMC_ADDR9); //CONNECT static BLEAddress htSensorAddress10(LYWSD03MMC_ADDR10); //CONNECT static BLEAddress htSensorAddress11(LYWSD03MMC_ADDR11); //CONNECT static BLEAddress htSensorAddress12(LYWSD03MMC_ADDR12); //CONNECT bool connectionSuccessful = false; //CONNECT BLEClient *pClient; //CONNECT // The remote service we wish to connect to. //CONNECT static BLEUUID serviceUUID("ebe0ccb0-7a0a-4b0c-8a1a-6ff2997da3a6"); //CONNECT // The characteristic of the remote service we are interested in. //CONNECT static BLEUUID charUUID("ebe0ccc1-7a0a-4b0c-8a1a-6ff2997da3a6"); //CONNECT #define MACADDR1 "ZZ:ZZ:ZZ:ZZ:ZZ:ZZ" //scan String MAC_ADDR_TROVATO; //scan String MAC2 = "ZZ:ZZ:ZZ:ZZ:ZZ:ZZ"; //scan int scanTime = 20; //In seconds //scan BLEScan *pBLEScan; //scan class MyAdvertisedDeviceCallbacks: public BLEAdvertisedDeviceCallbacks { //scan void connectSensor3() { pClient->connect(htSensorAddress3); connectionSuccessful = true; Serial.println("MAC Address: " LYWSD03MMC_ADDR2 "\n"); } void onResult(BLEAdvertisedDevice advertisedDevice) { //scan Serial.printf("Advertised Device: %s \n", advertisedDevice.toString().c_str()); //scan Serial.print("found address: "); //scan Serial.printf("\n %s \n", advertisedDevice.getAddress().toString().c_str()); //scan MAC_ADDR_TROVATO = advertisedDevice.getAddress().toString().c_str(); //scan // Serial.printf("risultato: %s \n",MAC_ADDR_TROVATO); //scan if (strcmp(advertisedDevice.getAddress().toString().c_str(), MAC2.c_str()) == 0) //scan { //scan Serial.print("MAC TROVATO \n"); //scan connectSensor3(); } } ; //scan }; //scan //scan class MyClientCallback: public BLEClientCallbacks { //CONNECT void onConnect(BLEClient *pclient) { //CONNECT Serial.println("Connected"); //CONNECT } //CONNECT void onDisconnect(BLEClient *pclient) { //CONNECT Serial.println("Disconnected"); //CONNECT if (!connectionSuccessful) { //CONNECT Serial.println("RESTART"); //CONNECT ESP.restart(); //CONNECT } //CONNECT } //CONNECT }; //CONNECT static void notifyCallback( //CONNECT BLERemoteCharacteristic *pBLERemoteCharacteristic, //CONNECT uint8_t *pData, //CONNECT size_t length, //CONNECT bool isNotify) { //CONNECT float temp; //CONNECT float humi; //CONNECT Serial.print("Notify callback for characteristic "); //CONNECT Serial.println(pBLERemoteCharacteristic->getUUID().toString().c_str()); //CONNECT temp = (pData[0] | (pData[1] << 8)) * 0.01; //little endian //CONNECT humi = pData[2]; //CONNECT Serial.printf("temp = %.1f : humidity = %.1f \n", temp, humi); //CONNECT Serial.println(charUUID.toString().c_str()); //CONNECT delay(5000); //CONNECT pClient->disconnect(); //CONNECT } void registerNotification() { //CONNECT // Obtain a reference to the service we are after in the remote BLE server. //CONNECT BLERemoteService *pRemoteService = pClient->getService(serviceUUID); //CONNECT if (pRemoteService == nullptr) { //CONNECT Serial.print("Failed to find our service UUID: "); //CONNECT Serial.println(serviceUUID.toString().c_str()); //CONNECT pClient->disconnect(); //CONNECT } //CONNECT Serial.println(" – Found our service"); //CONNECT // Obtain a reference to the characteristic in the service of the remote BLE server. //CONNECT BLERemoteCharacteristic *pRemoteCharacteristic = pRemoteService->getCharacteristic(charUUID); //CONNECT if (pRemoteCharacteristic == nullptr) { //CONNECT Serial.print("Failed to find our characteristic UUID: "); //CONNECT Serial.println(charUUID.toString().c_str()); //CONNECT //Serial.println(charUUID2.toString().c_str()); //CONNECT pClient->disconnect(); //CONNECT } //CONNECT Serial.println(" – Found our characteristic"); //CONNECT pRemoteCharacteristic->registerForNotify(notifyCallback); //CONNECT } //CONNECT void setup() { //scan Serial.begin(115200); //scan Serial.println("Scanning…"); //scan Serial.printf(" %s \n", MAC_ADDR_TROVATO); //scan BLEDevice::init(""); //scan pBLEScan = BLEDevice::getScan(); //create new scan //scan pBLEScan->setAdvertisedDeviceCallbacks(new MyAdvertisedDeviceCallbacks()); //scan pBLEScan->setActiveScan(true); //active scan uses more power, but get results faster //scan pBLEScan->setInterval(1000); //scan pBLEScan->setWindow(900); // less or equal setInterval value //scan } //scan void loop() { //scan // put your main code here, to run repeatedly: //scan BLEScanResults foundDevices = pBLEScan->start(scanTime, false); //scan Serial.print("Devices found: "); //scan Serial.println(foundDevices.getCount()); //scan Serial.println("Scan done!"); //scan pBLEScan->clearResults(); // delete results fromBLEScan buffer to release memory //scan delay(5000); //scan } //scan
-
10 Febbraio 2021 alle 09:49 #9794
Buongiorno,
di seguito il Serial Log:
Buongiorno, di seguito il Serial Log: 09:33:00.614 -> Scanning... 09:33:00.614 -> 09:33:01.317 -> Advertised Device: Name: , Address: xx:xx:xx:xx:xx:xx, manufacturer data: 00000000000000000000 09:33:01.363 -> found address: 09:33:01.363 -> xx:xx:xx:xx:xx:xx 09:33:01.363 -> Advertised Device: Name: , Address: xx:xx:xx:xx:xx:xx, manufacturer data: 00000000000000000000 09:33:01.363 -> found address: 09:33:01.363 -> xx:xx:xx:xx:xx:xx 09:33:01.646 -> Advertised Device: Name: , Address: xx:xx:xx:xx:xx:xx, manufacturer data: 75004204018060c097274e294dc297274e294c01000000000000 09:33:01.646 -> found address: 09:33:01.646 -> xx:xx:xx:xx:xx:xx 09:33:01.646 -> Advertised Device: Name: LYWSD03MMC, Address: ZZ:ZZ:ZZ:ZZ:ZZ:ZZ 09:33:01.692 -> found address: 09:33:01.692 -> ZZ:ZZ:ZZ:ZZ:ZZ:ZZ 09:33:01.692 -> MAC TROVATO 09:33:03.656 -> Guru Meditation Error: Core 0 panic'ed (StoreProhibited). Exception was unhandled. 09:33:03.656 -> Core 0 register dump: 09:33:03.656 -> PC : 0x400d2f73 PS : 0x00060630 A0 : 0x800d19e9 A1 : 0x3ffce460 09:33:03.702 -> A2 : 0x00000000 A3 : 0x3ffc4f40 A4 : 0x3ffc52e0 A5 : 0x00000000 09:33:03.702 -> A6 : 0x00000001 A7 : 0x40404040 A8 : 0x800d5bbc A9 : 0x3ffce480 09:33:03.702 -> A10 : 0x00000000 A11 : 0x00000001 A12 : 0x00000000 A13 : 0x0000ff00 09:33:03.702 -> A14 : 0x00ff0000 A15 : 0xff000000 SAR : 0x00000008 EXCCAUSE: 0x0000001d 09:33:03.702 -> EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xfffffffc 09:33:03.702 -> 09:33:03.702 -> Backtrace: 0x400d2f73:0x3ffce460 0x400d19e6:0x3ffce4c0 0x400d4b59:0x3ffce510 0x400d3812:0x3ffce600 0x40101201:0x3ffce650 0x400fc372:0x3ffce670 0x4008e089:0x3ffce6a0 09:33:03.749 -> 09:33:03.749 -> Rebooting... 09:33:03.749 -> ets Jun 8 2016 00:22:57 09:33:03.749 -> 09:33:03.749 -> rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) 09:33:03.749 -> configsip: 0, SPIWP:0xee 09:33:03.749 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 09:33:03.749 -> mode:DIO, clock div:1 09:33:03.749 -> load:0x3fff0018,len:4 09:33:03.749 -> load:0x3fff001c,len:1216 09:33:03.749 -> ho 0 tail 12 room 4 09:33:03.749 -> load:0x40078000,len:9720 09:33:03.749 -> ho 0 tail 12 room 4 09:33:03.749 -> load:0x40080400,len:6352 09:33:03.749 -> entry 0x400806b8 09:33:04.077 -> Scanning... 09:33:04.077 -> 09:33:04.822 -> Advertised Device: Name: , Address: xx:xx:xx:xx:xx:xx, manufacturer data: 0000000000 09:33:04.822 -> found address: 09:33:04.822 -> xx:xx:xx:xx:xx:xx 09:33:04.870 -> Advertised Device: Name: , Address: xx:xx:xx:xx:xx:xx, manufacturer data: 00000000000000000000 09:33:04.870 -> found address: 09:33:04.870 -> xx:xx:xx:xx:xx:xx 09:33:05.058 -> Advertised Device: Name: LYWSD03MMC, Address: ZZ:ZZ:ZZ:ZZ:ZZ:ZZ 09:33:05.058 -> found address: 09:33:05.058 -> ZZ:ZZ:ZZ:ZZ:ZZ:ZZ 09:33:05.058 -> MAC TROVATO 09:33:07.022 -> Guru Meditation Error: Core 0 panic'ed (StoreProhibited). Exception was unhandled. 09:33:07.069 -> Core 0 register dump: 09:33:07.069 -> PC : 0x400d2f73 PS : 0x00060630 A0 : 0x800d19e9 A1 : 0x3ffce460 09:33:07.069 -> A2 : 0x00000000 A3 : 0x3ffc4f40 A4 : 0x3ffc52e0 A5 : 0x00000000 09:33:07.069 -> A6 : 0x00000001 A7 : 0x40404040 A8 : 0x800d5bbc A9 : 0x3ffce480 09:33:07.069 -> A10 : 0x00000000 A11 : 0x00000001 A12 : 0x00000000 A13 : 0x0000ff00 09:33:07.069 -> A14 : 0x00ff0000 A15 : 0xff000000 SAR : 0x00000008 EXCCAUSE: 0x0000001d 09:33:07.069 -> EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xfffffffc 09:33:07.116 -> 09:33:07.116 -> Backtrace: 0x400d2f73:0x3ffce460 0x400d19e6:0x3ffce4c0 0x400d4b59:0x3ffce510 0x400d3812:0x3ffce600 0x40101201:0x3ffce650 0x400fc372:0x3ffce670 0x4008e089:0x3ffce6a0 09:33:07.116 -> 09:33:07.116 -> Rebooting... 09:33:07.116 -> ets Jun 8 2016 00:22:57 09:33:07.116 -> 09:33:07.116 -> rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) 09:33:07.116 -> configsip: 0, SPIWP:0xee 09:33:07.116 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 09:33:07.116 -> mode:DIO, clock div:1 09:33:07.116 -> load:0x3fff0018,len:4 09:33:07.116 -> load:0x3fff001c,len:1216 09:33:07.116 -> ho 0 tail 12 room 4 09:33:07.116 -> load:0x40078000,len:9720 09:33:07.161 -> ho 0 tail 12 room 4 09:33:07.161 -> load:0x40080400,len:6352 09:33:07.161 -> entry 0x400806b8 09:33:07.478 -> Scanning... 09:33:07.478 -> 09:33:09.666 -> Advertised Device: Name: , Address: xx:xx:xx:xx:xx:xx, manufacturer data: 00000000000000000000 09:33:09.666 -> found address: 09:33:09.666 -> xx:xx:xx:xx:xx:xx 09:33:09.666 -> Advertised Device: Name: , Address: xx:xx:xx:xx:xx:xx, manufacturer data: 00000000000000000000 09:33:09.666 -> found address: 09:33:09.666 -> xx:xx:xx:xx:xx:xx 09:33:11.828 -> Advertised Device: Name: LYWSD03MMC, Address: ZZ:ZZ:ZZ:ZZ:ZZ:ZZ 09:33:11.828 -> found address: 09:33:11.828 -> ZZ:ZZ:ZZ:ZZ:ZZ:ZZ 09:33:11.828 -> MAC TROVATO 09:33:13.835 -> Guru Meditation Error: Core 0 panic'ed (StoreProhibited). Exception was unhandled. 09:33:13.835 -> Core 0 register dump: 09:33:13.835 -> PC : 0x400d2f73 PS : 0x00060630 A0 : 0x800d19e9 A1 : 0x3ffce460 09:33:13.835 -> A2 : 0x00000000 A3 : 0x3ffc4f40 A4 : 0x3ffc52e0 A5 : 0x00000000 09:33:13.835 -> A6 : 0x00000001 A7 : 0x40404040 A8 : 0x800d5bbc A9 : 0x3ffce480 09:33:13.881 -> A10 : 0x00000000 A11 : 0x00000001 A12 : 0x00000000 A13 : 0x0000ff00 09:33:13.881 -> A14 : 0x00ff0000 A15 : 0xff000000 SAR : 0x00000008 EXCCAUSE: 0x0000001d 09:33:13.881 -> EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xfffffffc 09:33:13.881 -> 09:33:13.881 -> Backtrace: 0x400d2f73:0x3ffce460 0x400d19e6:0x3ffce4c0 0x400d4b59:0x3ffce510 0x400d3812:0x3ffce600 0x40101201:0x3ffce650 0x400fc372:0x3ffce670 0x4008e089:0x3ffce6a0 09:33:13.881 -> 09:33:13.881 -> Rebooting... 09:33:13.881 -> ets Jun 8 2016 00:22:57 09:33:13.881 -> 09:33:13.881 -> rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) 09:33:13.928 -> configsip: 0, SPIWP:0xee 09:33:13.928 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 09:33:13.928 -> mode:DIO, clock div:1 09:33:13.928 -> load:0x3fff0018,len:4 09:33:13.928 -> load:0x3fff001c,len:1216 09:33:13.928 -> ho 0 tail 12 room 4 09:33:13.928 -> load:0x40078000,len:9720 09:33:13.928 -> ho 0 tail 12 room 4 09:33:13.928 -> load:0x40080400,len:6352 09:33:13.928 -> entry 0x400806b8 09:33:14.251 -> Scanning... 09:33:14.251 -> 09:33:15.004 -> Advertised Device: Name: , Address: 7b:8e:c4:1e:54:3e, manufacturer data: 0600010920020c6bc47ad96f5fa055ffbbb7fef2b52ed115bbddbae370 09:33:15.004 -> found address: 09:33:15.004 -> 7b:8e:c4:1e:54:3e 09:33:15.143 -> Advertised Device: Name: , Address: xx:xx:xx:xx:xx:xx, manufacturer data: 00000000000000000000 09:33:15.189 -> found address: 09:33:15.189 -> xx:xx:xx:xx:xx:xx 09:33:15.562 -> Advertised Device: Name: , Address: xx:xx:xx:xx:xx:xx, manufacturer data: 75004204018060c097274e294dc297274e294c01000000000000 09:33:15.562 -> found address: 09:33:15.562 -> xx:xx:xx:xx:xx:xx 09:33:16.963 -> Advertised Device: Name: LYWSD03MMC, Address: ZZ:ZZ:ZZ:ZZ:ZZ:ZZ 09:33:16.963 -> found address: 09:33:16.963 -> ZZ:ZZ:ZZ:ZZ:ZZ:ZZ 09:33:16.963 -> MAC TROVATO 09:33:18.969 -> Guru Meditation Error: Core 0 panic'ed (StoreProhibited). Exception was unhandled. 09:33:18.969 -> Core 0 register dump: 09:33:18.969 -> PC : 0x400d2f73 PS : 0x00060630 A0 : 0x800d19e9 A1 : 0x3ffce460 09:33:18.969 -> A2 : 0x00000000 A3 : 0x3ffc4f40 A4 : 0x3ffc52e0 A5 : 0x00000000 09:33:18.969 -> A6 : 0x00000001 A7 : 0x40404040 A8 : 0x800d5bbc A9 : 0x3ffce480 09:33:18.969 -> A10 : 0x00000000 A11 : 0x00000001 A12 : 0x00000000 A13 : 0x0000ff00 09:33:18.969 -> A14 : 0x00ff0000 A15 : 0xff000000 SAR : 0x00000008 EXCCAUSE: 0x0000001d 09:33:19.016 -> EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xfffffffc 09:33:19.016 -> 09:33:19.016 -> Backtrace: 0x400d2f73:0x3ffce460 0x400d19e6:0x3ffce4c0 0x400d4b59:0x3ffce510 0x400d3812:0x3ffce600 0x40101201:0x3ffce650 0x400fc372:0x3ffce670 0x4008e089:0x3ffce6a0 09:33:19.016 -> 09:33:19.016 -> Rebooting... 09:33:19.016 -> ets Jun 8 2016 00:22:57 09:33:19.016 -> 09:33:19.016 -> rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) 09:33:19.016 -> configsip: 0, SPIWP:0xee 09:33:19.016 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 09:33:19.016 -> mode:DIO, clock div:1 09:33:19.016 -> load:0x3fff0018,len:4 09:33:19.063 -> load:0x3fff001c,len:1216 09:33:19.063 -> ho 0 tail 12 room 4 09:33:19.063 -> load:0x40078000,len:9720 09:33:19.063 -> ho 0 tail 12 room 4 09:33:19.063 -> load:0x40080400,len:6352 09:33:19.063 -> entry 0x400806b8 09:33:19.344 -> Scanning... 09:33:19.390 -> 09:33:20.132 -> Advertised Device: Name: , Address: 7b:8e:c4:1e:54:3e, manufacturer data: 0600010920020c6bc47ad96f5fa055ffbbb7fef2b52ed115bbddbae370 09:33:20.132 -> found address: 09:33:20.132 -> 7b:8e:c4:1e:54:3e 09:33:20.180 -> Advertised Device: Name: , Address: xx:xx:xx:xx:xx:xx, manufacturer data: 00000000000000000000 09:33:20.180 -> found address: 09:33:20.180 -> xx:xx:xx:xx:xx:xx 09:33:25.362 -> Advertised Device: Name: LYWSD03MMC, Address: ZZ:ZZ:ZZ:ZZ:ZZ:ZZ 09:33:25.362 -> found address: 09:33:25.362 -> ZZ:ZZ:ZZ:ZZ:ZZ:ZZ 09:33:25.362 -> MAC TROVATO 09:33:27.369 -> Guru Meditation Error: Core 0 panic'ed (StoreProhibited). Exception was unhandled. 09:33:27.369 -> Core 0 register dump: 09:33:27.369 -> PC : 0x400d2f73 PS : 0x00060630 A0 : 0x800d19e9 A1 : 0x3ffce460 09:33:27.369 -> A2 : 0x00000000 A3 : 0x3ffc4f40 A4 : 0x3ffc52e0 A5 : 0x00000000 09:33:27.369 -> A6 : 0x00000001 A7 : 0x40404040 A8 : 0x800d5bbc A9 : 0x3ffce480 09:33:27.415 -> A10 : 0x00000000 A11 : 0x00000001 A12 : 0x00000000 A13 : 0x0000ff00 09:33:27.415 -> A14 : 0x00ff0000 A15 : 0xff000000 SAR : 0x00000008 EXCCAUSE: 0x0000001d 09:33:27.415 -> EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xfffffffc 09:33:27.415 -> 09:33:27.415 -> Backtrace: 0x400d2f73:0x3ffce460 0x400d19e6:0x3ffce4c0 0x400d4b59:0x3ffce510 0x400d3812:0x3ffce600 0x40101201:0x3ffce650 0x400fc372:0x3ffce670 0x4008e089:0x3ffce6a0 09:33:27.415 -> 09:33:27.415 -> Rebooting... 09:33:27.415 -> ets Jun 8 2016 00:22:57 09:33:27.462 -> 09:33:27.462 -> rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) 09:33:27.462 -> configsip: 0, SPIWP:0xee 09:33:27.462 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 09:33:27.462 -> mode:DIO, clock div:1 09:33:27.462 -> load:0x3fff0018,len:4 09:33:27.462 -> load:0x3fff001c,len:1216 09:33:27.462 -> ho 0 tail 12 room 4 09:33:27.462 -> load:0x40078000,len:9720 09:33:27.462 -> ho 0 tail 12 room 4 09:33:27.462 -> load:0x40080400,len:6352 09:33:27.462 -> entry 0x400806b8 09:33:27.775 -> Scanning... 09:33:27.775 -> 09:33:28.474 -> Advertised Device: Name: , Address: 7b:8e:c4:1e:54:3e, manufacturer data: 0600010920020c6bc47ad96f5fa055ffbbb7fef2b52ed115bbddbae370 09:33:28.474 -> found address: 09:33:28.474 -> 7b:8e:c4:1e:54:3e 09:33:28.615 -> Advertised Device: Name: , Address: xx:xx:xx:xx:xx:xx, manufacturer data: 00000000000000000000 09:33:28.663 -> found address: 09:33:28.663 -> xx:xx:xx:xx:xx:xx 09:33:28.708 -> Advertised Device: Name: LYWSD03MMC, Address: ZZ:ZZ:ZZ:ZZ:ZZ:ZZ 09:33:28.708 -> found address: 09:33:28.708 -> ZZ:ZZ:ZZ:ZZ:ZZ:ZZ 09:33:28.708 -> MAC TROVATO 09:33:30.715 -> Guru Meditation Error: Core 0 panic'ed (StoreProhibited). Exception was unhandled. 09:33:30.715 -> Core 0 register dump: 09:33:30.715 -> PC : 0x400d2f73 PS : 0x00060630 A0 : 0x800d19e9 A1 : 0x3ffce460 09:33:30.715 -> A2 : 0x00000000 A3 : 0x3ffc4f40 A4 : 0x3ffc52e0 A5 : 0x00000000 09:33:30.715 -> A6 : 0x00000001 A7 : 0x40404040 A8 : 0x800d5bbc A9 : 0x3ffce480 09:33:30.715 -> A10 : 0x00000000 A11 : 0x00000001 A12 : 0x00000000 A13 : 0x0000ff00 09:33:30.715 -> A14 : 0x00ff0000 A15 : 0xff000000 SAR : 0x00000008 EXCCAUSE: 0x0000001d 09:33:30.762 -> EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xfffffffc 09:33:30.762 -> 09:33:30.762 -> Backtrace: 0x400d2f73:0x3ffce460 0x400d19e6:0x3ffce4c0 0x400d4b59:0x3ffce510 0x400d3812:0x3ffce600 0x40101201:0x3ffce650 0x400fc372:0x3ffce670 0x4008e089:0x3ffce6a0 09:33:30.762 -> 09:33:30.762 -> Rebooting... 09:33:30.762 -> ets Jun 8 2016 00:22:57 09:33:30.762 -> 09:33:30.762 -> rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) 09:33:30.762 -> configsip: 0, SPIWP:0xee 09:33:30.762 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 09:33:30.762 -> mode:DIO, clock div:1 09:33:30.762 -> load:0x3fff0018,len:4 09:33:30.762 -> load:0x3fff001c,len:1216 09:33:30.808 -> ho 0 tail 12 room 4 09:33:30.808 -> load:0x40078000,len:9720 09:33:30.808 -> ho 0 tail 12 room 4 09:33:30.808 -> load:0x40080400,len:6352 09:33:30.808 -> entry 0x400806b8 09:33:31.089 -> Scanning...
-
-
11 Febbraio 2021 alle 08:29 #9817
Mi sono accorto che nella prima riga di codice:
#include
manca la dicitura
BLEDevice.h
che forse è stata tagliata perchè inclusa fra i simboli “MINORE” BLEDevice.h “MAGGIORE”
Saluti.
Marco.
-
11 Febbraio 2021 alle 08:34 #9818
Si Marco,
l’ho tagliata per sbaglio quando l’ho formattato.
O avviato su un esp32 il codice, ma fatico a riproporre il problema non avendo dispositivi da connettere.
Ciao Renzo -
14 Febbraio 2021 alle 11:07 #10004
Ciao Marco,
senza dispositivo non riesco a testare. Ho acquistato 2 Xiaomi Mijia, ma ora devo aspettare l’arrivo, poi ci faccio qualche articolo/lavoretto.
Ciao Renzo
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.