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

nRF-Connect for Desktop on Linux

Hello,

since a few weeks I have the following problem with the nRF Connect for Desktop app on Linux (Arch Linux specifically). The runner launches and I can install and start individual apps just fine. When I want to connect to a device which appears with the correct serial number in the drop-down list the app shows me the following error (see the last line in the attached log). The log here is from the programmer, but this appears to be a problem in every app I try to use with different devices, different USB cables and always directly connected to the computer. Just running and using nrfjprog on its own works (!) though.

2021-04-07T07:23:19.972Z INFO Application data folder: /home/daned/.config/nrfconnect/pc-nrfconnect-programmer
2021-04-07T07:23:20.032Z INFO Using nrfjprog library 10.12.1, pc-nrfjprog-js 1.7.6
2021-04-07T07:23:20.038Z DEBUG App pc-nrfconnect-programmer v1.4.8 official
2021-04-07T07:23:20.038Z DEBUG App path: /home/daned/.nrfconnect-apps/node_modules/pc-nrfconnect-programmer
2021-04-07T07:23:20.038Z DEBUG nRFConnect 3.6.1 is supported by the app (^3.6.0)
2021-04-07T07:23:20.038Z DEBUG nRFConnect path: /tmp/.mount_nRF-CobvFjQw/resources/app.asar
2021-04-07T07:23:20.038Z DEBUG HomeDir: /home/daned
2021-04-07T07:23:20.039Z DEBUG TmpDir: /tmp
2021-04-07T07:23:20.981Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS0
2021-04-07T07:23:20.981Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS1
2021-04-07T07:23:20.981Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS10
2021-04-07T07:23:20.981Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS11
2021-04-07T07:23:20.981Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS12
2021-04-07T07:23:20.981Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS13
2021-04-07T07:23:20.981Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS14
2021-04-07T07:23:20.981Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS15
2021-04-07T07:23:20.981Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS16
2021-04-07T07:23:20.982Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS17
2021-04-07T07:23:20.982Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS18
2021-04-07T07:23:20.982Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS19
2021-04-07T07:23:20.982Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS2
2021-04-07T07:23:20.982Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS20
2021-04-07T07:23:20.982Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS21
2021-04-07T07:23:20.982Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS22
2021-04-07T07:23:20.982Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS23
2021-04-07T07:23:20.982Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS24
2021-04-07T07:23:20.982Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS25
2021-04-07T07:23:20.982Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS26
2021-04-07T07:23:20.982Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS27
2021-04-07T07:23:20.982Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS28
2021-04-07T07:23:20.982Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS29
2021-04-07T07:23:20.982Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS3
2021-04-07T07:23:20.983Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS30
2021-04-07T07:23:20.983Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS31
2021-04-07T07:23:20.983Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS4
2021-04-07T07:23:20.983Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS5
2021-04-07T07:23:20.983Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS6
2021-04-07T07:23:20.983Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS7
2021-04-07T07:23:20.983Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS8
2021-04-07T07:23:20.983Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS9
2021-04-07T07:23:25.240Z INFO Using nrfjprog to communicate with target
2021-04-07T07:23:25.245Z ERROR Could not fetch memory size of target devkit: Error: Error occured when get library info. Errorcode: CouldNotOpenDevice (0x4)
Lowlevel error: Unknown value (ffffff5e)

Can you identify the error Errorcode: CouldNotOpenDevice (0x4) Lowlevel error: Unknown value (ffffff5e)? The same version (3.6.1) works on Windows just fine.

If you need more information about the system or other logs I'm happy to provide these.

Best wishes and many thanks already

Daniel

  • Hi,

     

    Given that you're able to use nrfjprog successfully, it means that all udev rules etc are setup correctly. 

    That error is thrown when the next line should have been a successful probe of JLink software, so we'll have to do some digging here to see what might have caused this issue.

    Could you provide me with the output of "nrfjprog -v" ? If the JLinkARM (Segger Jlink driver) is an older version, then it might cause some compatibility issues with newer nrfjprog versions.

    Do you have several JLink installations on your system? It could be that it picks an older one if that is the case. nrfjprog defaults to search in /opt/SEGGER/JLink if things are not in $PATH.

     

    Kind regards,

    Håkon

  • Thank you for the quick reply!

    Here is the output of nrfjprog -v:

    $ nrfjprog -v
    nrfjprog version: 10.12.1 
    JLinkARM.dll version: 6.88a

    I use the latest available CLI Tools and the bundled JLink version. For nrfjprog to be able to run I had to set LD_LIBRARY_PATH

    LD_LIBRARY_PATH=/home/daned/var/local/nrfcli/v10.12.1/JLink_Linux_V688a_x86_64

    which points to the bundled JLink directory from the CLI Tools package. LD_LIBRARY_PATH is also set when running nRF Connect.

    Is the libnrfjprogdll.so and friends bundled with nRF Connect expecting a different JLink Version (even though it has the same version as the one from the CLI Tools)?

  • JLink isn't bundled with nrf connect for desktop, so we need to provide a path to it somehow.

    Are you appending the LD_LIBRARY_PATH for the specific session, or are you setting it system wide?

    the gui application spawns other threads when you open a application within nrf connect for desktop, which I am not sure inherits a session specific environment var.

     

    Could you try symlinking "/home/daned/var/local/nrfcli/v10.12.1/JLink_Linux_V688a_x86_64" to "/opt/SEGGER/JLink" ?

    Or adding /home/daned/var/local/nrfcli/v10.12.1/JLink_Linux_V688a_x86_64 to $PATH?

     

    Kind regards,

    Håkon

  • I was adding it on a per-session basis (wrapped in a script).

    Aha! Adding /home/daned/var/local/nrfcli/v10.12.1/JLink_Linux_V688a_x86_64 to PATH did not help. But after I symlink'ed it at /opt/SEGGER/JLink it now works!

    Thank you so much, now I don't have to reboot into Windows for using the PPK Smiley

Related