Skip to content

ESP32 Crash on Android on IPhone it works #902

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
coltc50 opened this issue Sep 8, 2019 · 10 comments
Closed

ESP32 Crash on Android on IPhone it works #902

coltc50 opened this issue Sep 8, 2019 · 10 comments

Comments

@coltc50
Copy link

coltc50 commented Sep 8, 2019

Hello,

I'm new at arduino and I don't know how to fix my problem. I asked at the arduino forum but didn't get a answer,

I try to get this script to work:
https://github.com/jstiefel/esp32_komoot_ble

When I try on IPhone everything works. But I don't have an IPhone and on Android the script is make a guru meditation after connect.

I tried a lot but didn't found the problem.

Here a Log:
22:22:39.779 -> Scan again... 22:22:39.813 -> [V][BLEScan.cpp:195] start(): >> start(duration=5) 22:22:39.813 -> [D][FreeRTOS.cpp:189] take(): Semaphore taking: name: ScanEnd (0x3ffde244), owner: <N/A> for start 22:22:39.813 -> [D][FreeRTOS.cpp:198] take(): Semaphore taken: name: ScanEnd (0x3ffde244), owner: start 22:22:39.813 -> [V][BLEScan.cpp:227] start(): << start() 22:22:39.813 -> [V][BLEUtils.cpp:1817] gapEventToString(): gapEventToString: Unknown event type 2 0x02 22:22:39.813 -> [V][FreeRTOS.cpp:63] wait(): >> wait: Semaphore waiting: name: ScanEnd (0x3ffde244), owner: start for start 22:22:39.813 -> [V][BLEUtils.cpp:1049] dumpGapEvent(): Received a GAP event: Unknown event type 22:22:39.863 -> [V][BLEUtils.cpp:1264] dumpGapEvent(): *** dumpGapEvent: Logger not coded *** 22:22:39.863 -> [D][BLEClient.cpp:458] handleGAPEvent(): BLEClient ... handling GAP event! 22:22:39.863 -> [V][BLEUtils.cpp:1817] gapEventToString(): gapEventToString: Unknown event type 7 0x07 22:22:39.863 -> [V][BLEUtils.cpp:1049] dumpGapEvent(): Received a GAP event: Unknown event type 22:22:39.863 -> [V][BLEUtils.cpp:1264] dumpGapEvent(): *** dumpGapEvent: Logger not coded *** 22:22:39.863 -> [D][BLEClient.cpp:458] handleGAPEvent(): BLEClient ... handling GAP event! 22:22:40.020 -> [V][BLEUtils.cpp:1817] gapEventToString(): gapEventToString: Unknown event type 3 0x03 22:22:40.020 -> [V][BLEUtils.cpp:1049] dumpGapEvent(): Received a GAP event: Unknown event type 22:22:40.020 -> [V][BLEUtils.cpp:1264] dumpGapEvent(): *** dumpGapEvent: Logger not coded *** 22:22:40.020 -> [D][BLEClient.cpp:458] handleGAPEvent(): BLEClient ... handling GAP event! 22:22:40.020 -> [D][BLEAdvertisedDevice.cpp:418] setRSSI(): - setRSSI(): rssi: -70 22:22:40.020 -> [V][BLEUtils.cpp:746] advTypeToString(): adv data type: 0xff 22:22:40.020 -> [D][BLEAdvertisedDevice.cpp:247] parseAdvertisement(): Type: 0xff (), length: 29, data: 0600010920029c6e758cd010f137d3aa01a2cffd485b1e4f07b7e3c652 22:22:40.061 -> [D][BLEAdvertisedDevice.cpp:395] setManufacturerData(): - manufacturer data: 0600010920029c6e758cd010f137d3aa01a2cffd485b1e4f07b7e3c652 22:22:40.061 -> BLE Advertised Device found: Name: , Address: 3a:ee:5b:43:b1:a7, manufacturer data: 0600010920029c6e758cd010f137d3aa01a2cffd485b1e4f07b7e3c652 22:22:40.061 -> [V][BLEUtils.cpp:1817] gapEventToString(): gapEventToString: Unknown event type 3 0x03 22:22:40.061 -> [V][BLEUtils.cpp:1049] dumpGapEvent(): Received a GAP event: Unknown event type 22:22:40.112 -> [V][BLEUtils.cpp:1264] dumpGapEvent(): *** dumpGapEvent: Logger not coded *** 22:22:40.112 -> [D][BLEClient.cpp:458] handleGAPEvent(): BLEClient ... handling GAP event! 22:22:40.112 -> [D][BLEScan.cpp:97] handleGAPEvent(): Ignoring 3a:ee:5b:43:b1:a7, already seen it. 22:22:40.230 -> [V][BLEUtils.cpp:1817] gapEventToString(): gapEventToString: Unknown event type 3 0x03 22:22:40.230 -> [V][BLEUtils.cpp:1049] dumpGapEvent(): Received a GAP event: Unknown event type 22:22:40.230 -> [V][BLEUtils.cpp:1264] dumpGapEvent(): *** dumpGapEvent: Logger not coded *** 22:22:40.230 -> [D][BLEClient.cpp:458] handleGAPEvent(): BLEClient ... handling GAP event! 22:22:40.230 -> [D][BLEScan.cpp:97] handleGAPEvent(): Ignoring 3a:ee:5b:43:b1:a7, already seen it. 22:22:40.230 -> [V][BLEUtils.cpp:1817] gapEventToString(): gapEventToString: Unknown event type 3 0x03 22:22:40.230 -> [V][BLEUtils.cpp:1049] dumpGapEvent(): Received a GAP event: Unknown event type 22:22:40.278 -> [V][BLEUtils.cpp:1264] dumpGapEvent(): *** dumpGapEvent: Logger not coded *** 22:22:40.278 -> [D][BLEClient.cpp:458] handleGAPEvent(): BLEClient ... handling GAP event! 22:22:40.278 -> [D][BLEScan.cpp:97] handleGAPEvent(): Ignoring 3a:ee:5b:43:b1:a7, already seen it. 22:22:41.168 -> [V][BLEUtils.cpp:1817] gapEventToString(): gapEventToString: Unknown event type 3 0x03 22:22:41.168 -> [V][BLEUtils.cpp:1049] dumpGapEvent(): Received a GAP event: Unknown event type 22:22:41.168 -> [V][BLEUtils.cpp:1264] dumpGapEvent(): *** dumpGapEvent: Logger not coded *** 22:22:41.168 -> [D][BLEClient.cpp:458] handleGAPEvent(): BLEClient ... handling GAP event! 22:22:41.168 -> [D][BLEAdvertisedDevice.cpp:418] setRSSI(): - setRSSI(): rssi: -75 22:22:41.168 -> [V][BLEUtils.cpp:746] advTypeToString(): adv data type: 0x1 22:22:41.168 -> [D][BLEAdvertisedDevice.cpp:247] parseAdvertisement(): Type: 0x01 (), length: 1, data: 02 22:22:41.244 -> [V][BLEUtils.cpp:746] advTypeToString(): adv data type: 0x7 22:22:41.244 -> [D][BLEAdvertisedDevice.cpp:247] parseAdvertisement(): Type: 0x07 (), length: 16, data: 6c43b31d170fb2a2a84f2fd928e1c171 22:22:41.244 -> [D][BLEAdvertisedDevice.cpp:447] setServiceUUID(): - addServiceUUID(): serviceUUID: 71c1e128-d92f-4fa8-a2b2-0f171db343 22:22:41.244 -> [V][BLEUtils.cpp:746] advTypeToString(): adv data type: 0x9 22:22:41.244 -> [D][BLEAdvertisedDevice.cpp:247] parseAdvertisement(): Type: 0x09 (), length: 13, data: 485541574549204d6174652039 22:22:41.292 -> [D][BLEAdvertisedDevice.cpp:407] setName(): - setName(): name: HUAWEI Mate 9 22:22:41.292 -> BLE Advertised Device found: Name: HUAWEI Mate 9, Address: 6e:bb:db:72:4c:3f, serviceUUID: 71c1e128-d92f-4fa8-a2b2-0f171db343 22:22:41.292 -> Found our device! 22:22:41.292 -> [V][BLEScan.cpp:250] stop(): >> stop() 22:22:41.292 -> [V][FreeRTOS.cpp:143] give(): Semaphore giving: name: ScanEnd (0x3ffde244), owner: start 22:22:41.292 -> [V][BLEScan.cpp:262] stop(): << stop() 22:22:41.292 -> [V][FreeRTOS.cpp:77] wait(): << wait: Semaphore released: name: ScanEnd (0x3ffde244), owner: <N/A> 22:22:41.292 -> [V][BLEUtils.cpp:1817] gapEventToString(): gapEventToString: Unknown event type 18 0x12 22:22:41.344 -> [V][BLEUtils.cpp:1049] dumpGapEvent(): Received a GAP event: Unknown event type 22:22:41.344 -> [V][BLEUtils.cpp:1264] dumpGapEvent(): *** dumpGapEvent: Logger not coded *** 22:22:41.344 -> [V][BLEClient.cpp:96] connect(): >> connect(6e:bb:db:72:4c:3f) 22:22:41.344 -> [D][BLEClient.cpp:458] handleGAPEvent(): BLEClient ... handling GAP event! 22:22:41.344 -> [I][BLEDevice.cpp:599] addPeerDevice(): add conn_id: 0, GATT role: client 22:22:41.344 -> [D][FreeRTOS.cpp:189] take(): Semaphore taking: name: RegEvt (0x3ffdde44), owner: <N/A> for connect 22:22:41.390 -> [D][FreeRTOS.cpp:198] take(): Semaphore taken: name: RegEvt (0x3ffdde44), owner: connect 22:22:41.390 -> [V][FreeRTOS.cpp:63] wait(): >> wait: Semaphore waiting: name: RegEvt (0x3ffdde44), owner: connect for connect 22:22:41.390 -> [V][BLEUtils.cpp:951] gattClientEventTypeToString(): Unknown GATT Client event type: 0 22:22:41.390 -> [D][BLEDevice.cpp:154] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 22:22:41.390 -> [V][BLEUtils.cpp:951] gattClientEventTypeToString(): Unknown GATT Client event type: 0 22:22:41.390 -> [V][BLEUtils.cpp:1283] dumpGattClientEvent(): GATT Event: Unknown 22:22:41.390 -> [V][BLEUtils.cpp:951] gattClientEventTypeToString(): Unknown GATT Client event type: 0 22:22:41.390 -> [D][BLEClient.cpp:158] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 22:22:41.390 -> [V][FreeRTOS.cpp:143] give(): Semaphore giving: name: RegEvt (0x3ffdde44), owner: connect 22:22:41.390 -> [W][Connection.cpp:181] my_gattc_event_handler(): custom gattc event handler, event: 0 22:22:41.390 -> [V][FreeRTOS.cpp:77] wait(): << wait: Semaphore released: name: RegEvt (0x3ffdde44), owner: <N/A> 22:22:41.427 -> [D][FreeRTOS.cpp:189] take(): Semaphore taking: name: OpenEvt (0x3ffde098), owner: <N/A> for connect 22:22:41.427 -> [D][FreeRTOS.cpp:198] take(): Semaphore taken: name: OpenEvt (0x3ffde098), owner: connect 22:22:41.427 -> [V][FreeRTOS.cpp:63] wait(): >> wait: Semaphore waiting: name: OpenEvt (0x3ffde098), owner: connect for connect 22:22:41.835 -> [V][BLEUtils.cpp:951] gattClientEventTypeToString(): Unknown GATT Client event type: 40 22:22:41.835 -> [D][BLEDevice.cpp:154] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 22:22:41.835 -> [V][BLEUtils.cpp:951] gattClientEventTypeToString(): Unknown GATT Client event type: 40 22:22:41.835 -> [V][BLEUtils.cpp:1283] dumpGattClientEvent(): GATT Event: Unknown 22:22:41.835 -> [V][BLEUtils.cpp:951] gattClientEventTypeToString(): Unknown GATT Client event type: 40 22:22:41.835 -> [D][BLEClient.cpp:158] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 22:22:41.878 -> [D][BLEDevice.cpp:583] updatePeerDevice(): update conn_id: 4, GATT role: client 22:22:41.878 -> [W][Connection.cpp:181] my_gattc_event_handler(): custom gattc event handler, event: 40 22:22:41.878 -> [V][BLEUtils.cpp:951] gattClientEventTypeToString(): Unknown GATT Client event type: 2 22:22:41.878 -> [D][BLEDevice.cpp:154] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 22:22:41.878 -> [V][BLEUtils.cpp:951] gattClientEventTypeToString(): Unknown GATT Client event type: 2 22:22:41.878 -> [V][BLEUtils.cpp:1283] dumpGattClientEvent(): GATT Event: Unknown 22:22:41.928 -> [V][BLEUtils.cpp:951] gattClientEventTypeToString(): Unknown GATT Client event type: 2 22:22:41.928 -> [D][BLEClient.cpp:158] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 22:22:41.928 -> [V][FreeRTOS.cpp:143] give(): Semaphore giving: name: OpenEvt (0x3ffde098), owner: connect 22:22:41.928 -> [V][FreeRTOS.cpp:77] wait(): << wait: Semaphore released: name: OpenEvt (0x3ffde098), owner: <N/A> 22:22:41.928 -> [W][Connection.cpp:181] my_gattc_event_handler(): custom gattc event handler, event: 2 22:22:41.928 -> [V][BLEClient.cpp:129] connect(): << connect(), rc=1 22:22:41.979 -> [V][BLEClient.cpp:377] getService(): >> getService: uuid: 71c1e128-d92f-4fa8-a2b2-0f171db343 22:22:41.979 -> [V][BLEClient.cpp:413] getServices(): >> getServices 22:22:41.979 -> [V][BLEClient.cpp:71] clearServices(): >> clearServices 22:22:41.979 -> [V][BLEClient.cpp:78] clearServices(): << clearServices 22:22:41.979 -> [D][FreeRTOS.cpp:189] take(): Semaphore taking: name: SearchCmplEvt (0x3ffde0f8), owner: <N/A> for getServices 22:22:41.979 -> [D][FreeRTOS.cpp:198] take(): Semaphore taken: name: SearchCmplEvt (0x3ffde0f8), owner: getServices 22:22:41.979 -> [V][FreeRTOS.cpp:63] wait(): >> wait: Semaphore waiting: name: SearchCmplEvt (0x3ffde0f8), owner: getServices for getServices 22:22:42.611 -> [V][BLEUtils.cpp:951] gattClientEventTypeToString(): Unknown GATT Client event type: 7 22:22:42.611 -> [D][BLEDevice.cpp:154] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 22:22:42.611 -> [V][BLEUtils.cpp:951] gattClientEventTypeToString(): Unknown GATT Client event type: 7 22:22:42.611 -> [V][BLEUtils.cpp:1283] dumpGattClientEvent(): GATT Event: Unknown 22:22:42.611 -> [V][BLEUtils.cpp:951] gattClientEventTypeToString(): Unknown GATT Client event type: 7 22:22:42.611 -> [D][BLEClient.cpp:158] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 22:22:42.661 -> [V][BLERemoteService.cpp:26] BLERemoteService(): >> BLERemoteService() 22:22:42.661 -> [V][BLERemoteService.cpp:34] BLERemoteService(): << BLERemoteService() 22:22:42.661 -> [W][Connection.cpp:181] my_gattc_event_handler(): custom gattc event handler, event: 7 22:22:42.661 -> [V][BLEUtils.cpp:951] gattClientEventTypeToString(): Unknown GATT Client event type: 7 22:22:42.661 -> [D][BLEDevice.cpp:154] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 22:22:42.661 -> [V][BLEUtils.cpp:951] gattClientEventTypeToString(): Unknown GATT Client event type: 7 22:22:42.711 -> [V][BLEUtils.cpp:1283] dumpGattClientEvent(): GATT Event: Unknown 22:22:42.711 -> [V][BLEUtils.cpp:951] gattClientEventTypeToString(): Unknown GATT Client event type: 7 22:22:42.711 -> [D][BLEClient.cpp:158] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 22:22:42.711 -> [V][BLERemoteService.cpp:26] BLERemoteService(): >> BLERemoteService() 22:22:42.711 -> [V][BLERemoteService.cpp:34] BLERemoteService(): << BLERemoteService() 22:22:42.711 -> [W][Connection.cpp:181] my_gattc_event_handler(): custom gattc event handler, event: 7 22:22:42.711 -> [V][BLEUtils.cpp:951] gattClientEventTypeToString(): Unknown GATT Client event type: 7 22:22:42.745 -> [D][BLEDevice.cpp:154] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 22:22:42.745 -> [V][BLEUtils.cpp:951] gattClientEventTypeToString(): Unknown GATT Client event type: 7 22:22:42.745 -> [V][BLEUtils.cpp:1283] dumpGattClientEvent(): GATT Event: Unknown 22:22:42.745 -> [V][BLEUtils.cpp:951] gattClientEventTypeToString(): Unknown GATT Client event type: 7 22:22:42.745 -> [D][BLEClient.cpp:158] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 22:22:42.794 -> [V][BLERemoteService.cpp:26] BLERemoteService(): >> BLERemoteService() 22:22:42.794 -> [V][BLERemoteService.cpp:34] BLERemoteService(): << BLERemoteService() 22:22:42.794 -> [W][Connection.cpp:181] my_gattc_event_handler(): custom gattc event handler, event: 7 22:22:42.794 -> [V][BLEUtils.cpp:951] gattClientEventTypeToString(): Unknown GATT Client event type: 7 22:22:42.794 -> [D][BLEDevice.cpp:154] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 22:22:42.794 -> [V][BLEUtils.cpp:951] gattClientEventTypeToString(): Unknown GATT Client event type: 7 22:22:42.839 -> [V][BLEUtils.cpp:1283] dumpGattClientEvent(): GATT Event: Unknown 22:22:42.839 -> [V][BLEUtils.cpp:951] gattClientEventTypeToString(): Unknown GATT Client event type: 7 22:22:42.839 -> [D][BLEClient.cpp:158] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 22:22:42.839 -> [V][BLERemoteService.cpp:26] BLERemoteService(): >> BLERemoteService() 22:22:42.839 -> [V][BLERemoteService.cpp:34] BLERemoteService(): << BLERemoteService() 22:22:42.839 -> [W][Connection.cpp:181] my_gattc_event_handler(): custom gattc event handler, event: 7 22:22:42.839 -> [V][BLEUtils.cpp:951] gattClientEventTypeToString(): Unknown GATT Client event type: 7 22:22:42.878 -> [D][BLEDevice.cpp:154] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 22:22:42.878 -> [V][BLEUtils.cpp:951] gattClientEventTypeToString(): Unknown GATT Client event type: 7 22:22:42.878 -> [V][BLEUtils.cpp:1283] dumpGattClientEvent(): GATT Event: Unknown 22:22:42.878 -> [V][BLEUtils.cpp:951] gattClientEventTypeToString(): Unknown GATT Client event type: 7 22:22:42.878 -> [D][BLEClient.cpp:158] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 22:22:42.928 -> [V][BLERemoteService.cpp:26] BLERemoteService(): >> BLERemoteService() 22:22:42.928 -> [V][BLERemoteService.cpp:34] BLERemoteService(): << BLERemoteService() 22:22:42.928 -> [W][Connection.cpp:181] my_gattc_event_handler(): custom gattc event handler, event: 7 22:22:42.928 -> [V][BLEUtils.cpp:951] gattClientEventTypeToString(): Unknown GATT Client event type: 6 22:22:42.928 -> [D][BLEDevice.cpp:154] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 22:22:42.928 -> [V][BLEUtils.cpp:951] gattClientEventTypeToString(): Unknown GATT Client event type: 6 22:22:42.977 -> [V][BLEUtils.cpp:1283] dumpGattClientEvent(): GATT Event: Unknown 22:22:42.977 -> [V][BLEUtils.cpp:951] gattClientEventTypeToString(): Unknown GATT Client event type: 6 22:22:42.977 -> [D][BLEClient.cpp:158] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 22:22:42.977 -> [V][FreeRTOS.cpp:143] give(): Semaphore giving: name: SearchCmplEvt (0x3ffde0f8), owner: getServices 22:22:42.977 -> [V][FreeRTOS.cpp:77] wait(): << wait: Semaphore released: name: SearchCmplEvt (0x3ffde0f8), owner: <N/A> 22:22:42.977 -> [W][Connection.cpp:181] my_gattc_event_handler(): custom gattc event handler, event: 6 22:22:43.015 -> [V][BLEClient.cpp:430] getServices(): << getServices 22:22:43.015 -> [V][BLEUtils.cpp:951] gattClientEventTypeToString(): Unknown GATT Client event type: 18 22:22:43.015 -> [V][BLEClient.cpp:390] getService(): << getService: found the service with uuid: 71c1e128-d92f-4fa8-a2b2-0f171db343 22:22:43.015 -> [D][BLEDevice.cpp:154] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 22:22:43.015 -> [V][BLEUtils.cpp:951] gattClientEventTypeToString(): Unknown GATT Client event type: 18 22:22:43.015 -> [V][BLERemoteService.cpp:162] retrieveCharacteristics(): >> getCharacteristics() for service: 71c1e128-d92f-4fa8-a2b2-0f171db343 22:22:43.061 -> [V][BLEUtils.cpp:1283] dumpGattClientEvent(): GATT Event: Unknown 22:22:43.061 -> [D][BLERemoteService.cpp:193] retrieveCharacteristics(): Found a characteristic: Handle: 56, UUID: 503dd605-9bcb-4f6e-b235-270a574830 22:22:43.061 -> [V][BLEUtils.cpp:951] gattClientEventTypeToString(): Unknown GATT Client event type: 18 22:22:43.061 -> [V][BLERemoteCharacteristic.cpp:36] BLERemoteCharacteristic(): >> BLERemoteCharacteristic: handle: 56 0x56, uuid: 503dd605-9bcb-4f6e-b235-270a574830 22:22:43.111 -> [D][BLEClient.cpp:158] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 22:22:43.111 -> [V][BLERemoteCharacteristic.cpp:250] retrieveDescriptors(): >> retrieveDescriptors() for characteristic: 503dd605-9bcb-4f6e-b235-270a574830 22:22:43.111 -> [W][Connection.cpp:181] my_gattc_event_handler(): custom gattc event handler, event: 18 22:22:43.111 -> [D][BLERemoteCharacteristic.cpp:280] retrieveDescriptors(): Found a descriptor: Handle: 57, UUID: 4a982902-1cc4-e7c1-c757-f1267dd021 22:22:43.145 -> [V][BLERemoteCharacteristic.cpp:294] retrieveDescriptors(): << retrieveDescriptors(): Found 1 descriptors. 22:22:43.145 -> [V][BLERemoteCharacteristic.cpp:45] BLERemoteCharacteristic(): << BLERemoteCharacteristic 22:22:43.145 -> [V][BLERemoteService.cpp:209] retrieveCharacteristics(): << getCharacteristics() 22:22:43.145 -> - Found our characteristic 22:22:43.145 -> CanRead : 1 22:22:43.145 -> CanWrite : 0 22:22:43.145 -> CanNotify : 1 22:22:43.145 -> CanIndicate : 0 22:22:43.145 -> [V][BLERemoteCharacteristic.cpp:323] getDescriptor(): >> getDescriptor: uuid: 2902-0000-1000-8000-00805f9b34fb 22:22:43.145 -> [V][BLERemoteCharacteristic.cpp:331] getDescriptor(): << getDescriptor: Not found 22:22:43.194 -> Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled. 22:22:43.194 -> Core 1 register dump: 22:22:43.194 -> PC : 0x400d7f80 PS : 0x00060530 A0 : 0x800d8075 A1 : 0x3ffc8890 22:22:43.194 -> A2 : 0x3ffc6380 A3 : 0x00000000 A4 : 0x3ffc8924 A5 : 0x3ffbee7c 22:22:43.194 -> A6 : 0x3ffc5554 A7 : 0x00000038 A8 : 0x00000000 A9 : 0x00000000 22:22:43.194 -> A10 : 0x0000004b A11 : 0x00000062 A12 : 0x00000001 A13 : 0x00000000 22:22:43.256 -> A14 : 0x00000000 A15 : 0xffffffac SAR : 0x00000004 EXCCAUSE: 0x0000001c 22:22:43.256 -> EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xfffffffd 22:22:43.256 -> 22:22:43.256 -> Backtrace: 0x400d7f80:0x3ffc8890 0x400d8072:0x3ffc8900 0x400d208e:0x3ffc8960 0x400d23e7:0x3ffc89b0 0x400d24c3:0x3ffc89d0 0x400d38ed:0x3ffc8a10 0x400dd125:0x3ffc8af0 0x4008e5f1:0x3ffc8b10 22:22:43.256 -> 22:22:43.256 -> Rebooting...

And here the output from ExceptionDecoder:
`PC: 0x400d7efc: BLERemoteDescriptor::toStringabi:cxx11 at C:\Users\User\Documents\Arduino\hardware\Espressif\esp32\libraries\BLE\src\BLERemoteDescriptor.cpp line 117
EXCVADDR: 0x00000000

Decoding stack results
0x400d7efc: BLERemoteDescriptor::toStringabi:cxx11 at C:\Users\User\Documents\Arduino\hardware\Espressif\esp32\libraries\BLE\src\BLERemoteDescriptor.cpp line 117
0x400d7fee: BLERemoteDescriptor::writeValue(unsigned char*, unsigned int, bool) at C:\Users\User\Documents\Arduino\hardware\Espressif\esp32\libraries\BLE\src\BLERemoteDescriptor.cpp line 132
0x400d2082: connectToServer() at C:\Users\User\AppData\Local\Temp\arduino_build_877457\sketch\Connection.cpp line 91
0x400d23c7: connect() at C:\Users\User\AppData\Local\Temp\arduino_build_877457\sketch\Connection.cpp line 163
0x400d24a3: scan() at C:\Users\User\AppData\Local\Temp\arduino_build_877457\sketch\Connection.cpp line 108
0x400d3817: setup() at C:\Users\User\Documents\Arduino\esp32_komoot_ble/esp32_komoot_ble.ino line 65
0x400dd08f: loopTask(void*) at C:\Users\User\Documents\Arduino\hardware\Espressif\esp32\cores\esp32\main.cpp line 14
0x4008e5f1: vPortTaskWrapper at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/freertos/port.c line 143
`

