Filtering Service UUID's on Scans
Posted: Thu Oct 04, 2018 1:55 pm
I'm currently testing out the advertising data for my ESP32 via an Android device. Ideally, I would like to only scan for supported services via Android.
I can see the ESP32 and all of the services when I use a 3rd party app to query it. When I use my custom Android app, I can also see the ESP32 device name come up when I scan without a filter (I haven't tried querying it yet); however, when I set a scan filter for the UUID I set for advertising the device never shows up.
Here's a snippet of how I'm setting the ESP32. The server and watering services have already been initialized.
this->_advertising = this->_server->getAdvertising();
this->_advertising->addServiceUUID(this->_wateringService->getUUID());
this->_wateringService->start();
this->_advertising->start();
The service UUID is being set to 18f7096f-e4e6-44d0-ac50-03ece26e42cd.
I then setup a ScanFilter on Android to only look for that specific UUID.
Is there something else I need to setup on the ESP32 side so that the service is exposed via advertising?
I can see the ESP32 and all of the services when I use a 3rd party app to query it. When I use my custom Android app, I can also see the ESP32 device name come up when I scan without a filter (I haven't tried querying it yet); however, when I set a scan filter for the UUID I set for advertising the device never shows up.
Here's a snippet of how I'm setting the ESP32. The server and watering services have already been initialized.
this->_advertising = this->_server->getAdvertising();
this->_advertising->addServiceUUID(this->_wateringService->getUUID());
this->_wateringService->start();
this->_advertising->start();
The service UUID is being set to 18f7096f-e4e6-44d0-ac50-03ece26e42cd.
I then setup a ScanFilter on Android to only look for that specific UUID.
Is there something else I need to setup on the ESP32 side so that the service is exposed via advertising?