I am trying to scan BLE device based on the BLE example for b4i.
The only thing I changed is in the btnScan_Click code - first 3 lines of code all the rest is as I downloaded the example.
The device I want to connect to is en ESP32 module that advertises its serviceid
The manager.scan(Null) works flawless. It discovers the device.
However if I try to scan with a parameter it seems not to find anything. I've copied/pasted the serviceid so I'm sure I didn't make a typing error.
Anyone an idea on what I do wrong.
Thanks.
Sub btnScan_Click
Dim test(1) As String
test(0) = "f5...............................0e"
manager.Scan(test)
'manager.Scan(Null)
ActivityIndicator1.Visible = True
End Sub
/*
* BLE setup
*/
BLEDevice::init("Dispenser");
BLEServer *pServer = BLEDevice::createServer();
BLEService *pService = pServer->createService(SERVICE_UUID);
BLECharacteristic *pCharacteristic = pService->createCharacteristic(
CHARACTERISTIC_UUID,
BLECharacteristic::PROPERTY_READ |
BLECharacteristic::PROPERTY_WRITE
);
pCharacteristic->setCallbacks(new MyCallbacks());
pCharacteristic->setValue("Dispenser gereed");
pService->start();
BLEAdvertising *pAdvertising = BLEDevice::getAdvertising();
pAdvertising->start();