-
Notifications
You must be signed in to change notification settings - Fork 217
ScanResponse Data #11
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
Comments
Hi @dwilday, The scan response currently is sent, with the value of the local name if set. |
Right, I guess I should have been more specific. Can we add support for passing custom data in the Scan Response Data? For example with Adafruit's Bluefruit Library I'm able to call Bluefruit.ScanResponse.addData to add additional data to the scan response. |
Hey. Why don't use Ble 5 feature, Secondary advertising channel method instead of scan response and request method ? |
With the scan response is their a method to get the advertised data? Once I can get that adding additional data, or decoding depending on type of advertisement will be possible? |
Hi @dwilday, Is there something specific you want to put in the scan response, in the sense should we have a nice friendly API to do that instead of a generic API for raw scan response data? For a work around for now you could try to use |
Hello, |
Hi @marcrupprath , ArduinoBLE/src/utility/GAP.cpp Line 148 in 8a49b8c
As you can see, currently the local name of the device is not directly advertised but it is sent as a scan response data. |
To make a long story short i will tr direct you to the discussion: https://www.eurobricks.com/forum/index.php?/forums/topic/179180-powered-up-hub-emulator-with-esp32/ Have a special Look for advertising data, local name and manucaturer data used in this example. |
Hi @marcrupprath , #include "ArduinoBLE.h"
#define SERVICE_UUID "00001623-1212-EFDE-1623-785FEABCD123"
uint8_t scanData[] = {0x02,0x01,0x06,0x09,0xFF,0x97,0x03,0x00,0x41,0x07,0xB2,0x43,0x00};
void setup()
{
BLE.begin();
// exploit the already existing functions to advertise the service
BLE.setAdvertisedServiceUuid(SERVICE_UUID);
BLE.advertise();
// disable advertising to insert the custom scan response data
HCI.leSetAdvertiseEnable(0x00);
HCI.leSetScanResponseData(sizeof(scanData), scanData);
// enable advertising
HCI.leSetAdvertiseEnable(0x01);
}
void loop()
{
}
Also, to access HCI functions you should add |
Improve STM32duinoBLE robustness and flexibility
@marcrupprath @dwilday |
Can you add support for sending Scan Response Data?
The text was updated successfully, but these errors were encountered: