This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Noob question to PC_BLE_driver_py example (heart_rate_collector)

Hi, I'm new to python and also the NRF51 dongle. I need to build a python script to connect my NRF51 dongle to a BLE device without using Master Control Panel. I tried using the Master Emulator API but the Connect() function always return false, so the Nordic developer recommended using PC_BLE_Driver_Py API instead.

So I downloaded the package from github and tried to run the example Heart_rate_collector. I changed the TARGET_DEV_NAME to the name of my device, then after the script ask to select which COM port to use, looks like it was able to scan and my device does show up. Then it output "New connection: 0" then "Closing". I tried to put print() statements around to understand the codes better but just having a hard time to understand how it outputs "New connection: 0". What does this mean? Is my device already connected at this point?? The value "conn_handle" even when I took it out in main() and only call connect_and_discover(), it would output the same.

Thank you in advance!!

Parents Reply Children
No Data
Related