What's the problem and how I can fix this?

@chegewara
Copy link
Collaborator

chegewara commented Sep 9, 2019

getDescriptor(): << getDescriptor: Not found

Which is strange, because this characteristic can send notifications:

22:22:43.145 -> - Found our characteristic 
22:22:43.145 -> CanRead : 1 
22:22:43.145 -> CanWrite : 0 
22:22:43.145 -> CanNotify : 1 
22:22:43.145 -> CanIndicate : 0 

So, i am suspecting that android app is broken and does not have required 2902 descriptor.

@coltc50
Copy link
Author

coltc50 commented Sep 9, 2019

Thank you. But how can I fix this?

When I comment these two lines out it didn't crash but then it doesn't notify...

//pRemoteCharacteristic->getDescriptor(BLEUUID((uint16_t)0x2902))->writeValue((uint8_t*)notificationOn, 2, true);

//pRemoteCharacteristic->registerForNotify(notifyCallback);

@chegewara
Copy link
Collaborator

Fix android app.

@coltc50
Copy link
Author

coltc50 commented Sep 10, 2019

That I cannot do because it's the official Komoot App.

Is there no work around I can do on ESP32 side?

Maybe hardcoding address or something?

@chegewara
Copy link
Collaborator

chegewara commented Sep 10, 2019

