How this process goes is the ESP32 turns on and I go to nRF Connect to see if I can get the services from it.
I press connect on the device, it takes me to the MYDEVICE tab, wait a few seconds, and it will automatically disconnect. Pressing connect then disconnects me almost instantly. After a lot of googling, people say the cause is that the service request is done too quickly and results in the android not getting any services
[Video]: Bluetooth BLE and C++ classes
-
- Posts: 20
- Joined: Wed Jun 28, 2017 1:22 pm
-
- Posts: 20
- Joined: Wed Jun 28, 2017 1:22 pm
Re: [Video]: Bluetooth BLE and C++ classes
Additional video is now available ... this one is on the subject if using C++ classes to build a BLE client.
https://www.youtube.com/watch?v=UgI7WRr5cgE
https://www.youtube.com/watch?v=UgI7WRr5cgE
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: [Video]: Bluetooth BLE and C++ classes
Nice work.
But question,
i saw in your sample that you include "ble.h"
and reference it with BLE::initServer("ImagineServer"); for example.
and i can't find either the include or any other place that could define the static BLE class.
Please Help !
thanks;p
But question,
i saw in your sample that you include "ble.h"
and reference it with BLE::initServer("ImagineServer"); for example.
and i can't find either the include or any other place that could define the static BLE class.
Please Help !
thanks;p
Re: [Video]: Bluetooth BLE and C++ classes
Howdy,
Unfortunately the moment one makes a video, it immediately becomes out of date. The class called "BLE" was renamed "BLEDevice".
See:
https://github.com/nkolban/esp32-snippe ... ffaabedea0
The good news is that the samples found here:
https://github.com/nkolban/esp32-snippe ... s/BLETests
Should always (hopefully) be consistent with the library.
Unfortunately the moment one makes a video, it immediately becomes out of date. The class called "BLE" was renamed "BLEDevice".
See:
https://github.com/nkolban/esp32-snippe ... ffaabedea0
The good news is that the samples found here:
https://github.com/nkolban/esp32-snippe ... s/BLETests
Should always (hopefully) be consistent with the library.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: [Video]: Bluetooth BLE and C++ classes
That's mostly the case for any documentation. Writing it is "easy" maintaining it is very hard.
Re: [Video]: Bluetooth BLE and C++ classes
BLEClientCallbacks miss an empty function for the interface onConnect, or should be pure virtual.
Re: [Video]: Bluetooth BLE and C++ classes
Thank you sir. Excellent. We have made a change to the code base and committed based on your report. Thank you again.
https://github.com/nkolban/esp32-snippets/issues/40
https://github.com/nkolban/esp32-snippets/issues/40
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: [Video]: Bluetooth BLE and C++ classes
BLEServerCallbacks,
BLECharacteristicCallbacks
Have the same Problem.
Don't know if BLECharacteristicCallbacks should be virtual pure, because you can have mostly only read or write on a characteristic. not all of them are both.
BLECharacteristicCallbacks
Have the same Problem.
Don't know if BLECharacteristicCallbacks should be virtual pure, because you can have mostly only read or write on a characteristic. not all of them are both.
Re: [Video]: Bluetooth BLE and C++ classes
Ho, and i have a conceptual problem with the BLECharacteristic
getValue();
Because not all value you receive are string, the problem is when you receive binary, if there is a 0 you can't get the correct lenght of data you received. Or the callback could give the lenght. But it should be better peharps to get a char* or U8* than a string.
getValue();
Because not all value you receive are string, the problem is when you receive binary, if there is a 0 you can't get the correct lenght of data you received. Or the callback could give the lenght. But it should be better peharps to get a char* or U8* than a string.
Who is online
Users browsing this forum: Bing [Bot] and 195 guests