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

The NRF 52840 dongle rate in the center of the running exmaple example will be the 2020-05-07 16:40:31, 995/123145341956096 / StatusThread RpcAppStatus ioResourcesUnavailable: serial port read failed on port/dev/tty. UsbmodemC8A5C57A42372. Error: Device no

When I was running the heart rate example, I would report this error below, someone tell me what caused this error, which causes the driver to fail to recognize now. But I found the device on the NRF connect desktop and on the command line.

python3 heart_rate_collector.py NRF52 /dev/tty.usbmodemC8A5C57A42372 ['heart_rate_collector.py', 'NRF52', '/dev/tty.usbmodemC8A5C57A42372'] Serial port used: /dev/tty.usbmodemC8A5C57A42372 2020-05-07 16:40:30,680 [123145336700928/LogThread] Successfully opened /dev/tty.usbmodemC8A5C57A42372. Baud rate: 1000000. Flow control: none. Parity: none. 2020-05-07 16:40:30,680 [123145336700928/LogThread] evt> severity(20) message(Successfully opened /dev/tty.usbmodemC8A5C57A42372. Baud rate: 1000000. Flow control: none. Parity: none.) 2020-05-07 16:40:30,681 [123145341956096/StatusThread] RpcAppStatus.resetPerformed: Target Reset performed 2020-05-07 16:40:30,681 [123145341956096/StatusThread] evt> status code(RpcAppStatus.resetPerformed) message(Target Reset performed) 2020-05-07 16:40:31,889 [123145341956096/StatusThread] RpcAppStatus.connectionActive: Connection active 2020-05-07 16:40:31,890 [123145341956096/StatusThread] evt> status code(RpcAppStatus.connectionActive) message(Connection active) 2020-05-07 16:40:31,995 [123145341956096/StatusThread] RpcAppStatus.ioResourcesUnavailable: serial port read failed on port /dev/tty.usbmodemC8A5C57A42372. Error: Device not configured [6] 2020-05-07 16:40:31,995 [123145341956096/StatusThread] evt> status code(RpcAppStatus.ioResourcesUnavailable) message(serial port read failed on port /dev/tty.usbmodemC8A5C57A42372. Error: Device not configured [6]) 2020-05-07 16:40:33,391 [123145336700928/LogThread] Failed to receive response for command Traceback (most recent call last): File "heart_rate_collector.py", line 222, in 2020-05-07 16:40:33,392 [123145336700928/LogThread] evt> severity(30) message(Failed to receive response for command) 2020-05-07 16:40:33,393 [123145341956096/StatusThread] RpcAppStatus.pktSendError: Error sending packet to target. Code: 0x8016 2020-05-07 16:40:33,393 [123145341956096/StatusThread] evt> status code(RpcAppStatus.pktSendError) message(Error sending packet to target. Code: 0x8016) main(serial_port) File "heart_rate_collector.py", line 178, in main collector.open() File "heart_rate_collector.py", line 103, in open self.adapter.driver.ble_cfg_set(BLEConfig.conn_gatt, gatt_cfg) File "/usr/local/lib/python3.7/site-packages/pc_ble_driver_py/ble_driver.py", line 107, in wrapper error_code=err_code, pc_ble_driver_py.exceptions.NordicSemiException: Failed to ble_cfg_set. Error code: NRF_ERROR_SD_RPC_SEND

Parents
  • Hello,

    Have you made any changes to the heart rate example?

    RpcAppStatus.ioResourcesUnavailable: serial port read failed on port /dev/tty.usbmodemC8A5C57A42372. Error: Device not configured [6] 2020-05-07 16:40:31,995 [123145341956096/StatusThread] evt> status code(RpcAppStatus.ioResourcesUnavailable) message(serial port read failed on port /dev/tty.usbmodemC8A5C57A42372. Error: Device not configured [6])

    It seems to me that the COM port was closed following the reset of the device. Please ensure that there is no other devices or application attempting to use the same serial port. This could for example be a serial monitor or debugger application.

    Please use the "insert-> " option to post code or copy-pasted terminal outputs - your post is horrible to read.
    For future reference, I highly recommend formatting your questions and tickets so that they are easy to read - this greatly increases the chance that the forum will answer you swiftly.

    Best regards,
    Karl

Reply
  • Hello,

    Have you made any changes to the heart rate example?

    RpcAppStatus.ioResourcesUnavailable: serial port read failed on port /dev/tty.usbmodemC8A5C57A42372. Error: Device not configured [6] 2020-05-07 16:40:31,995 [123145341956096/StatusThread] evt> status code(RpcAppStatus.ioResourcesUnavailable) message(serial port read failed on port /dev/tty.usbmodemC8A5C57A42372. Error: Device not configured [6])

    It seems to me that the COM port was closed following the reset of the device. Please ensure that there is no other devices or application attempting to use the same serial port. This could for example be a serial monitor or debugger application.

    Please use the "insert-> " option to post code or copy-pasted terminal outputs - your post is horrible to read.
    For future reference, I highly recommend formatting your questions and tickets so that they are easy to read - this greatly increases the chance that the forum will answer you swiftly.

    Best regards,
    Karl

