2

I am working on integrating Sim900a on Rpi3B. As usual connecting to TX->Rx, Rx->Tx (GPIO14, GPIO15 in Rpi) - following diagram from this link: How do I connect GSM SIM 900A to a Raspberry Pi 3?

When I testing using Minicom 2.7x, it shows below error. My minicom setting using serial /dev/ttyS0 and baudrate 9600 (as baudrate 15200 got jammed the console and no response)

raspberrypi login:

raspberrypi login:

raspberrypi login:

raspberrypi login:

raspberrypi login:

raspberrypi login:

raspberrypi login:

ERROR

The error occurs even before typing AT command and it loop the error many times.

I tried to connect the Sim900A module to UART->USB converter, and connect to Windows 10 laptop, tested it using Putty, COM7 with baudrate 9600, It all works well.

Any solution?

Additional info on my Sim900a: Manufacture: Simcom Model:SIM900A S2-104V-Z094T

2
3
+50

This seems to be a rather basic issue: your system is configured to provide a login shell (and possibly kernel boot messages) over the UART. You need to disable it in order to use the serial for your own purposes.

This can be done using sudo raspi-config (go to Advanced Functions - Serial and select "No" to disable the shell over the serial port), then reboot. Normally that's all that should be needed.

Alternatively disabling kernel boot messages can also be done by removing console=ttyAMA0,115200 (or something similar) from /boot/cmdline.txt (this one needs a reboot). Disabling the login shell can be done by running sudo systemctl stop getty@ttyAMA0 (this one is effective immediately, until a reboot). You can also disable it permanently with sudo systemctl disable serial-getty@ttyAMA0.service

4
  • You are correct. But I found other thing about "getty". Can you explain it? Then I will make your answer as correct. I disable the "getty" thing and do your raspi-config suggestion, and it worked perfectly.
    – Mr Hery
    Feb 5 '20 at 7:36
  • @MrHery See if it's clearer now. Actually, raspi-config should have stopped getty under the hood, but indeed there's a command to do it manually. Feb 5 '20 at 11:55
  • Its clearer now. Nice explanation. What does getty do?
    – Mr Hery
    Feb 6 '20 at 8:31
  • 1
    getty is a process that monitors a terminal, spawning a specified command on it (in your case, login) when someone opens it for data transmission. login then would ask for a login/password and spawn the user's shell (bash) if the password is correct, or simply terminate. In both cases, when there's no more processes on a terminal (you type the wrong password, or you enter the correct password and then exit bash), getty will re-spawn login again. Obviously, SIM900A sends some data though the UART, but it looks nothing like a correct username / password to login. Feb 7 '20 at 8:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.