Cannot connect to nRF52840DK board using nRF Connect Bluetooth Low Energy app on Linux (Ubuntu 18.04 LTS). When I choose "Select Device" and choose my board, I get:
"Validating connectivity Firmware..." followed by "Error while setting up device xxxxx. Permission denied, cannot open /dev/ttyACM0"
Port ttyACM0 does exist, and most strangely, if I run the Programmer app under nRF Connect, it works fine. It can connect to the board and perform all operations. The same board run under nRF Connect / Bluetooth Low Energy on a Windows 10 PC works fine.
I did recently update both nRF Connect and BLE on the Linux laptop to v3.2.0 and 2.3.1 respectively. The Windows PC is running nRF Connect v3.0.0 and BLE v2.3.0. I am afraid to upgrade either until I understand what is happening with the Linux installation, as it used to work.
Linux systems usually don't give users permission to access the serial port by default. You may run nrf-udev to change it. Alternatively, add your user to the dailout group.
Edit: the programmer app…
Thanks. That worked perfectly. I added my user to the dialout group as follows:
whoami - (To get the user name)
sudo adduser <username> dialout
Edit: the programmer app will normally flash the device with Jlink. Access to the serial port is not needed then.