Closed Goutham8128 closed 5 years ago
From this line https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/tests/BLETests/Arduino/BLE_client/BLE_client.ino#L78, when serviceUUID equals service UUID advertised by your dongle, esp32 should have connect to your server dongle. There may be one issue, if dongle is advertising more than one service because at the moment getServiceUUID() returns only one advertised UUID and its the first found. You may try to change this line to connect if dongle name is recognized.
Just to be sure. You are using library from this repo and not from official esp32/arduino?
Hi
As you said the line 78 is same in my code and Dongle is advertising one service and exhibits 3 to 4 characteristics. I have mentioned the specific characteristic UUID in the code. though it is not connecting. And i cloned the libraries from esp32/arduino only. Shouldn't i do this?
Can you paste some logs from serial output? And yes, arduino library is 30 days outdated
Ok, now i assuming that you changed serviceUUID in BLE_client code to match that one from dongle, which is 0x2ea7. Can you try to use whole advertised serviceUUID as a string? its 00002ae7-.....
no I used the whole UUID
On the first screenshot serviceUUID looks different. Compare it and change in your code please.
The service UUID which is shown in the console window is not correct.Actually the service UUID which i mentioned in the code is correct, this I have verified with the Sensor dongle documentation.But when i upload the code to ESP-32 the console window is showing the different service UUID.How is it possible? And when i run the BLEscan.ino code of arduino/esp32 library i have got the same output i.e the same service UUID which i have got in the output console of the BLEclient.ino.
This mean we have issue with library. Requires investigations. Be patience please and thank you for all provided info.
Sure and thanks for your guidance
Hi
i am using the arduino/esp32 library .I followed the procedure mentioned in Neil kolban's book for esp32. what do u mean by using this repo? Both libraries aren't same?
No they are not the same. Arduino library last time was updated about month ago and there has been made a lot changes and bug fixes since then. You may want to read this https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/ArduinoBLE.md
I have done this steps.The BLEclient.ino is compiled with no errors but not displaying the correct service UUID and not getting connected to the characteristics.So,What might be the problem for that?
This may be some issue with library, i will have to investigate this. I dont have this dongle, but i will try to use second esp32 to emulate it.
OK. thank you.
issue with the BLEclient.h?
More like with BLEUUID, just guessing. Or RemoteService. There is few possibilities. Or maybe just BLEClient.ino
ok
Like i said, i dont have that dongle, but i did quick test with BLE_client connected to BLE_server and it works. Here you can find listings ive been using to test https://github.com/chegewara/esp32-tests-library/tree/master/arduino/.
In your case you only need to change those lines to match your needs https://github.com/chegewara/esp32-tests-library/blob/master/arduino/BLE_client_uuid_advertising/BLE_client_uuid_advertising.ino#L12-L14
thank you. I will get back to you with the result.
Hi
I changed those two lines and added #define SERVICE_UUID and #define CHARACTERISTIC_UUID to my code but there is no change.It is displaying another service UUID and not getting connected to the characteristics.
Is this code only making two esp32's act as client and server or can i use other module as Server to send data to esp32?
Oh no, for sure you can use any module, any BLE peripheral to connect with esp32. Just there is some glitch i cant debug without device. Maybe @nkolban will have one and can help with this issue. Anyway, i will try something else later today.
ok. Try to help me with this.Thank you.
Hi In Neil Kolban's book ,it is mentioned that the service UUID format is in the form of which i highlighted in the image. Only the first 2 bytes are needed to identify the type of service. So it is matched with the output in the serial monitor console i.e 0002ea7. So I think in the code the characteristic function is not getting executed it is getting stopped at the services loop. So should I do any changes in the code to get connected to the characteristics of the BLE server?
Well known services are 16 bit, just like in your case https://github.com/nkolban/esp32-snippets/issues/198#issuecomment-344175281 BLE_client is nice example code. You have this line https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/tests/BLETests/Arduino/BLE_client/BLE_client.ino#L81, and if its not printed in serial monitor then you need to move few lines back and check why. With help comes this line: https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/tests/BLETests/Arduino/BLE_client/BLE_client.ino#L75 Like i said few days ago there is a difference between service UUID in your code, you said its service uuid from manual, and service UUID printed in serial monitor recognised by BLE scan.
Try to change this line https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/tests/BLETests/Arduino/BLE_client/BLE_client.ino#L78
with this code:
if (advertisedDevice.haveServiceUUID() && advertisedDevice.getServiceUUID().equals(BLEUUID((uint16_t)0x2ea7))) {
Well, this is the output.Sensor is connected to the server but not getting connected to the characteristics.
I think just the Serial.print is getting executed not the main loop function. because it is getting error as 0x003e which means connection is not established
Now you have to enumerate characteristics to see what UUID they have or using ie nRF on android device just check what characteristics UUID are. This is example how i am doing this. Of course you can always install this app https://github.com/nkolban/ESP32_Explorer and use its functionality to enumerate characteristics.
I missed one thing from this screenshot. There is no output from loop: https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/tests/BLETests/Arduino/BLE_client/BLE_client.ino#L115 or this https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/tests/BLETests/Arduino/BLE_client/BLE_client.ino#L118
because of this https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/tests/BLETests/Arduino/BLE_client/BLE_client.ino#L41
Now when we know what do we need to do we need to move few steps back. Please revert code here to its original: https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/tests/BLETests/Arduino/BLE_client/BLE_client.ino#L78
and change this line:
https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/tests/BLETests/Arduino/BLE_client/BLE_client.ino#L9
with static BLEUUID serviceUUID((uint16_t)0x2ea7))
and your code will move further
We have 10 characteristics on this service 0x2ea7.Each characteristic is having individual 128bit UUID's which we have verified with the nRFconnect. One of the characteristic UUID is 2ea78970-7d44-44bb-b097-26183f402401
And in the output window nothing is missed.We have not got output of either of that two lines 115 and 118. The line connected to server indicates the line 34 and 38 are printed but the main loop is not getting executed.If it does then the line 115 would get executed. I think the main loop is not getting executed.
The main loop is executed, just code cant pass thru this line https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/tests/BLETests/Arduino/BLE_client/BLE_client.ino#L41
We can join iirc if you wish, will be faster to talk
yeah Sure i will get back to you by 3pm.I came for lunch.Sorry for the delay.
Well, its 9 am. I have to get some sleep now.
ok
what is your time zone?
Whenever you are ready. Im online for next few hours
I'm checking in for duty as well. Its thanks giving holidays for the next 9 days ... so ping on IRC in channel #ESP32
if we can offer assistance.
Are you available for a link screen share/skype? neil.kolban is my skype
https://github.com/nkolban/esp32-snippets/issues/172#issuecomment-345485748
This is logs output:
ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
ets Jun 8 2016 00:22:57
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:812
load:0x40078000,len:0
load:0x40078000,len:10212
entry 0x40078a00
ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
ets Jun 8 2016 00:22:57
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:812
load:0x40078000,len:0
load:0x40078000,len:10212
entry 0x40078a00
Starting Arduino BLE Client application...
[D][BLEScan.cpp:187] start(): >> start(duration=30)
[D][BLEUtils.cpp:1067] dumpGapEvent(): Received a GAP event: ESP_GAP_BLE_SCAN_PARAM_SET_COMPLETE_EVT
[D][BLEUtils.cpp:1205] dumpGapEvent(): [status: 0]
[D][BLEUtils.cpp:1067] dumpGapEvent(): Received a GAP event: ESP_GAP_BLE_SCAN_START_COMPLETE_EVT
[D][BLEUtils.cpp:1272] dumpGapEvent(): [status: 0]
[D][BLEUtils.cpp:1067] dumpGapEvent(): Received a GAP event: ESP_GAP_BLE_SCAN_RESULT_EVT
[D][BLEUtils.cpp:1828] eventTypeToString(): Unknown esp_ble_evt_type_t: 173 (0xad)
[D][BLEUtils.cpp:1241] dumpGapEvent(): search_evt: ESP_GAP_SEARCH_INQ_RES_EVT, bda: 30:ae:a4:06:4f:22, dev_type: ESP_BT_DEVICE_TYPE_BLE, ble_addr_type: BLE_ADDR_TYPE_PUBLIC, ble_evt_type: *** Unknown ***, rssi: -60, ble_adv: ??, flag: 6 ([LE General Discoverable Mode] [BR/EDR Not Supported] ), num_resps: 1, adv_data_len: 28, scan_rsp_len: 28
[D][BLEAdvertisedDevice.cpp:353] setRSSI(): - setRSSI(): rssi: -60
[D][BLEAdvertisedDevice.cpp:219] parseAdvertisement(): Type: 0x01 (ESP_BLE_AD_TYPE_FLAG), length: 1, data: 06
[D][BLEAdvertisedDevice.cpp:219] parseAdvertisement(): Type: 0x09 (ESP_BLE_AD_TYPE_NAME_CMPL), length: 10, data: 496f542d444b2d53464c
[D][BLEAdvertisedDevice.cpp:342] setName(): - setName(): name: IoT-DK-SFL
[D][BLEAdvertisedDevice.cpp:219] parseAdvertisement(): Type: 0x0a (ESP_BLE_AD_TYPE_TX_PWR), length: 1, data: eb
[D][BLEAdvertisedDevice.cpp:393] setTXPower(): - txPower: -21
[D][BLEAdvertisedDevice.cpp:219] parseAdvertisement(): Type: 0x03 (ESP_BLE_AD_TYPE_16SRV_CMPL), length: 2, data: e72a
[D][BLEAdvertisedDevice.cpp:382] setServiceUUID(): - addServiceUUID(): serviceUUID: 00002ae7-0000-1000-8000-00805f9b34fb
[D][BLEAdvertisedDevice.cpp:219] parseAdvertisement(): Type: 0x12 (ESP_BLE_AD_TYPE_INT_RANGE), length: 4, data: 20004000
[D][BLEAdvertisedDevice.cpp:278] parseAdvertisement(): Unhandled type: adType: 18 - 0x12
[D][BLEAdvertisedDevice.cpp:219] parseAdvertisement(): Type: 0x01 (ESP_BLE_AD_TYPE_FLAG), length: 1, data: 06
BLE Advertised Device found: Name: IoT-DK-SFL, Address: 30:ae:a4:06:4f:22, serviceUUID: 00002ae7-0000-1000-8000-00805f9b34fb, txPower: -21
Found our device! address: [D][BLEScan.cpp:223] stop(): >> stop()
[D][BLEScan.cpp:213] start(): << start()
[D][BLEScan.cpp:236] stop(): << stop()
[D][BLEUtils.cpp:1067] dumpGapEvent(): Received a GAP event: ESP_GAP_BLE_SCAN_RESULT_EVT
[D][BLEUtils.cpp:1828] eventTypeToString(): Unknown esp_ble_evt_type_t: 173 (0xad)
[D][BLEUtils.cpp:1241] dumpGapEvent(): search_evt: ESP_GAP_SEARCH_INQ_RES_EVT, bda: 30:ae:a4:06:4f:22, dev_type: ESP_BT_DEVICE_TYPE_BLE, ble_addr_type: BLE_ADDR_TYPE_PUBLIC, ble_evt_type: *** Unknown ***, rssi: -61, ble_adv: ??, flag: 6 ([LE General Discoverable Mode] [BR/EDR Not Supported] ), num_resps: 1, adv_data_len: 28, scan_rsp_len: 28
[D][BLEUtils.cpp:1067] dumpGapEvent(): Received a GAP event: ESP_GAP_BLE_SCAN_RESULT_EVT
[D][BLEUtils.cpp:1828] eventTypeToString(): Unknown esp_ble_evt_type_t: 173 (0xad)
[D][BLEUtils.cpp:1241] dumpGapEvent(): search_evt: ESP_GAP_SEARCH_INQ_RES_EVT, bda: 30:ae:a4:06:4f:22, dev_type: ESP_BT_DEVICE_TYPE_BLE, ble_addr_type: BLE_ADDR_TYPE_PUBLIC, ble_evt_type: *** Unknown ***, rssi: -45, ble_adv: ??, flag: 6 ([LE General Discoverable Mode] [BR/EDR Not Supported] ), num_resps: 1, adv_data_len: 28, scan_rsp_len: 28
[D][BLEUtils.cpp:1067] dumpGapEvent(): Received a GAP event: ESP_GAP_BLE_SCAN_RESULT_EVT
[D][BLEUtils.cpp:1828] eventTypeToString(): Unknown esp_ble_evt_type_t: 173 (0xad)
[D][BLEUtils.cpp:1241] dumpGapEvent(): search_evt: ESP_GAP_SEARCH_INQ_RES_EVT, bda: 30:ae:a4:06:4f:22, dev_type: ESP_BT_DEVICE_TYPE_BLE, ble_addr_type: BLE_ADDR_TYPE_PUBLIC, ble_evt_type: *** Unknown ***, rssi: -45, ble_adv: ??, flag: 6 ([LE General Discoverable Mode] [BR/EDR Not Supported] ), num_resps: 1, adv_data_len: 28, scan_rsp_len: 28
[D][BLEUtils.cpp:1067] dumpGapEvent(): Received a GAP event: ESP_GAP_BLE_SCAN_RESULT_EVT
[D][BLEUtils.cpp:1828] eventTypeToString(): Unknown esp_ble_evt_type_t: 173 (0xad)
[D][BLEUtils.cpp:1241] dumpGapEvent(): search_evt: ESP_GAP_SEARCH_INQ_RES_EVT, bda: 30:ae:a4:06:4f:22, dev_type: ESP_BT_DEVICE_TYPE_BLE, ble_addr_type: BLE_ADDR_TYPE_PUBLIC, ble_evt_type: *** Unknown ***, rssi: -45, ble_adv: ??, flag: 6 ([LE General Discoverable Mode] [BR/EDR Not Supported] ), num_resps: 1, adv_data_len: 28, scan_rsp_len: 28
[D][BLEUtils.cpp:1067] dumpGapEvent(): Received a GAP event: ESP_GAP_BLE_SCAN_RESULT_EVT
[D][BLEUtils.cpp:1828] eventTypeToString(): Unknown esp_ble_evt_type_t: 173 (0xad)
[D][BLEUtils.cpp:1241] dumpGapEvent(): search_evt: ESP_GAP_SEARCH_INQ_RES_EVT, bda: 30:ae:a4:06:4f:22, dev_type: ESP_BT_DEVICE_TYPE_BLE, ble_addr_type: BLE_ADDR_TYPE_PUBLIC, ble_evt_type: *** Unknown ***, rssi: -44, ble_adv: ??, flag: 6 ([LE General Discoverable Mode] [BR/EDR Not Supported] ), num_resps: 1, adv_data_len: 28, scan_rsp_len: 28
[D][BLEUtils.cpp:1067] dumpGapEvent(): Received a GAP event: ESP_GAP_BLE_SCAN_RESULT_EVT
[D][BLEUtils.cpp:1828] eventTypeToString(): Unknown esp_ble_evt_type_t: 173 (0xad)
[D][BLEUtils.cpp:1241] dumpGapEvent(): search_evt: ESP_GAP_SEARCH_INQ_RES_EVT, bda: 30:ae:a4:06:4f:22, dev_type: ESP_BT_DEVICE_TYPE_BLE, ble_addr_type: BLE_ADDR_TYPE_PUBLIC, ble_evt_type: *** Unknown ***, rssi: -57, ble_adv: ??, flag: 6 ([LE General Discoverable Mode] [BR/EDR Not Supported] ), num_resps: 1, adv_data_len: 28, scan_rsp_len: 28
[D][BLEUtils.cpp:1067] dumpGapEvent(): Received a GAP event: ESP_GAP_BLE_SCAN_STOP_COMPLETE_EVT
[D][BLEUtils.cpp:1284] dumpGapEvent(): [status: 0]
Forming a connection to 30:ae:a4:06:4f:22
- Created client
[D][BLEClient.cpp:75] connect(): >> connect(30:ae:a4:06:4f:22)
E (3210) BT: btc_gattc_call_handler()
[D][BLEDevice.cpp:105] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 3] ... ESP_GATTC_REG_EVT
[D][BLEUtils.cpp:1344] dumpGattClientEvent(): GATT Event: ESP_GATTC_REG_EVT
[D][BLEUtils.cpp:1516] dumpGattClientEvent(): [status: ESP_GATT_OK, app_id: 0x0]
[D][BLEDevice.cpp:105] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 3] ... ESP_GATTC_CONNECT_EVT
[D][BLEUtils.cpp:1344] dumpGattClientEvent(): GATT Event: ESP_GATTC_CONNECT_EVT
[D][BLEUtils.cpp:1374] dumpGattClientEvent(): [conn_id: 0, remote_bda: 30:ae:a4:06:4f:22]
[D][BLEDevice.cpp:105] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 3] ... ESP_GATTC_OPEN_EVT
[D][BLEUtils.cpp:1344] dumpGattClientEvent(): GATT Event: ESP_GATTC_OPEN_EVT
[D][BLEUtils.cpp:1469] dumpGattClientEvent(): [status: ESP_GATT_OK, conn_id: 0, remote_bda: 30:ae:a4:06:4f:22, mtu: 23]
[D][BLEClient.cpp:104] connect(): << connect(), rc=1
- Connected to server
[D][BLEClient.cpp:296] getService(): >> getService: uuid: 2ae78970-7d44-44bb-b097-26183f402400
[D][BLEClient.cpp:332] getServices(): >> getServices
[D][BLEDevice.cpp:105] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 3] ... ESP_GATTC_SEARCH_RES_EVT
[D][BLEUtils.cpp:1344] dumpGattClientEvent(): GATT Event: ESP_GATTC_SEARCH_RES_EVT
[D][BLEUtils.cpp:1568] dumpGattClientEvent(): [conn_id: 0, start_handle: 1 0x01, end_handle: 5 0x05, srvc_id: uuid: 00001801-0000-1000-8000-00805f9b34fb, inst_id: 1
[D][BLERemoteService.cpp:29] BLERemoteService(): >> BLERemoteService()
[D][BLERemoteService.cpp:37] BLERemoteService(): << BLERemoteService()
[D][BLEDevice.cpp:105] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 3] ... ESP_GATTC_SEARCH_RES_EVT
[D][BLEUtils.cpp:1344] dumpGattClientEvent(): GATT Event: ESP_GATTC_SEARCH_RES_EVT
[D][BLEUtils.cpp:1568] dumpGattClientEvent(): [conn_id: 0, start_handle: 20 0x14, end_handle: 28 0x1c, srvc_id: uuid: 00001800-0000-1000-8000-00805f9b34fb, inst_id: 1
[D][BLERemoteService.cpp:29] BLERemoteService(): >> BLERemoteService()
[D][BLERemoteService.cpp:37] BLERemoteService(): << BLERemoteService()
[D][BLEDevice.cpp:105] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 3] ... ESP_GATTC_SEARCH_RES_EVT
[D][BLEUtils.cpp:1344] dumpGattClientEvent(): GATT Event: ESP_GATTC_SEARCH_RES_EVT
[D][BLEUtils.cpp:1568] dumpGattClientEvent(): [conn_id: 0, start_handle: 40 0x28, end_handle: 65535 0xffff, srvc_id: uuid: 2ae78970-7d44-44bb-b097-26183f402400, inst_id: 1
[D][BLERemoteService.cpp:29] BLERemoteService(): >> BLERemoteService()
[D][BLERemoteService.cpp:37] BLERemoteService(): << BLERemoteService()
[D][BLEDevice.cpp:105] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 3] ... ESP_GATTC_SEARCH_CMPL_EVT
[D][BLEUtils.cpp:1344] dumpGattClientEvent(): GATT Event: ESP_GATTC_SEARCH_CMPL_EVT
[D][BLEUtils.cpp:1547] dumpGattClientEvent(): [status: ESP_GATT_OK, conn_id: 0]
[D][BLEClient.cpp:346] getServices(): << getServices
[D][BLEClient.cpp:309] getService(): << getService: found the service with uuid: 2ae78970-7d44-44bb-b097-26183f402400
- Found our service
[D][BLERemoteService.cpp:165] retrieveCharacteristics(): >> getCharacteristics() for service: 2ae78970-7d44-44bb-b097-26183f402400
[D][BLERemoteService.cpp:250] retrieveCharacteristics(): Found a characteristic: Handle: 42, UUID: 2ae78970-7d44-44bb-b097-26183f402401
[D][BLERemoteCharacteristic.cpp:40] BLERemoteCharacteristic(): >> BLERemoteCharacteristic: handle: 42 0x42, uuid: 2ae78970-7d44-44bb-b097-26183f402401
[D][BLERemoteCharacteristic.cpp:283] retrieveDescriptors(): >> retrieveDescriptors() for characteristic: 2ae78970-7d44-44bb-b097-26183f402401
[E][BLERemoteCharacteristic.cpp:314] retrieveDescriptors():
[D][BLERemoteCharacteristic.cpp:315] retrieveDescriptors(): Found a descriptor: Handle: 43, UUID: 00002902-0000-1000-8000-00805f9b34fb
[D][BLERemoteCharacteristic.cpp:329] retrieveDescriptors(): << retrieveDescriptors(): Found 1 descriptors.
[D][BLERemoteCharacteristic.cpp:48] BLERemoteCharacteristic(): << BLERemoteCharacteristic
[D][BLERemoteService.cpp:250] retrieveCharacteristics(): Found a characteristic: Handle: 45, UUID: 2ae78970-7d44-44bb-b097-26183f402402
[D][BLERemoteCharacteristic.cpp:40] BLERemoteCharacteristic(): >> BLERemoteCharacteristic: handle: 45 0x45, uuid: 2ae78970-7d44-44bb-b097-26183f402402
[D][BLERemoteCharacteristic.cpp:283] retrieveDescriptors(): >> retrieveDescriptors() for characteristic: 2ae78970-7d44-44bb-b097-26183f402402
[E][BLERemoteCharacteristic.cpp:314] retrieveDescriptors():
[D][BLERemoteCharacteristic.cpp:315] retrieveDescriptors(): Found a descriptor: Handle: 46, UUID: 00002902-0000-1000-8000-00805f9b34fb
[D][BLERemoteCharacteristic.cpp:329] retrieveDescriptors(): << retrieveDescriptors(): Found 1 descriptors.
[D][BLERemoteCharacteristic.cpp:48] BLERemoteCharacteristic(): << BLERemoteCharacteristic
[D][BLERemoteService.cpp:250] retrieveCharacteristics(): Found a characteristic: Handle: 48, UUID: 2ae78970-7d44-44bb-b097-26183f402403
[D][BLERemoteCharacteristic.cpp:40] BLERemoteCharacteristic(): >> BLERemoteCharacteristic: handle: 48 0x48, uuid: 2ae78970-7d44-44bb-b097-26183f402403
[D][BLERemoteCharacteristic.cpp:283] retrieveDescriptors(): >> retrieveDescriptors() for characteristic: 2ae78970-7d44-44bb-b097-26183f402403
[E][BLERemoteCharacteristic.cpp:314] retrieveDescriptors():
[D][BLERemoteCharacteristic.cpp:315] retrieveDescriptors(): Found a descriptor: Handle: 49, UUID: 00002902-0000-1000-8000-00805f9b34fb
[D][BLERemoteCharacteristic.cpp:329] retrieveDescriptors(): << retrieveDescriptors(): Found 1 descriptors.
[D][BLERemoteCharacteristic.cpp:48] BLERemoteCharacteristic(): << BLERemoteCharacteristic
[D][BLERemoteService.cpp:250] retrieveCharacteristics(): Found a characteristic: Handle: 51, UUID: 2ae78970-7d44-44bb-b097-26183f402404
[D][BLERemoteCharacteristic.cpp:40] BLERemoteCharacteristic(): >> BLERemoteCharacteristic: handle: 51 0x51, uuid: 2ae78970-7d44-44bb-b097-26183f402404
[D][BLERemoteCharacteristic.cpp:283] retrieveDescriptors(): >> retrieveDescriptors() for characteristic: 2ae78970-7d44-44bb-b097-26183f402404
[E][BLERemoteCharacteristic.cpp:314] retrieveDescriptors():
[D][BLERemoteCharacteristic.cpp:315] retrieveDescriptors(): Found a descriptor: Handle: 52, UUID: 00002902-0000-1000-8000-00805f9b34fb
[D][BLERemoteCharacteristic.cpp:329] retrieveDescriptors(): << retrieveDescriptors(): Found 1 descriptors.
[D][BLERemoteCharacteristic.cpp:48] BLERemoteCharacteristic(): << BLERemoteCharacteristic
[D][BLERemoteService.cpp:250] retrieveCharacteristics(): Found a characteristic: Handle: 54, UUID: 2ae78970-7d44-44bb-b097-26183f402405
[D][BLERemoteCharacteristic.cpp:40] BLERemoteCharacteristic(): >> BLERemoteCharacteristic: handle: 54 0x54, uuid: 2ae78970-7d44-44bb-b097-26183f402405
[D][BLERemoteCharacteristic.cpp:283] retrieveDescriptors(): >> retrieveDescriptors() for characteristic: 2ae78970-7d44-44bb-b097-26183f402405
[E][BLERemoteCharacteristic.cpp:314] retrieveDescriptors():
[D][BLERemoteCharacteristic.cpp:315] retrieveDescriptors(): Found a descriptor: Handle: 55, UUID: 00002902-0000-1000-8000-00805f9b34fb
[D][BLERemoteCharacteristic.cpp:329] retrieveDescriptors(): << retrieveDescriptors(): Found 1 descriptors.
[D][BLERemoteCharacteristic.cpp:48] BLERemoteCharacteristic(): << BLERemoteCharacteristic
[D][BLERemoteService.cpp:266] retrieveCharacteristics(): << getCharacteristics()
- Found our characteristic
[D][BLERemoteCharacteristic.cpp:433] readValue(): >> readValue(): uuid: 2ae78970-7d44-44bb-b097-26183f402401, handle: 42 0x2a
[D][BLEDevice.cpp:105] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 3] ... ESP_GATTC_READ_CHAR_EVT
[D][BLEUtils.cpp:1344] dumpGattClientEvent(): GATT Event: ESP_GATTC_READ_CHAR_EVT
[D][BLEUtils.cpp:1493] dumpGattClientEvent(): [status: ESP_GATT_OK, conn_id: 0, handle: 42 0x2a, value_len: 20]
[D][BLERemoteCharacteristic.cpp:455] readValue(): << readValue(): length: 20
The characteristic value was: Time since boot: 132
[D][BLERemoteCharacteristic.cpp:472] registerForNotify(): >> registerForNotify(): Characteristic: uuid: 2ae78970-7d44-44bb-b097-26183f402401, handle: 42 0x2a, props: broadcast: 0, read: 0, write_nr: 0, write: 0, notify: 1, indicate: 0, auth: 0
[D][BLEDevice.cpp:105] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 3] ... ESP_GATTC_REG_FOR_NOTIFY_EVT
[D][BLEUtils.cpp:1344] dumpGattClientEvent(): GATT Event: ESP_GATTC_REG_FOR_NOTIFY_EVT
[D][BLEUtils.cpp:1532] dumpGattClientEvent(): [status: ESP_GATT_OK, handle: 42 0x2a]
[D][BLERemoteCharacteristic.cpp:503] registerForNotify(): << registerForNotify()
We are now connected to the BLE Server.
Setting new characteristic value to "Time since boot: 3"
[D][BLERemoteCharacteristic.cpp:544] writeValue(): >> writeValue(), length: 18
[D][BLEDevice.cpp:105] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 3] ... ESP_GATTC_WRITE_CHAR_EVT
[D][BLEUtils.cpp:1344] dumpGattClientEvent(): GATT Event: ESP_GATTC_WRITE_CHAR_EVT
[D][BLEUtils.cpp:1587] dumpGattClientEvent(): [status: ESP_GATT_OK, conn_id: 0, handle: 42 0x2a]
[D][BLERemoteCharacteristic.cpp:566] writeValue(): << writeValue
Setting new characteristic value to "Time since boot: 4"
[D][BLERemoteCharacteristic.cpp:544] writeValue(): >> writeValue(), length: 18
[D][BLEDevice.cpp:105] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 3] ... ESP_GATTC_WRITE_CHAR_EVT
[D][BLEUtils.cpp:1344] dumpGattClientEvent(): GATT Event: ESP_GATTC_WRITE_CHAR_EVT
[D][BLEUtils.cpp:1587] dumpGattClientEvent(): [status: ESP_GATT_OK, conn_id: 0, handle: 42 0x2a]
[D][BLERemoteCharacteristic.cpp:566] writeValue(): << writeValue
Setting new characteristic value to "Time since boot: 5"
[D][BLERemoteCharacteristic.cpp:544] writeValue(): >> writeValue(), length: 18
[D][BLEDevice.cpp:105] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 3] ... ESP_GATTC_WRITE_CHAR_EVT
[D][BLEUtils.cpp:1344] dumpGattClientEvent(): GATT Event: ESP_GATTC_WRITE_CHAR_EVT
[D][BLEUtils.cpp:1587] dumpGattClientEvent(): [status: ESP_GATT_OK, conn_id: 0, handle: 42 0x2a]
[D][BLERemoteCharacteristic.cpp:566] writeValue(): << writeValue
Setting new characteristic value to "Time since boot: 6"
[D][BLERemoteCharacteristic.cpp:544] writeValue(): >> writeValue(), length: 18
[D][BLEDevice.cpp:105] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 3] ... ESP_GATTC_WRITE_CHAR_EVT
[D][BLEUtils.cpp:1344] dumpGattClientEvent(): GATT Event: ESP_GATTC_WRITE_CHAR_EVT
[D][BLEUtils.cpp:1587] dumpGattClientEvent(): [status: ESP_GATT_OK, conn_id: 0, handle: 42 0x2a]
[D][BLERemoteCharacteristic.cpp:566] writeValue(): << writeValue
Setting new characteristic value to "Time since boot: 7"
[D][BLERemoteCharacteristic.cpp:544] writeValue(): >> writeValue(), length: 18
[D][BLEDevice.cpp:105] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 3] ... ESP_GATTC_WRITE_CHAR_EVT
[D][BLEUtils.cpp:1344] dumpGattClientEvent(): GATT Event: ESP_GATTC_WRITE_CHAR_EVT
[D][BLEUtils.cpp:1587] dumpGattClientEvent(): [status: ESP_GATT_OK, conn_id: 0, handle: 42 0x2a]
[D][BLERemoteCharacteristic.cpp:566] writeValue(): << writeValue
Hi Thanks for the assistance.Sorry for the delay.I was engaged with some other work. I Checked that reference link which you have sent. I will try and get back to you.
But I am able to get connected to the server only for the first time when you told me to change the code in line no 41 i.e assigning long UUID and in line no 78 short UUID. When i have done that changes it got connected but when i executed it again it is again the same case which i have told you earlier.
@nkolban yeah sure we will connect on IRC when you get free time. I will plan accordingly.
@Goutham8128 No worries, there is no rush.
I am able to get connected to the server only for the first time when I changed the line 41(assigning short UUID) and line 78 (assigning Long UUID) as you told. When I did this server is connected only for the first time.the screenshot I have send above.Help me out with this.
Hi
Did u check out with this issue?
@Goutham8128 Can we join iirc?
yeah in 5 mins
Any updates ? @nkolban @chegewara
Hi
I am using a sensor dongle which has sensor information in it. It is acting as a BLE server. I am using ESP32 acting as a BLE client module.I uploaded the BLE client code into the esp32 in Arduino IDE but after its execution it is just displaying the BLE server name and its service UUID. It is not able to read the characteristics of the BLE server. I want the BLE client(ESP32) to read the characteristics of the sensor dongle. I have specified the Service UUID and specific characteristic UUID in the BLEclient.ino. But it is just reading the services but not able to display the sensor information inside the module(BLE server).