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

Reply
  • 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

Children
  • Hi, 

    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?

    Previously I was working on sdk16 and nrf_sd_ble_api_version 5.1 , for that everything was working fine. 

    Now I am working on sdk17 and nrf_sd_ble_version 7.2 , where I got stuck.

    The pc-ble-driver-py does not have support for API version 7 yet.

    Is there any way that can help me work with API version 7?

    Thanks,

    Vraj Joshi

  • Hello Vraj Joshi,

    Vraj Joshi said:

    Previously I was working on sdk16 and nrf_sd_ble_api_version 5.1 , for that everything was working fine. 

    Now I am working on sdk17 and nrf_sd_ble_version 7.2 , where I got stuck.

    Yes, this is as expected, since the pc-ble-driver does not support SoftDevice versions above 6 as of yet. May I ask why you need to update your pc-ble-driver-py SoftDevice version in the first place?
    You mention your SDK v17 - how does this relate to your usage of the pc-ble-driver-py? The pc-ble-driver-py can use an older SoftDevice version and still communicate just fine with a nRF SoC running a 7.2 version SoftDevice. I get the feeling that you might have gotten something here mixed up, since the pc-ble-driver-py is completely independent of the nRF5 SDK.

    Vraj Joshi said:
    Is there any way that can help me work with API version 7?

    No, unfortunately the latest SoftDevice compatible with the pc-ble-driver is v6 at this time.

    Best regards,
    Karl

  • Hi ,

    I get the feeling that you might have gotten something here mixed up, since the pc-ble-driver-py is completely independent of the nRF5 SDK.

    Yes , I realized that it was not necessary to work with nrf_sd_ble_version 7.

    So I changed my version to 5 in sdk17 . As my main aim is work on connectivity firmware in sdk 17.

    After changing to version 5 , i solved previous error and also few more errors but got stuck in one error which I am not able solve.

    my command was " python3 advertising.py NRF52 /dev/ttymxc4"

    I am running the same and now getting this error ,

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

    Can you please help me move forward.

    Thanks 

    Vraj Joshi

  • Hello again Vraj Joshi, 

    Vraj Joshi said:

    Yes , I realized that it was not necessary to work with nrf_sd_ble_version 7.

    So I changed my version to 5 in sdk17 . As my main aim is work on connectivity firmware in sdk 17.

    I still get the impression that you might have gotten this mixed up - or that I am misunderstanding your intentions - since there is no connection between the nRF5 SDK and the usage of the pc-ble-driver-py directly.

    Could you elaborate on what you mean when you say that you will work on connectivity firmware in SDK 17? Are you making something similar to a dongle, for which you will create custom firmware so it may perform some function when connected to a peripheral device? This will then only rely on the nRF5 SDK v17.0.02 and not at all make use of the pc-ble-driver-py.
    Or, do you intend to create a python program that uses a pc-ble-driver-py dongle to communicate with a peripheral device? This will then only rely on using the pc-ble-driver-py's API to communicate with the pc-ble-driver-py dongle, and not at all make sure of the nRF5 SDK v17.0.2.
    As a third option, could it be that you mean to create a peripheral device, which should communicate with a program on your computer through the pc-ble-driver-py dongle? In this case, you will need to use the nRF5 SDK v17.0.2 to create the firmware running on the peripheral device. This approach will be completely independant of the SoftDevice API version running on the pc-ble-driver-py dongle.

    Please be advised that the SDK v17.0.2 is not compatible with any SoftDevice version 5. Could you elaborate on what you mean when you say that you changed your version to 5 in sdk17?

    Vraj Joshi said:
    pc_ble_driver_py.exceptions.NordicSemiException: Failed to ble_gap_adv_data_set. Error code: NRF_ERROR_INVALID_ADDR.

    INVALID_ADDR is usually returned when a invalid pointer is supplied to the function call. This is likely cause by a incorrect or invalid parameter being passed to the advertising init function, or similar.
    However, I think we need to clear out any misunderstandings of your intentions and questions before we proceed with the debugging of this particular error.

    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.?

     

Related