Like i said earlier, this means android app.

What you could do is to comment out those lines:
https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/BLERemoteCharacteristic.cpp#L465-L466

and this one in your app:

//pRemoteCharacteristic->getDescriptor(BLEUUID((uint16_t)0x2902))->writeValue((uint8_t*)notificationOn, 2, true);

BTW nice device

EDIT this will obviously brake iPhone connection

@coltc50
Copy link
Author

coltc50 commented Sep 10, 2019

It works, it works... Thank you so much. No problem to break IPhone because I didn't have one...
How can I donate? Thank you again!

Now I can make me thoughts about a housing.

Great. You made my day!

@chegewara
Copy link
Collaborator

Im glad it worked.

@coltc50
Copy link
Author

coltc50 commented Oct 9, 2019

Sorry to post again but since a few days it doesn't work anymore. Now it stuck anytime. Don't know witch update caused this.

Here Log:
19:44:38.915 -> - Found our characteristic 19:44:38.915 -> CanRead : 1 19:44:38.915 -> CanWrite : 0 19:44:38.915 -> CanNotify : 1 19:44:38.915 -> CanIndicate : 0 19:44:38.915 -> [D][BLERemoteCharacteristic.cpp:444] registerForNotify(): >> registerForNotify(): Characteristic: uuid: 503dd605-9bcb-4f6e-b235-270a57483026, handle: 56 0x38, props: broadcast: 0, read: 1, write_nr: 0, write: 0, notify: 1, indicate: 0, auth: 0 19:44:38.950 -> [D][FreeRTOS.cpp:165] take(): Semaphore taking: name: RegForNotifyEvt (0x3ffed968), owner: <N/A> for registerForNotify 19:44:38.950 -> [D][FreeRTOS.cpp:174] take(): Semaphore taken: name: RegForNotifyEvt (0x3ffed968), owner: registerForNotify 19:44:38.950 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 38 19:44:38.950 -> [D][BLEDevice.cpp:150] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 19:44:38.985 -> [D][BLERemoteCharacteristic.cpp:329] getDescriptor(): >> getDescriptor: uuid: 00002902-0000-1000-8000-00805f9b34fb 19:44:38.985 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 38 19:44:38.985 -> [D][BLERemoteCharacteristic.cpp:337] getDescriptor(): << getDescriptor: Not found 19:44:38.985 -> [V][BLEUtils.cpp:1284] dumpGattClientEvent(): GATT Event: Unknown 19:44:38.985 -> [V][FreeRTOS.cpp:70] wait(): >> wait: Semaphore waiting: name: RegForNotifyEvt (0x3ffed968), owner: registerForNotify for registerForNotify 19:44:39.019 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 38 19:44:39.019 -> [D][BLEClient.cpp:165] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 19:44:39.019 -> [V][FreeRTOS.cpp:120] give(): Semaphore giving: name: RegForNotifyEvt (0x3ffed968), owner: registerForNotify 19:44:39.019 -> [W][Connection.cpp:182] my_gattc_event_handler(): custom gattc event handler, event: 38 19:44:39.019 -> [V][FreeRTOS.cpp:86] wait(): << wait: Semaphore released: name: RegForNotifyEvt (0x3ffed968), owner: registerForNotify 19:44:39.054 -> [D][BLERemoteCharacteristic.cpp:484] registerForNotify(): << registerForNotify() 19:44:39.054 -> 19:44:40.042 -> Loop 19:44:41.051 -> Loop 19:44:42.025 -> Loop 19:44:43.030 -> Loop 19:44:43.406 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 15 19:44:43.406 -> [D][BLEDevice.cpp:150] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 19:44:43.406 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 15 19:44:43.406 -> [V][BLEUtils.cpp:1284] dumpGattClientEvent(): GATT Event: Unknown 19:44:43.406 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 15 19:44:43.406 -> [D][BLEClient.cpp:165] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 19:44:43.453 -> [I][BLEClient.cpp:171] gattClientEventHandler(): SERVICE CHANGED 19:44:43.453 -> [W][Connection.cpp:182] my_gattc_event_handler(): custom gattc event handler, event: 15 19:44:44.069 -> Loop 19:44:44.069 -> Connection lost or navigation turned off! Reconnecting... 19:44:44.069 -> [D][BLEClient.cpp:146] disconnect(): >> disconnect() 19:44:44.069 -> [D][BLEClient.cpp:152] disconnect(): << disconnect() 19:44:44.069 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 5 19:44:44.069 -> [D][BLEDevice.cpp:150] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 19:44:44.069 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 5 19:44:44.069 -> [V][BLEUtils.cpp:1284] dumpGattClientEvent(): GATT Event: Unknown 19:44:44.139 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 5 19:44:44.139 -> [D][BLEClient.cpp:165] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 19:44:44.139 -> [W][Connection.cpp:182] my_gattc_event_handler(): custom gattc event handler, event: 5 19:44:44.139 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 41 19:44:44.139 -> [D][BLEDevice.cpp:150] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 19:44:44.139 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 41 19:44:44.174 -> [V][BLEUtils.cpp:1284] dumpGattClientEvent(): GATT Event: Unknown 19:44:44.174 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 41 19:44:44.174 -> [D][BLEClient.cpp:165] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 19:44:44.174 -> [I][BLEDevice.cpp:607] removePeerDevice(): remove: 0, GATT role client 19:44:44.174 -> [V][FreeRTOS.cpp:120] give(): Semaphore giving: name: RssiCmplEvt (0x3ffeb454), owner: <N/A> 19:44:44.174 -> [V][FreeRTOS.cpp:120] give(): Semaphore giving: name: SearchCmplEvt (0x3ffeb3f4), owner: <N/A> 19:44:44.209 -> [W][Connection.cpp:182] my_gattc_event_handler(): custom gattc event handler, event: 41 19:44:44.209 -> 19:44:44.209 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 1 19:44:44.209 -> [D][BLEDevice.cpp:150] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 19:44:44.209 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 1 19:44:44.209 -> [V][BLEUtils.cpp:1284] dumpGattClientEvent(): GATT Event: Unknown 19:44:44.209 -> [W][Connection.cpp:182] my_gattc_event_handler(): custom gattc event handler, event: 1 19:44:44.347 -> Reconnecting to 75:xx:xx:xx:e0:93 19:44:44.347 -> [D][BLEClient.cpp:103] connect(): >> connect(75:xx:xx:xx:e0:93) 19:44:44.347 -> [I][BLEDevice.cpp:596] addPeerDevice(): add conn_id: 1, GATT role: client 19:44:44.347 -> [D][FreeRTOS.cpp:165] take(): Semaphore taking: name: RegEvt (0x3ffeb140), owner: <N/A> for connect 19:44:44.347 -> [D][FreeRTOS.cpp:174] take(): Semaphore taken: name: RegEvt (0x3ffeb140), owner: connect 19:44:44.347 -> [V][FreeRTOS.cpp:70] wait(): >> wait: Semaphore waiting: name: RegEvt (0x3ffeb140), owner: connect for connect 19:44:44.347 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 0 19:44:44.381 -> [D][BLEDevice.cpp:150] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 19:44:44.381 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 0 19:44:44.381 -> [V][BLEUtils.cpp:1284] dumpGattClientEvent(): GATT Event: Unknown 19:44:44.381 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 0 19:44:44.381 -> [D][BLEClient.cpp:165] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 19:44:44.381 -> [V][FreeRTOS.cpp:120] give(): Semaphore giving: name: RegEvt (0x3ffeb140), owner: connect 19:44:44.415 -> [W][Connection.cpp:182] my_gattc_event_handler(): custom gattc event handler, event: 0 19:44:44.415 -> [V][FreeRTOS.cpp:86] wait(): << wait: Semaphore released: name: RegEvt (0x3ffeb140), owner: connect 19:44:44.415 -> [D][FreeRTOS.cpp:165] take(): Semaphore taking: name: OpenEvt (0x3ffeb394), owner: <N/A> for connect 19:44:44.415 -> [D][FreeRTOS.cpp:174] take(): Semaphore taken: name: OpenEvt (0x3ffeb394), owner: connect 19:44:44.415 -> [V][FreeRTOS.cpp:70] wait(): >> wait: Semaphore waiting: name: OpenEvt (0x3ffeb394), owner: connect for connect 19:45:14.472 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 41 19:45:14.472 -> [D][BLEDevice.cpp:150] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 19:45:14.472 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 41 19:45:14.472 -> [V][BLEUtils.cpp:1284] dumpGattClientEvent(): GATT Event: Unknown 19:45:14.472 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 41 19:45:14.472 -> [D][BLEClient.cpp:165] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 19:45:14.506 -> [I][BLEDevice.cpp:607] removePeerDevice(): remove: 1, GATT role client 19:45:14.506 -> [V][FreeRTOS.cpp:120] give(): Semaphore giving: name: RssiCmplEvt (0x3ffeb454), owner: <N/A> 19:45:14.506 -> [V][FreeRTOS.cpp:120] give(): Semaphore giving: name: SearchCmplEvt (0x3ffeb3f4), owner: <N/A> 19:45:14.506 -> [W][Connection.cpp:182] my_gattc_event_handler(): custom gattc event handler, event: 41 19:45:14.506 -> 19:45:14.506 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 2 19:45:14.506 -> [D][BLEDevice.cpp:150] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 19:45:14.541 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 2 19:45:14.541 -> [V][BLEUtils.cpp:1284] dumpGattClientEvent(): GATT Event: Unknown 19:45:14.541 -> [W][Connection.cpp:182] my_gattc_event_handler(): custom gattc event handler, event: 2 19:45:14.541 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 1 19:45:14.541 -> [D][BLEDevice.cpp:150] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown 19:45:14.541 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 1 19:45:14.574 -> [V][BLEUtils.cpp:1284] dumpGattClientEvent(): GATT Event: Unknown 19:45:14.574 -> [W][Connection.cpp:182] my_gattc_event_handler(): custom gattc event handler, event: 1

