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

Error occurred opening serial port. (NRF_ERROR_TIMEOUT)

Hi!,

I'm newbie with nRF52. I have a nRF51 Development Kit and a nRF52 Development Kit.

I have installed nRFconnect (for Ubuntu 64 bits) in Fedora 24 Workstation (64 bits)

nRFConnect starts well but when I select the serial port (/dev/ttyACM0 for nRF51 or /dev/ttyACM1 for nRF52) I received this error:

2016-09-20T11:05:50.744Z INFO Application data folder: /home/javier/.config/nrfconnect 2016-09-20T11:05:51.111Z INFO Ready. Select serial port to connect to adapter. 2016-09-20T11:06:01.685Z INFO Could not load nrfjprog DLL, firmware detection and programming will not be available. 2016-09-20T11:06:01.686Z INFO Opening adapter connected to /dev/ttyACM1 2016-09-20T11:06:01.700Z INFO Successfully opened /dev/ttyACM1. Baud rate: 115200. Flow control: none. Parity: none.

2016-09-20T11:06:01.700Z DEBUG State change: STATE_START -> STATE_RESET

2016-09-20T11:06:01.701Z DEBUG
1 -> [] type: RESERVED_5 reliable: no seq#:0 ack#:0 payload_length:0 data_integrity:0 err_code:0 2016-09-20T11:06:01.702Z INFO Reset performed on adapter /dev/ttyACM1 2016-09-20T11:06:02.000Z DEBUG State change: STATE_RESET -> STATE_UNINITIALIZED

