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

Can I change the PHY (2Mbps, 1Mbps, Coded) using the pc-ble-driver-py driver?

Hello, Nordic employees.

I am currently developing BLE5 app with nRF52840 DK and Python in Windows 10 environments.

With the python bindings you provided in the github, HeartRateCollector app was perfectly worked.

Now, I am trying to use the some features that is included in BLE5.

i.e. I want to change the 1Mbps, 2Mbps, 1/2 Coded, 1/8 Coded PHYs at my PYTHON app in run-time.

I installed python 2.7 and pc-ble-driver-py 0.11.3 in the previous HeartRateCollector app. 

BUT, in 0.11.3, I couldn't find any function like sd_ble_gap_phy_update(), which I found in pc_ble_driver_sd_api_v5.py from the github.

I think that you have already implemented it in the pc-ble-driver but not ported it to the python bindings, am I right?

If I am right, is there any way to use the function? 

Or, is there other way to use the function of change of PHY layer in BLE5 app using PYTHON?

THANKS.

  • Hi,

    Unfortunately no. The latest stable version of pc-ble-driver is version 2.3.2. It uses SoftDevice API version 3, which does not support coded PHY. There will be an SoftDevice API v6 release some time in the future, though.

    Regards,
    Terje

  • Hi,

    Any update on CODED PHY in pc-ble-driver-py?

    We tried using the V6 hex file from main pc-ble-driver folder, but got an exception during initialization on: 

    Serial port used: COM9
    Traceback (most recent call last):
    File "C:/Repos/BLE_Gateway/BT-Gateway/python/gateway_core_api/pc_ble_driver_py/AMW_tester.py", line 194, in <module>
    main(sys.argv[1])
    File "C:/Repos/BLE_Gateway/BT-Gateway/python/gateway_core_api/pc_ble_driver_py/AMW_tester.py", line 159, in main
    collector.open()
    File "C:/Repos/BLE_Gateway/BT-Gateway/python/gateway_core_api/pc_ble_driver_py/AMW_tester.py", line 80, in open
    self.adapter.driver.open()
    File "C:\Users\cshablin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pc_ble_driver_py\ble_driver.py", line 106, in wrapper
    raise NordicSemiException(
    pc_ble_driver_py.exceptions.NordicSemiException: Failed to open. Error code: NRF_ERROR_SD_RPC_H5_TRANSPORT_STATE

  • Hi,

    pc-ble-driver-py only supports SoftDevice API versions 2 and 5, whose hex files are included with pc-ble-driver-py. Trying to use it with other SoftDevices is not expected to work, because the serialization API is different for other SoftDevices. The error messages that you see are expected when trying to use an unsupported SoftDevice API.

    Regards,
    Terje

Related