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

nRF Dongle as UART client python

Hi, I'm trying to write a simple python application on Windows 7 that communicates with a BLE peripheral running Nordic UART Service. I'm using the nRF dongle and pyserial and can get prints from the dongle when it is connecting to the peripheral (e.g. The device has the Nordic UART Service) but I can't send any data. I can't find any information about the python api regarding Nordic UART.

The nRF Dongle has been flashed with "ble_app_uart_c_pca10031_s130.hex"

What do I need to be able to send/receive data from a pyhton app to a BLE peripheral?

  • Note that this instructions was written for an older version of pc-ble-driver-py, they might not work with the current latest version. Please create a new question where you post what you have tried, and we will help you get it working.

  • Hi Jagen,

    I'm currently working on sending command with the python script with the method that you suggested but seems like I'm still getting the error code. I had been struggling with this issue for quite sometime so your help will be greatly appreciated.

    Below are my error code.

      File "Command.py", line 244, in main
        collector.write_word_characteristic(conn)
      File "Command.py", line 226, in write_word_characteristic
        self.adapter.write_req(conn_handle, NusCollector.CUS_WR_UUID, byte_array)
      File "C:\Python38\lib\site-packages\pc_ble_driver_py\ble_driver.py", line 104, in wrapper
        err_code = wrapped(*args, **kwargs)
      File "C:\Python38\lib\site-packages\pc_ble_driver_py\ble_adapter.py", line 487, in write_req
        raise NordicSemiException("Characteristic value handler not found")
    pc_ble_driver_py.exceptions.NordicSemiException: Characteristic value handler not found

  • Please post a new ticket regarding your problem. This is a very old post, pc-ble-driver-py might have changed and causing the problems your are experiencing.

Related