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

pc-ble-driver.py throws exception "NRF_ERROR_SD_RPC_NO_RESPONSE" while ongoing DFU over BLE transport

Hello,

We integrated latest released version of "pc-ble-driver.py" & "nrfutil" in our custom linux os running on ARM 32bit based custom board (B1).

pc_ble_driver_py : https://github.com/NordicSemiconductor/pc-ble-driver-py/tree/v0.14.2

nrfutil : https://github.com/NordicSemiconductor/pc-nrfutil/tree/v6.1

Connectivity-app : https://github.com/NordicSemiconductor/pc-ble-driver/tree/v4.1.1/hex

B1 has NRF52840 Controller on it which is connected with B1 application chip over Serial interface.

We need to perform DFU over BLE by using integrated "nrfutil" source. For this, we modified "connectivity source-code" from "pc-ble-driver" to set baud-rate 38400 from 1000000 (as this was not working) and recompile "ser_s132v5_hci" version.We also modified "response_timeout=1200", "retransmission_interval=300" within ble_driver.py according to modified baud-rate value. 

With these configuration, BLE-DFU happening with our target device but sometimes "pc-ble_driver" throws an exception "NRF_ERROR_SD_RPC_NO_RESPONSE" from various places.

We are also getting MTU related exception sometimes saying "MTU exchange request failed. Common causes are: missing att_mtu setting in ble_cfg_set, different config tags used in ble_cfg_set and connect."

I made sure that configuration-tag is "1" in whenever connecting with (Nordic_Buttonless/DfuTarg). We are not explicitly providing any MTU value in "nrfutil dfu ble" call.

To mitigate with this issue, we are currently retrying entire DFU again for the same target.  When I looked inside connectivity-code, I could see that there are an issue in sequence-number/ack-number which is unequal and packets being dropped by connectivity module.

Will you please let us know why this is happening and what will be the solution to get rid out of "NRF_ERROR_SD_RPC_NO_RESPONSE" and "MTU" related issue?

sample RPC issue log:

[2020-07-23 10:19:30.758] Traceback (most recent call last):
[2020-07-23 10:19:30.758]   File "nordicsemi/__main__.py", line 1521, in <module>
[2020-07-23 10:19:30.758]     cli()
[2020-07-23 10:19:30.758]   File "/usr/lib/python3.7/site-packages/click/core.py", line 857, in __call__
[2020-07-23 10:19:30.758]     return self.main(*args, **kwargs)
[2020-07-23 10:19:30.758]   File "/usr/lib/python3.7/site-packages/click/core.py", line 810, in main
[2020-07-23 10:19:30.758]     rv = self.invoke(ctx)
[2020-07-23 10:19:30.758]   File "/usr/lib/python3.7/site-packages/click/core.py", line 1292, in invoke
[2020-07-23 10:19:30.758]     return _process_result(sub_ctx.command.invoke(sub_ctx))
[2020-07-23 10:19:30.758]   File "/usr/lib/python3.7/site-packages/click/core.py", line 1292, in invoke
[2020-07-23 10:19:30.758]     return _process_result(sub_ctx.command.invoke(sub_ctx))
[2020-07-23 10:19:30.758]   File "/usr/lib/python3.7/site-packages/click/core.py", line 1099, in invoke
[2020-07-23 10:19:30.758]     return ctx.invoke(self.callback, **ctx.params)
[2020-07-23 10:19:30.758]   File "/usr/lib/python3.7/site-packages/click/core.py", line 613, in invoke
[2020-07-23 10:19:30.758]     return callback(*args, **kwargs)
[2020-07-23 10:19:30.758]   File "nordicsemi/__main__.py", line 1183, in ble
[2020-07-23 10:19:30.758]     dfu.dfu_send_images()
[2020-07-23 10:19:30.758]   File "/usr/lib/python3.7/site-packages/nrfutil-6.1.0-py3.7.egg/nordicsemi/dfu/dfu.py", line 127, in dfu_send_images
[2020-07-23 10:19:30.783]     self._dfu_send_image(self.manifest.application)
[2020-07-23 10:19:30.783]   File "/usr/lib/python3.7/site-packages/nrfutil-6.1.0-py3.7.egg/nordicsemi/dfu/dfu.py", line 88, in _dfu_send_image
[2020-07-23 10:19:30.783]     self.dfu_transport.open()
[2020-07-23 10:19:30.783]   File "/usr/lib/python3.7/site-packages/nrfutil-6.1.0-py3.7.egg/nordicsemi/dfu/dfu_transport_ble.py", line 520, in open
[2020-07-23 10:19:30.783]     target_device_addr = self.target_device_addr)
[2020-07-23 10:19:30.783]   File "/usr/lib/python3.7/site-packages/nrfutil-6.1.0-py3.7.egg/nordicsemi/dfu/dfu_transport_ble.py", line 165, in connect
[2020-07-23 10:19:30.783]     self.jump_from_buttonless_mode_to_bootloader(DFUAdapter.BLE_DFU_BUTTONLESS_BONDED_CHAR_UUID)
[2020-07-23 10:19:30.783]   File "/usr/lib/python3.7/site-packages/nrfutil-6.1.0-py3.7.egg/nordicsemi/dfu/dfu_transport_ble.py", line 213, in jump_from_buttonless_mode_to_bootloader
[2020-07-23 10:19:30.783]     self.adapter.enable_indication(self.conn_handle, buttonless_uuid)
[2020-07-23 10:19:30.783]   File "/usr/lib/python3.7/site-packages/wrapt/wrappers.py", line 606, in __call__
[2020-07-23 10:19:30.783]     args, kwargs)
[2020-07-23 10:19:30.783]   File "/usr/lib/python3.7/site-packages/pc_ble_driver_py/ble_driver.py", line 104, in wrapper
[2020-07-23 10:19:30.804]     err_code = wrapped(*args, **kwargs)
[2020-07-23 10:19:30.804]   File "/usr/lib/python3.7/site-packages/pc_ble_driver_py/ble_adapter.py", line 413, in enable_indication
[2020-07-23 10:19:30.804]     self.driver.ble_gattc_write(conn_handle, write_params)
[2020-07-23 10:19:30.804]   File "/usr/lib/python3.7/site-packages/wrapt/wrappers.py", line 606, in __call__
[2020-07-23 10:19:30.804]     args, kwargs)
[2020-07-23 10:19:30.804]   File "/usr/lib/python3.7/site-packages/pc_ble_driver_py/ble_driver.py", line 110, in wrapper
[2020-07-23 10:19:30.804]     error_code=err_code,
[2020-07-23 10:19:30.804] pc_ble_driver_py.exceptions.NordicSemiException: Failed to ble_gattc_write. Error code: NRF_ERROR_SD_RPC_NO_RESPONSE

Parents Reply Children
  • Hello,

    Same here as with case #253623, we do not support Arm in pc-ble-driver. 

    For this, we modified "connectivity source-code" from "pc-ble-driver" to set baud-rate 38400 from 1000000 (as this was not working) and recompile "ser_s132v5_hci" version.

     The baud-rate of 38400 is not supported.

    Our team will need to have more time to replicate your issues. 

    If you have not heard back from me within next Friday, please answer to this ticket and #253623

    Kind regards,
    Øyvind

  • Hello Øyvind,

    Thanks for your support.

    I agree with you that 38400 baud-rate is not supported in Nordic implementation (currently it is 1M). We modified this baud-rate as we do not have external crystal on the board and DFU with 1M was not working at all.

    We have seen "RPC_NO_RESPONSE" issue very frequently because of which exception thrown by Nordic-Python-Scripts. This needs whole DFU to re-execute again.

    We are suspecting either time-intervals available in the script (re transmission interval etc) needs to be tuned with updated baud-rate settings.

    We need your support here to troubleshoot and resolve this issue asap.

    Let me know if you need any information,

    Regards,

    Nirav Agrawal 

  • Hi, 

    I have forwarded to our pc-ble-driver expert, and will get back to you within tomorrow.

    Kind regards,
    Øyvind

  • Hi, 

    Sorry, no update from the team. Will ping today. 

    Kind regards,
    Øyvind

  • Hello, 

    Here is the response I got:
    "We do not support 38400 baud. If this is a requirement then a lot of code needs to be re-written and this will be out of scope for the pc-ble-driver project. I doubt we can make it work as the current solution is already close to the limit with 1Mbps.

    We do support running the pc-ble-driver with the nRF52840-dongle so if changing interface to USB is an option then they could look at this, that would solve the bandwidth issue."

    Kind regards,
    Øyvind

Related