This is the Solution to get ttyAMA0 working:
add to config.txt:
open terminal connection and use these commands:
sudo systemctl stop serial-getty@ttyAMA0.service
sudo systemctl disable serial-getty@ttyAMA0.service
sudo systemctl mask serial-getty@ttyAMA0.service
to get access with user created python script you have to edit accessrights with (use this after every reboot):
sudo chmod 666 /dev/ttyAMA0
this is my python testscript:
os.popen(‘sudo chmod 666 /dev/ttyAMA0’)
ser = serial.Serial(
print(’[%s] connected’ % ser.portstr)
count = 1
message = ser.read_until(’\r’).strip()
if message != ‘’:
print(‘Line %s: %s’ % (count, message))
count += 1
print(’\n[%s] closed’ % ser.portstr)
Yesterday and today I tried more hours to get the GPIO Uart ttyAMA0 working on Pi3.
My aim is to use the GPIO Uart for Communication to/from Arduinow with Kodi Addon with Baud 38400.
After lot of dtoverlay and systemctl (from lot of outdated websites) i got the message output with simple python script. But i have to run the script with sudo.:
The messages came in, but there are some other messages between, like “password incorrect” “osmc login:”
Do you know what it is, and how to disable this stuff?
Could you tell me how to get access without sudo and kill the confuse messages between?
And yes, i did found the threads in this forum, but i mean these are outdated also.
the image what i’m using is: OSMC_TGT_rbp2_20180316.img.gz