I am using the GSM/GPRS/GNSS HAT for raspberry pi zero and after running a simple script
import serial
import os, time
# Enable Serial Communication
port = serial.Serial("/dev/ttyAMA0", baudrate=115200, timeout=1)
# Transmitting AT Commands to the Modem
# '\r\n' indicates the Enter key
port.write('AT'+'\r\n')
rcv = port.read(10)
print rcv
this outputs for me AT and then OK but sometimes different unexpected characters are shown so I decided to use minicom to figure out whats going on and the moment I connect with minicom the GSM module starts sending random characters. Is that a hardware fault or is it possible to be serial configuration fault ?
Update 1: After disabling serial console thanks to @dougie's commentit stopped spamming characters but the moment I type something the character is repeated. but this was solved when i sed a python script instead of typing.
sudo raspi-config
or with the GUI preferences dialog? – Dougie Oct 4 '19 at 21:17console=ttyAMA0,115200
in acat /proc/cmdline
command). – Dougie Oct 4 '19 at 21:19cat /proc/cmdline
there isconsole=ttyl
how do i disable the serial console from there ? I usedsudo raspi-config
-> Interfacing options -> Serial -> enable, should I disable this ? @Dougie – Essam Gouda Oct 4 '19 at 21:27