2016-09-20T11:06:02.000Z DEBUG
2 -> [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0 [SYNC] 2016-09-20T11:06:02.250Z DEBUG
3 -> [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0 [SYNC] 2016-09-20T11:06:02.500Z DEBUG
4 -> [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0 [SYNC] 2016-09-20T11:06:02.751Z DEBUG
5 -> [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0 [SYNC] 2016-09-20T11:06:03.001Z DEBUG State change: STATE_UNINITIALIZED -> STATE_FAILED

2016-09-20T11:06:03.700Z ERROR Error occurred opening serial port. (NRF_ERROR_TIMEOUT) 2016-09-20T11:06:03.858Z DEBUG Error: Error occurred opening serial port. (NRF_ERROR_TIMEOUT) at Adapter. (/home/javier/Descargas/nrf-connect-linux-x64/resources/app/js/actions/adapterActions.js:151:34) at emitOne (events.js:77:13) at Adapter.emit (events.js:169:7) at Adapter._emitError (/home/javier/Descargas/nrf-connect-linux-x64/resources/app/node_modules/pc-ble-driver-js/api/adapter.js:176:14) at Adapter._checkAndPropagateError (/home/javier/Descargas/nrf-connect-linux-x64/resources/app/node_modules/pc-ble-driver-js/api/adapter.js:166:18) at _adapter.open.err (/home/javier/Descargas/nrf-connect-linux-x64/resources/app/node_modules/pc-ble-driver-js/api/adapter.js:266:22)

As I can solve it?

Best regards

  • Today this started happening to me too on Windows. My version of nRF Connect is v2.2.1.

    I am using a PCA10040 board (nRF52 DK).

    This is my logfile:

    2018-01-26T10:45:41.639Z INFO Connectivity firmware version 1.2.1 detected
    2018-01-26T10:45:41.639Z DEBUG Connectivity firmware info: sdBleApiVersion: 3, baudRate: 1000000, transportType: 1
    2018-01-26T10:45:41.647Z INFO Opening adapter connected to COM13
    2018-01-26T10:45:42.176Z INFO Successfully opened COM13. Baud rate: 1000000. Flow control: none. Parity: none.
    
    2018-01-26T10:45:42.176Z DEBUG State change: STATE_START -> STATE_RESET
    
    2018-01-26T10:45:42.176Z DEBUG        1 ->  []
                   type:          RESERVED_5 reliable: no seq#:0 ack#:0 payload_length:0 data_integrity:0 err_code:0
    2018-01-26T10:45:42.176Z INFO Reset performed on adapter COM13
    2018-01-26T10:45:42.475Z DEBUG State change: STATE_RESET -> STATE_UNINITIALIZED
    
    2018-01-26T10:45:42.475Z DEBUG        2 ->  [01 7e ]
                   type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0
                   [SYNC]
    2018-01-26T10:45:42.476Z DEBUG     1/ 0 <-  [02 7d ]
                   type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0
                   [SYNC_RESP]
    2018-01-26T10:45:42.476Z DEBUG State change: STATE_UNINITIALIZED -> STATE_INITIALIZED
    
    2018-01-26T10:45:42.476Z DEBUG        3 ->  [03 fc 11 ]
                   type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:3 data_integrity:0 err_code:0
                   [CONFIG [ sliding-window-size:1 out-of-frame:0 data-integrity-check-type:1 version-number:0 ]]
    2018-01-26T10:45:42.726Z DEBUG        4 ->  [03 fc 11 ]
                   type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:3 data_integrity:0 err_code:0
                   [CONFIG [ sliding-window-size:1 out-of-frame:0 data-integrity-check-type:1 version-number:0 ]]
    2018-01-26T10:45:42.976Z DEBUG        5 ->  [03 fc 11 ]
                   type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:3 data_integrity:0 err_code:0
                   [CONFIG [ sliding-window-size:1 out-of-frame:0 data-integrity-check-type:1 version-number:0 ]]
    2018-01-26T10:45:42.981Z DEBUG     2/ 0 <-  [01 7e ]
                   type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0
                   [SYNC]
    2018-01-26T10:45:42.981Z DEBUG        6 ->  [02 7d ]
                   type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0
                   [SYNC_RESP]
    2018-01-26T10:45:43.226Z DEBUG        7 ->  [03 fc 11 ]
                   type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:3 data_integrity:0 err_code:0
                   [CONFIG [ sliding-window-size:1 out-of-frame:0 data-integrity-check-type:1 version-number:0 ]]
    2018-01-26T10:45:43.228Z DEBUG     3/ 0 <-  [04 7b 11 ]
                   type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:3 data_integrity:0 err_code:0
                   [CONFIG_RESP [ sliding-window-size:1 out-of-frame:0 data-integrity-check-type:1 version-number:0 ]]
    2018-01-26T10:45:43.478Z DEBUG        8 ->  [03 fc 11 ]
                   type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:3 data_integrity:0 err_code:0
                   [CONFIG [ sliding-window-size:1 out-of-frame:0 data-integrity-check-type:1 version-number:0 ]]
    2018-01-26T10:45:43.479Z DEBUG State change: STATE_INITIALIZED -> STATE_FAILED
    
    2018-01-26T10:45:43.480Z DEBUG     4/ 0 <-  [04 7b 11 ]
                   type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:3 data_integrity:0 err_code:0
                   [CONFIG_RESP [ sliding-window-size:1 out-of-frame:0 data-integrity-check-type:1 version-number:0 ]]
    2018-01-26T10:45:43.486Z DEBUG     5/ 0 <-  [03 fc 11 ]
                   type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:3 data_integrity:0 err_code:0
                   [CONFIG [ sliding-window-size:1 out-of-frame:0 data-integrity-check-type:1 version-number:0 ]]
    2018-01-26T10:45:43.990Z DEBUG     6/ 0 <-  [03 fc 11 ]
                   type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:3 data_integrity:0 err_code:0
                   [CONFIG [ sliding-window-size:1 out-of-frame:0 data-integrity-check-type:1 version-number:0 ]]
    2018-01-26T10:45:44.190Z ERROR Error occured when opening port. Errorcode: NRF_ERROR_TIMEOUT (0xd)
    
  • Often this issue is resolved when erasing the flash then reprogramming the DK/dongle used as a connectivity device. I recommend doing nrfjprog --recoveras that also disables any read back protection.

    If that does not work, try disabling the mass storage device functionality of the interface MCU. This can be done in J-Link Commander, which is part of the J-Link Software and Documentation Pack. Use the command MSDDisable.

    In general, make sure that you have installed the latest version of nRF Connect and of the J-Link Software and Documentation Pack. New versions tend to be more stable and have more issues fixed. (By default nRF Connect checks and prompts for updating to the newest version on startup.)

  • I tried this, by executing "C:\Program Files (x86)\SEGGER\JLink_V620b\JLink.exe" and then command msddisable. And yes, it no longer appears as a flash drive in My Computer in Windows. But, with this setting, nRF Connect does not see the serial port. It is empty in the drop down menu. I tried the msdenable command, and the serial port is back.

    Now I will try updating to the latest J-Link software (V622g) and give it a try again.

    Edit: Ok, it updated the J-Link firmware on my board but still no luck. Still NRF_ERROR_TIMEOUT (0xd). Same problem with MSDDisable: When disabled, nRF Connect does not see the serial port.

  • Aha, maybe this is the problem: When MSD is disabled, Windows doesn't have a driver for CDC (or fails to install it for my device). My other board (with MSD still enabled) shows up correctly.

Related