@chegewara
Copy link
Collaborator

Make sure you are using library updated with this PR (on arduino only), or code will stuck on semaphore:
espressif/arduino-esp32#2974

19:44:44.347 -> Reconnecting to 75:xx:xx:xx:e0:93
19:44:44.347 -> [D][BLEClient.cpp:103] connect(): >> connect(75:xx:xx:xx:e0:93)
19:44:44.347 -> [I][BLEDevice.cpp:596] addPeerDevice(): add conn_id: 1, GATT role: client
19:44:44.347 -> [D][FreeRTOS.cpp:165] take(): Semaphore taking: name: RegEvt (0x3ffeb140), owner: <N/A> for connect
19:44:44.347 -> [D][FreeRTOS.cpp:174] take(): Semaphore taken:  name: RegEvt (0x3ffeb140), owner: connect
19:44:44.347 -> [V][FreeRTOS.cpp:70] wait(): >> wait: Semaphore waiting: name: RegEvt (0x3ffeb140), owner: connect for connect
19:44:44.347 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 0
19:44:44.381 -> [D][BLEDevice.cpp:150] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown
19:44:44.381 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 0
19:44:44.381 -> [V][BLEUtils.cpp:1284] dumpGattClientEvent(): GATT Event: Unknown
19:44:44.381 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 0
19:44:44.381 -> [D][BLEClient.cpp:165] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown
19:44:44.381 -> [V][FreeRTOS.cpp:120] give(): Semaphore giving: name: RegEvt (0x3ffeb140), owner: connect
19:44:44.415 -> [W][Connection.cpp:182] my_gattc_event_handler(): custom gattc event handler, event: 0
19:44:44.415 -> [V][FreeRTOS.cpp:86] wait(): << wait: Semaphore released: name: RegEvt (0x3ffeb140), owner: connect
19:44:44.415 -> [D][FreeRTOS.cpp:165] take(): Semaphore taking: name: OpenEvt (0x3ffeb394), owner: <N/A> for connect
19:44:44.415 -> [D][FreeRTOS.cpp:174] take(): Semaphore taken:  name: OpenEvt (0x3ffeb394), owner: connect
19:44:44.415 -> [V][FreeRTOS.cpp:70] wait(): >> wait: Semaphore waiting: name: OpenEvt (0x3ffeb394), owner: connect for connect
19:45:14.472 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 41
19:45:14.472 -> [D][BLEDevice.cpp:150] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown
19:45:14.472 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 41
19:45:14.472 -> [V][BLEUtils.cpp:1284] dumpGattClientEvent(): GATT Event: Unknown
19:45:14.472 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 41
19:45:14.472 -> [D][BLEClient.cpp:165] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown
19:45:14.506 -> [I][BLEDevice.cpp:607] removePeerDevice(): remove: 1, GATT role client
19:45:14.506 -> [V][FreeRTOS.cpp:120] give(): Semaphore giving: name: RssiCmplEvt (0x3ffeb454), owner: <N/A>
19:45:14.506 -> [V][FreeRTOS.cpp:120] give(): Semaphore giving: name: SearchCmplEvt (0x3ffeb3f4), owner: <N/A>
19:45:14.506 -> [W][Connection.cpp:182] my_gattc_event_handler(): custom gattc event handler, event: 41
19:45:14.506 -> 
19:45:14.506 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 2
19:45:14.506 -> [D][BLEDevice.cpp:150] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown
19:45:14.541 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 2
19:45:14.541 -> [V][BLEUtils.cpp:1284] dumpGattClientEvent(): GATT Event: Unknown
19:45:14.541 -> [W][Connection.cpp:182] my_gattc_event_handler(): custom gattc event handler, event: 2
19:45:14.541 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 1
19:45:14.541 -> [D][BLEDevice.cpp:150] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown
19:45:14.541 -> [V][BLEUtils.cpp:952] gattClientEventTypeToString(): Unknown GATT Client event type: 1
19:45:14.574 -> [V][BLEUtils.cpp:1284] dumpGattClientEvent(): GATT Event: Unknown
19:45:14.574 -> [W][Connection.cpp:182] my_gattc_event_handler(): custom gattc event handler, event: 1

@coltc50
Copy link
Author

coltc50 commented Oct 10, 2019

@chegewara
Again big thanks to you. It seems I had an old library in. Deleted all double and now its working. Thank you again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants