0
Matthew Harding

Cannot open serial on putty unless chmod tty

Recommended Posts

Armbianmonitor:

Hello,

 

I have an issue, i am running the Pine LTS board on eMMC using Armbian latest stable image.  We want to access the serial port on the board, so to test i downloaded putty, i select serial and click open. I get an error when opening this, so i have to run: sudo chmod 777 /dev/tty50 and sudo chmod /dev/tty52 on each boot, then i am able to open the serial port using putty. 

 

When i look at the ls -l /dev/tty50 i get: crw--w---- 1 root tty 4, 50 Jan 30 30 16:07 tty50. After etensive research i added my user cst to the tty group, but when i reboot i still have to manually run chmod again to access the serial port. 

 

Can someone please assist me with getting this command to run on boot or some solution as i cannot every time run this command as these boards are Gateways which will be in remote locations.  I did try rc.local but i understand that this is not available anymore. 

 

I am not too much of a Armbian guru so if you could assist in detailed steps i would appreciate it. 

 

No URL is given when i run the armbianmonitor command, it is blank. 

 

Thanks!

 

 

Share this post


Link to post
Share on other sites
42 minutes ago, Matthew Harding said:

sudo chmod 777 /dev/tty50 and sudo chmod /dev/tty52 on each boot

Those tty are not the one for serial port, you should use /dev/ttyS0, /dev/ttyS1 or /dev/ttyS2.

43 minutes ago, Matthew Harding said:

I did try rc.local but i understand that this is not available anymore.

Not true ! /etc/rc.local exist on any Linux including Armbian ...

Share this post


Link to post
Share on other sites
40 minutes ago, martinayotte said:

Not true ! /etc/rc.local exist on any Linux including Armbian ...

but on the original PC (X86/AMD64) port of debian stretch I didnt got a /etc/rc.local

I had to create a own rc.local-service or start /home/guido/rc.local via crontab and @reboot

but on armbian in the debian stretch version it is every time available.

Share this post


Link to post
Share on other sites

thanks for the replies, i mean S0 and S2. Here is my /etc/inid.d/rc.local

 

!/bin/bash -e
### BEGIN INIT INFO
# Provides:          rc.local
# Required-Start:    $all
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: Run /etc/rc.local if it exist
### END INIT INFO
echo "running rc.local"> /tmp/rctest.txt

sudo chmod 777 /dev/ttyS0
sudo chmod 777 /dev/ttyS2
exit 0

 

Is there something i am missing here? 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
0