Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Nrf 52 usb python application

My ultimate goal is to develop a pc application to provision and manage a ble mesh. I have around 50 devices in the mesh based on nef52840. I plan to use nrf52 ble usb dongle and a python program in windows. 

to start out I’d like to create simple pc python program to connect to a single ble gatt device. 

I see there is the python library pc-ble-driver-py. 

i see lots of confusing information regarding the nef52840

usb dongle. Do I need to flash that with new FW? Or it is ready to go out of the box? When I insert the dongle into nrf connect it flashes it. Is that what I need. 

confused!

  • On further reflection. The correct way is to do this.

    Build and flash to USB dongle using the normal SDK.

    Then communicate via USB using Python (using pyserial).   The "pc-ble-driver-py" is outdated.

  • Hi,

    I recommend having a look at the Bluetooth Mesh Shell. While it does not provide an application level API, it does the next best thing by providing shell commands for most Bluetooth Mesh features. It should be possible to control everything that you need from a Python script, using a Dongle or DK with the Bluetooth Mesh Shell test sample.

    Please note that in order to program the Dongle, you must either connect physically to the Dongle from a programmer (and program it directly), or use the DFU solution from nRF5 SDK (with the application from nRF Connect SDK.) See the nRF52840 Dongle Programming Tutorial for details on the various options for how to program the Dongle. For a DK, programming nRF Connect SDK samples is straight-forward.

    As you wrote yourself, the pc-ble-driver (and the Python and JavaScript bindings) are deprecated. With those you would also have to implement large parts of Bluetooth Mesh yourself, which I cannot recommend.

    Regards,
    Terje

Related