-
Notifications
You must be signed in to change notification settings - Fork 8
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
Built with ESP32 not-nimble? #10
Comments
About "base esp32 lib" You mean ArduinoBLE or esp32 bluetooth c-style libraries? Currently I can't understand usecase. Please give me more information how ArduinoBleOTA should work in Your project |
I have an ESP32 device, it uses BLE to advertise (as server). the UUID(1st 8 chars) has meaning anyhow using the official Arduino supplied (via Espressif) from https://github.com/nkolban/ESP32_BLE_Arduino |
If I correctly understand, value of a sensor is a part of service uuid. When sensor value changes, uuid changes according to it (1st 8 chars). Than you can broadcast value via advertising to more than one devices. Not sure if there no better way to do that in BLE. Maybe this example can help You:
|
and there are characteristics too and I need the 'service' UUID to be stable as I am caching the characteristic UUIDs to speed up other functions.. get some config data
where did that come from? I don't see it in Nimble, ArduinoBle or ESP32 BLE. |
It's from additional ArduinoBleOTA utils in <BleOtaMultiservice.h> that helps to use BleOta with additional services |
thx.. I see what you did
does your code/sender depend on the OTA service UUID being 1st?. right now my apps depend on that .. |
No, BLE_OTA_SERVICE_UUID can be secondaryUUID |
looks pretty cool, I'll have to experiment with changing the advertised service.. vs start/stop so I am replacing this in my existing code with your advertiseBle() equivalent
and adding your service functionality as well.. |
like you I createService(UUID) I don't see it change when using my android scanner apps |
Advertisement data has limited size. If you add to it more than max size, something will be removed from advertisement block. Can it be even name.
More about it: |
thats gonna be a mess as we both have 128bit UUIDs.. but, at the moment I am only doing mine, to make sure the service UUID switch is correct |
so, using your approach for setting the UUID of the services does not change the UUID as seen by the app store BLE scanners. here is my adaptation of your code (multiservice) and the code I use to stop/rebuild/restart the service
|
Hmm, I never need and never try restart ble services. Don't know what happens here. Maybe It's more question to NimBle library experts |
thx.. of course they don't answer |
looking at the nimble bleserver, it had add and remove service... so at least for me, I can add another characteristic to start the ota service advertising and then your stuff works. on reboot, my service would be started. and I don't need multi service... and I can create my two services and toggle between them. the characteristics would be shared between them do you have a library function to create your service definition? |
No, it's just only singleton instance. As I understand you need start OTA with other UUIDs than default? |
well, you have characteristics too, so there is some setup someplace.. (i see begin()) so, I am advertising x, and then at some point I need to add your service too. so your code can work. (my app sends to a characteristic to turn on the OTA service) right now I am trying to |
so, I have this in platformio dev section
no nimble_arduino anywhere, it IS in the overall project libs from platformio's perspective, but not in this env and I get this (to first error)
I added #pragma to make sure I knew what path was being taken why is NimBLE-Arduino there? AFTER the build (pio run -e ....) here is my complete platformio.ini
my code builds correctly for all but the last entry (which is what I am trying to fix/add to my code for ESP32, without nimble til they fix the lib) |
ok it compiles all the files whether needed or not.. SO the ifdef/endif block around the whole file.. |
I have a crash when using Nimble instead of the normal ESP32 libs..
h2zero/NimBLE-Arduino#530
basically I need to change the UUID of my service.
with ArduinoBLE I had to destroy the whole setup and rebuild to do that
that works with ESP32 BLE.
doesn't work with NIMBLE
but I also need OTA on the ESP32-DevKitv1.
have u tried to build this with the base esp32 lib?
The text was updated successfully, but these errors were encountered: