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

pc-ble-driver.py : NRF_ERROR_TIMEOUT in driver.open() for NRF_SD_BLE_API_VERSION=7

I tried running pc-ble-driver-py/advertising.py 

my command was " python3 advertising.py NRF52 /dev/ttymxc4" and then I got following error

Traceback (most recent call last):
File "advertising.py", line 107, in <module>
main(sys.argv[2])
File "advertising.py", line 65, in main
driver.open()
File "/usr/local/lib/python3.7/dist-packages/pc_ble_driver_py/ble_driver.py", line 107, in wrapper
error_code=err_code,
pc_ble_driver_py.exceptions.NordicSemiException: Failed to open. Error code: NRF_ERROR_TIMEOUT

my sd_ble_api_version is 7 and i don't see any library in pc-ble-driver for version 7.

Can anyone help me in solving this issue?

Parents
  • Hello,

    There could be many reasons for a COM port failing to open. Could you make sure that the port is not being used by any other application already, and that it is properly closed between your calls to open it?
    Could you also confirm whether the example ever has worked for you, or if you see this error when trying to launch the example for the first time?

    my sd_ble_api_version is 7 and i don't see any library in pc-ble-driver for version 7.

    The pc-ble-driver-py does not have support for API version 7 yet. Please make sure to flash your connectivity device with a SoftDevice compatible with the pc-ble-driver-py before use.

    Best regards,
    Karl

  • Hi,

    Could you elaborate on what you mean when you say that you will work on connectivity firmware in SDK 17?

    I will start with what I am doing/ what i want to do as of now, I am running "nRF5_SDK_17.0.2_d674dde\examples\connectivity\ble_connectivity\pca10040\ser_s132_hci " with some customization on my linux based board and then I want that board to advertise by running "advertising.py" script from pc_ble_driver examples. 

    Am I doing it right or still I am on a wrong path.?

     

  • Thank you for clarifying! This helps me a lot in understanding you issues and helping you resolve them.

    Vraj Joshi said:
    I am running "nRF5_SDK_17.0.2_d674dde\examples\connectivity\ble_connectivity\pca10040\ser_s132_hci " with some customization on my linux based board and then I want that board to advertise by running "advertising.py" script from pc_ble_driver examples. 

    No, this will unfortunately not work since the connectivity examples of the SDK. The pc-ble-driver-py requires that you have flashed the device with one of the hex files found at \pc-ble-driver-4.1.2\hex\sd_api_v5
    An exempt from the pc-ble-driver-py readme reads:

    The Python bindings require that the development kit you use is programmed with the correct connectivity firmware. Hardware setup

    Please take a look here for instructions on how to do this.
    Please try this, and see if you are able to run the pc-ble-driver-py examples after having done so.

    Best regards,
    Karl

Reply
  • Thank you for clarifying! This helps me a lot in understanding you issues and helping you resolve them.

    Vraj Joshi said:
    I am running "nRF5_SDK_17.0.2_d674dde\examples\connectivity\ble_connectivity\pca10040\ser_s132_hci " with some customization on my linux based board and then I want that board to advertise by running "advertising.py" script from pc_ble_driver examples. 

    No, this will unfortunately not work since the connectivity examples of the SDK. The pc-ble-driver-py requires that you have flashed the device with one of the hex files found at \pc-ble-driver-4.1.2\hex\sd_api_v5
    An exempt from the pc-ble-driver-py readme reads:

    The Python bindings require that the development kit you use is programmed with the correct connectivity firmware. Hardware setup

    Please take a look here for instructions on how to do this.
    Please try this, and see if you are able to run the pc-ble-driver-py examples after having done so.

    Best regards,
    Karl

Children
  • No, this will unfortunately not work since the connectivity examples of the SDK. The pc-ble-driver-py requires that you have flashed the device with one of the hex files found at \pc-ble-driver-4.1.2\hex\sd_api_v5

    I forgot to inform that if I run "advertising.py" in my linux based board having firmware of "nRF5_SDK_15.2.0.xxx\examples\connectivity\ble_connectivity\pca10040\ser_s132v5_hci" then my board will advertise. 

    So now what I want to change is just that , that I have updated my sdk15.2.0 to sdk17.0.2.

     

    I tried running this as per your saying "

    hex/sd_api_v<x>/connectivity_<ver>_<baudrate>_with_s<x>_<a>.<b>.<c>.hex" ,

    I loaded this hex file using J-Flash Lite to my kit and then tried running "advertising.py" but that gave me the error which is mentioned in my first question of this query.

  • Thank you for your patience with this.

    Vraj Joshi said:
    I forgot to inform that if I run "advertising.py" in my linux based board having firmware of "nRF5_SDK_15.2.0.xxx\examples\connectivity\ble_connectivity\pca10040\ser_s132v5_hci" then my board will advertise. 

    Thank you for clarifying. This is because the connectivity examples and the pc-ble-driver-py is primarily both serializations of the SoftDevice API.

    Vraj Joshi said:
    I loaded this hex file using J-Flash Lite to my kit and then tried running "advertising.py" but that gave me the error which is mentioned in my first question of this query.

    Could you tell me exactly which connectivity hex you tried to flash your device with, and how you are connected to your board? Could you also specify which board you are working with - is it a custom one, a DK, or the dongle?

    Best regards,
    Karl

Related