Skip to content

Updating the BLE_server code in ESP32_BLE_Arduino repo #396

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
SindhujaNarra opened this issue Feb 7, 2018 · 4 comments
Closed

Updating the BLE_server code in ESP32_BLE_Arduino repo #396

SindhujaNarra opened this issue Feb 7, 2018 · 4 comments

Comments

@SindhujaNarra
Copy link

Hello @nkolban,

I had faced the same issue (#144) as @weizenbock when I was testing BLE_server and BLE_client in Arduino IDE with 2 ESP32 DevKitC devices (one as the server and another as the client). It worked only after I made changes to the BLE_server code as suggested by @chegewara i.e., to reduce the length of device name to 3 (5 characters device name didn't work for me) and adding "pAdvertising->addServiceUUID(pService->getUUID());" to the code.

I have seen that few others have the similar issue (#144 #145 #163). So, I was wondering if you could please update the code for BLE_server in ESP32_BLE_Arduino repo so that in future no one else faces this same issue.

Thanks

@ghost
Copy link

ghost commented Mar 1, 2018

you can do it on yourself:

Part of my script:

copy the \cpp_utils\BLE*.* and \cpp_utils\HIDTypes.* files to your Arduino hardware\espressif\esp32\libraries\BLE\src directory

delete the \BLE\src\BLEExceptions.* again (or do not copy it :-) )

comment all lines of #include "BLEExceptions.h" -> //#include "BLEExceptions.h"
also comment the lines beginning with throw new BLEUuidNotFoundException and throw BLEDisconnectedException();

enjoy

@nkolban : maybe you can set the exception-handling in the not #defined part for the Arduino IDE !?

-Pit

@devinsewell
Copy link

This worked for me: pAdvertising->addServiceUUID(pService->getUUID()); before pAdvertising->start(); (my device name is 20 characters no problem)

@chegewara
Copy link
Collaborator

@devinsewell And i can tell that your UUID is 16 bit type, but when you want to addServiceUUID with UUID 128 bit long it wont work. I will fix it soon, but there is many more important bugs and issues to fix.

@devinsewell
Copy link

Ah the 20 character device name worked then stopped, changed to a 3 character name it fixed

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

3 participants