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

The issue when using pc-ble-driver-py for nRF52840-Dongle

Dears,

I need to use the nRF52840-Dongle for BLE device to communicate with the end devices, the platform is ubuntu and the programming is python3.7, I have problem on it.

I have installed the nRF-Connect-Desktop, and written the fireware into the nRF-Dongle, cause I can operate the Dongle to scan and discover devices normally from the tool. Then I used the pc-ble-driver-py from GitHub trying to operate it with python. After installed the pc-ble-driver-py completely(including the pc-ble-driver and so on) according to the readme, I ran the example named serial_port_enum.py with the identifier arg ''NRF52". But I got the empty result returned by the BleDriver.enum_serial_ports() .  Is there something or procedure I missed? Or help me for more detailed procedure to use the pc-ble-driver-py for  nRF52480-Dongle. Thank you very much.

My purpose is to do the scan, connect, characteristic and etc(like bluepy) with nRF52480-Dongle normally.

Parents Reply Children
  • I found this here in common/platform/linux/serial_port_enum.cpp:

    if (((idVendor == SEGGER_VENDOR_ID) || (idVendor == NXP_VENDOR_ID)) &&
    ((manufacturer == "SEGGER") || (strncasecmp(manufacturer.c_str(), "arm", 3) == 0) ||
    (strncasecmp(manufacturer.c_str(), "mbed", 4) == 0)))
    {
    std::string serialNumber =
    to_str(udev_device_get_sysattr_value(udev_usb_dev, "serial"));
    std::string idProduct =
    to_str(udev_device_get_sysattr_value(udev_usb_dev, "idProduct"));

    devices.push_back(
    SerialPortDesc{devname, manufacturer, serialNumber, "", path, idVendor, idProduct});
    }

    I guess this is the reason why the dongle is not listed

Related