Javascript required
Skip to content Skip to sidebar Skip to footer

Unable to Read Data From the Transport Connection

linux category thumbnail

The aboriginal series port which is no longer found on the latest motherboards and even the not and then latest laptops is all the same used for connecting to the console of networking devices, headless computers and a lot other applications. On computers which exercise not have built-in serial ports USB-to-Serial adapters can be used. Linux identifies inbuilt serial ports as /dev/ttyS0, /dev/ttyS1,….. /dev/ttySn and USB-to-Serial adapters every bit /dev/ttyUSB0, …. /dev/ttyUSBn and they can be accessed using concluding emulator applications like PuTTY, minicom and screen.

Normally when the serial console is accessed using the terminal emulator of your choice every bit a not-root user y'all'll get a "permission denied" error. Using PuTTY on Ubuntu I got the following mistake – "Unable to open connection to: Unable to open series port".

putty serial port error
PuTTY on Linux throws this error if the user running it does non have permissions to access the serial port device file

This is because the device file of the serial port does non have permissions to allow to currently logged in user to "read" or "write" to the serial device. The following control will confirm that.

jesin@localhost:~$ ls -l /dev/ttyUSB* crw-rw---- 1 root dialout 188, 0 Apr  8 21:54 /dev/ttyUSB0 crw-rw---- 1 root dialout 188, ane April  8 21:54 /dev/ttyUSB1

So we can come across that only the "root" user and the "dialout" group have proper permissions, while chmod tin be used to grant access to the required user or everyone information technology is messy and not a secure mode. The easier way is the add the user to the dialout group.

First verify if the user does belong to the dialout group using the "id" command.

jesin@localhost:~$ id -Gn jesin jesin adm cdrom sudo dip plugdev lpadmin sambashare kvm

Next add the user to the "dialout" supplementary group.

jesin@localhost:~$ sudo usermod -a -Grand dialout <username>

Example:

jesin@localhost:~$ sudo usermod -a -G dialout jesin

Y'all take to logout and login before changes take result. After logging dorsum in attempt the "id" command again.

jesin@localhost:~$ id -Gn jesin jesin adm dialout cdrom sudo dip plugdev lpadmin sambashare kvm

At present all your terminal emulator applications will piece of work with the series port without any issues.

osmangrespear58.blogspot.com

Source: https://websistent.com/fix-serial-port-permission-denied-errors-linux/