Category : bluetooth-lowenergy

When using the Microsoft code sample "DeviceEnumeration" every attempt to pair to a Bluetooth Low Energy device fails. TheDeviceInformationPairing.CanPair = true and DeviceInformationPairing.ProtectionLevel = none. The code in question is in the file Scenario8_PairDevice.cs in the PairButton_Click method. The iMac I am trying to pair to displays a pairing dialog the Windows displays a Pair ..

Read more

My target is to verify that the device has Bluetooth, and if it has one, then verify that the Bluetooth is turned on or off. For that purpose, I am using the below code snippet. public async Task<bool> GetBluetoothStatusAsync() { var allRadio = await Radio.GetRadiosAsync(); if (allRadio == null) return false; var bluetoothRadio = allRadio.FirstOrDefault(radio ..

Read more

I want to extract the temperature from a BLE beacon using the ESP32 chip. I have used the following code to do this: class MyAdvertisedDeviceCallbacks: public BLEAdvertisedDeviceCallbacks { void onResult(BLEAdvertisedDevice advertisedDevice) { std::string strServiceData = advertisedDevice.getServiceData(); uint8_t cServiceData[100]; strServiceData.copy((char *)cServiceData, strServiceData.length(), 0); if (advertisedDevice.getServiceDataUUID().equals(BLEUUID(beconUUID))==true) // found Eddystone UUID { Serial.printf("Advertised Device: %s n", advertisedDevice.toString().c_str());advertisedDevice.getServiceDataUUID().bitSize(), advertisedDevice.getServiceDataUUID().toString().c_str(),strServiceData.length()); ..

Read more

I have written a C++ code to program STB1132-25 BLE module by calling/executing BlueNRG-X_Flasher_Launcher.exe through the c standard function system(const char*). I have the same setup for ST-LINK_CLI.exe to program STM32 controllers. I am passing correct arguments to both programming tools. I can successfully flash both the BLE module and stm32 controllers. But when some ..

Read more

I want to know that whether i can connect multiple BLE Devices in parallel with a single Tp-link 4.0 adpater (bluetooth). My current focus is to get this scenario working in C# in Windows. If it could be done, then please tell me how to do this. And if not, then is there a need ..

Read more

Check this code for possible multithreading errors, please. Sometimes I got an error "Access violation reading location" at line cv.notify_all(); (marked in code). uint64_t GetFirstAdvertisingBLEAddr() { std::mutex m; std::condition_variable cv; BluetoothLEAdvertisementWatcher advWatcher; uint64_t addr = 0; bool stopCalled = false; auto recvToken = advWatcher.Received([&addr, &m, &cv](BluetoothLEAdvertisementWatcher watcher, BluetoothLEAdvertisementReceivedEventArgs eventArgs) { ShowAdvertisement(eventArgs); addr = eventArgs.BluetoothAddress(); watcher.Stop(); ..

Read more