BlueNRG-2 Windows error getting services and characteristics
Hello everyone!
I am trying to get all services and characteristics from steval-stwinbx1 board running FP-SNS-Datalog2 function pack. Here's simple program I wrote:
import asyncio
from bleak import BleakClient
MAC_ADDRESS = "DA:3E:83:DD:30:F8"
async def discover_services(mac_addr):
async with BleakClient(mac_addr) as client:
for service in client.services:
print(f"\n[Service] {service.uuid}")
print(f"Description: {service.description}")
for char in service.characteristics:
print(f" |")
print(f" +-- [Characteristic] {char.uuid}")
print(f" Properties: {', '.join(char.properties)}")
if __name__ == "__main__":
asyncio.run(discover_services(MAC_ADDRESS))I expected to get services listed by nRF Connect app.



But the program output is empty. Why?
PS: I have done some research and experiments. I have tried running same script on linux and it ran perfectly (I used 2 machines: same machine (dual boot) and raspberry pi). I have noticed that board crashes if you are trying to pair with it. And does not give you services(does not respond) if you are not pairing, because of MITM_PROTECTION_REQUIRED BlueNRG2 just drops packages and Windows hangs indefinetly. If you pair with the device, Windows Bluetooth stack just bombards mcu with a ton of concurrent requests and board crashes. I think increasing bluetooth task queue might help? Am I doing something wrong?
Thank you all in advance!
