I am trying to use a Xiao BLE nRF52840 for connecting to a sensor for a wearable device prototype. The key deciding factor is the formfactor and hence chose this board. The sensor data is read using an analog pin in nRF52840 and I need the sensor data to be transmitted to a Windows 11 laptop at 20Hz using the BLE wireless mode and log the data in a csv file in the laptop. There are examples in the forum and in the net to connect to a mobile device and log the data. However there is a specific requirement in connecting to Windows 11 laptop and I understand that this is a troublesome one. I am looking for examples and code specific to nRF52 board (non-mbed one) that can accomplish it. Any solid worked out examples that are working will be really helpful for me to proceed on this one.
Xiao BLE nRF52840 connected to a Sensor logging data to Windows 11 laptop (not mobile) at 20 Hz wireless
If you search for “Python”, “Bleak”, “BLE”, …you will find many helpful articles.
I am able to receive data from a peripheral(mbed) to a PC.
Thank you msfujino.
I am able to successfully connect and do the data transfer to mobile using nRFconnector but when I am using mbed board for XIAO BLE and when using Windows11 laptop I am not able to connect to the device even though I am able to discover it (neither the nRFconnect for desktop is able to find it) . The service and characteristic info is not detectable using the bleak code running on PC. I read many forums and found that mbed is predominantly for embedded machine learning applications.
If you are able to receive data from mbed tp PC, is it possible to share some sample/outline peripheral BLE code that will be able to send data over BLE?
I have tried to see if the non-mbed board can transfer data to the PC. It seems to be able to communicate, at least for now. I have attached some sketches for reference.
nRF52_to_PC.zip (2.8 KB)
Thanks a ton. This is very helpful and useful. Will try with this and keep you posted.