Children
  • python3 heart_rate_collector.py NRF52 /dev/tty.usbmodemC8A5C57A42372
    ['heart_rate_collector.py', 'NRF52', '/dev/tty.usbmodemC8A5C57A42372']
    Serial port used: /dev/tty.usbmodemC8A5C57A42372
    2020-05-07 17:37:04,705 [123145345765376/LogThread] Successfully opened /dev/tty.usbmodemC8A5C57A42372. Baud rate: 1000000. Flow control: none. Parity: none.
    2020-05-07 17:37:04,706 [123145345765376/LogThread] evt> severity(20) message(Successfully opened /dev/tty.usbmodemC8A5C57A42372. Baud rate: 1000000. Flow control: none. Parity: none.)
    2020-05-07 17:37:04,706 [123145351020544/StatusThread] RpcAppStatus.resetPerformed: Target Reset performed
    2020-05-07 17:37:04,706 [123145351020544/StatusThread] evt> status code(RpcAppStatus.resetPerformed) message(Target Reset performed)
    2020-05-07 17:37:05,922 [123145351020544/StatusThread] RpcAppStatus.connectionActive: Connection active
    2020-05-07 17:37:05,922 [123145351020544/StatusThread] evt> status code(RpcAppStatus.connectionActive) message(Connection active)
    2020-05-07 17:37:06,026 [123145351020544/StatusThread] RpcAppStatus.ioResourcesUnavailable: serial port read failed on port /dev/tty.usbmodemC8A5C57A42372. Error: Device not configured [6]
    2020-05-07 17:37:06,026 [123145351020544/StatusThread] evt> status code(RpcAppStatus.ioResourcesUnavailable) message(serial port read failed on port /dev/tty.usbmodemC8A5C57A42372. Error: Device not configured [6])
    2020-05-07 17:37:07,428 [123145345765376/LogThread] Failed to receive response for command
    2020-05-07 17:37:07,428 [123145345765376/LogThread] evt> severity(30) message(Failed to receive response for command)
    Traceback (most recent call last):
      File "heart_rate_collector.py", line 222, in <module>
    2020-05-07 17:37:07,428 [123145351020544/StatusThread] RpcAppStatus.pktSendError: Error sending packet to target. Code: 0x8016
    2020-05-07 17:37:07,429 [123145351020544/StatusThread] evt> status code(RpcAppStatus.pktSendError) message(Error sending packet to target. Code: 0x8016)
        main(serial_port)
      File "heart_rate_collector.py", line 178, in main
        collector.open()
      File "heart_rate_collector.py", line 103, in open
        self.adapter.driver.ble_cfg_set(BLEConfig.conn_gatt, gatt_cfg)
      File "/usr/local/lib/python3.7/site-packages/pc_ble_driver_py/ble_driver.py", line 107, in wrapper
        error_code=err_code,
    pc_ble_driver_py.exceptions.NordicSemiException: Failed to ble_cfg_set. Error code: NRF_ERROR_SD_RPC_SEND

    thanks!Sorry, I didn't pay much attention to this when I was using it. I guarantee that this serial port is not in use. I posted the problem. Could you please check it again?

  • Hello again,

    Thank you for formatting your comment - it looks great now!
    Are you attempting to connect to multiple devices? If so, please see the answer by my colleague in this ticket, which has resolved your exact error previously.

    Could you also tell me which version of pc_ble_driver_py you are using?

    Best regards,
    Karl

  • Hello, I didn't connect multiple devices, I just want to test the serial communication and dongle's scanning connection capability, just like NRF connect. I tried that answer too, but it didn't seem to work.

    The pc-ble-dirver-py version I used was 0.14.2.

    thank you!

  • Could it be that the py library does not support nrf52840dongle?

  • Hello,

    I am terribly sorry for my late reply. 
    I have checked, and the pc-ble-driver-py does support the nRF52840 dongle - but the programming of the dongle is a little different since the dongle does not have an onboard debugger.
    Have you see the "Installing drivers and tools" section of the pc-ble-driver-py? You must use serial DFU to program the dongle, since it has no debugger.
    - Is the dongle programmed according to this documentation? If so, did you experience any issues while programming it? It sounds like something might have gone wrong here.

    You might also be interested in seeing the Data corruption or drops section of the known issued.md.

    My sincerest apology for my late reply.
    Looking forward to resolving this issue together!

    Best regards,
    Karl

Related