1

I'm in strange situation where in the near future, I'll need serial access to my raspberry pi (via TRX, RXD and ground pins). In the mean time right now I'm trying to get the logins in order and make sure I can connect to the pi serially. The problem is when I connect to the pi serially, I get to the login, but I am unable to log in. I supply the correct user and the correct password, but it still won't allow me to log in. I've changed the default password on my raspberry pi as well as added a second user with a unique password to make sure that it wasn't just a problem with the pi account. Still no luck. What is more confusing to me is that if I plug in a USB mouse and keyboard, and use the HDMI output of the pi to gain a display, I am able to log in with the same credentials that I couldn't log in with over a serial connection.

I should also mention that this raspberry pi is a 3 B+, outfitted with raspbian buster and serial communication is enabled through raspi-config. Also unfortunetly, I'm in a place where I can't connect the pi to wifi or ethernet to see if the problem persists if I try to ssh into the pi as well. Am I missing something in the configurations that would allow external devices to access the pi or something?

Could it also be that the pi hasn't been able to update? Since where I am, I cannot connect the pi to the internet, I haven't able to update it. The SD card I'm using was given the raspbian image yesterday, so not much time has passed since when the SD card had raspbian buster put on it to when I actually began to use it on the pi.

Thanks

[EDIT]

I take back the statement about not being able to connect the pi to wifi. Through hotspot, I was able to connect the pi and ping it from a computer also connected to the hotspot. However, I could not ssh into the pi, I had the same problem I had when trying to connect to the pi serially. Also, I tried updating the pi through hotspot, but my connection is not fast enough. So, still unable to tell if this is an update issue.

2
  • I would have a look at the logs eg /var/log/syslog or dmesg
    – Kate
    Apr 26, 2020 at 23:28
  • I had a similar issue with a fresh install of "Raspberry Pi OS (Debian Bullseye) 2022-04-04". It seems that the default user "pi" did not exist. I had to start it with a monitor and go through the initialization where the user is created. After that the login from serial gpio would work.
    – Heneer
    Apr 12, 2022 at 12:16

2 Answers 2

1

There could be a problem with terminal emulation used on the serial and the ssh connection. I don't know how do you connect to the serial interface. I use a laptop with Debian and connect with a USB to TTL (RS232) serial cable and use a nice small program tio, just made for this. At first I would set the password to only ASCII character, maybe abcdefgh. Then double check the baud rate and other settings of the serial console. It must be the same on both sides. Using Debian/Rasbian on the management computer, be sure that you are member of group dialout. Enable local echo on your serial terminal program so you can see what is send. On the RasPi check serial terminal settings with stty [--all] and echo $TERM. VT102, ANSII and linux are common used terminal emulations. Check the used character encoding of your serial terminal program.

Because ssh also fails, it is obvious that there may be an issue with the terminal emulation. Check the connection with verbose output using option -vvv if using OpenSSH, e.g.:

~$ ssh -vvv pi@raspberrypi
0

After reading a bunch of different forums, I found the answer. Turns out when I configured the pi, I didn't bother changing the time zone and locality of the pi, so it was in the UK by default. So, I had the special char '#' but it was really the British pound sign. A change in the password not containing special chars temporarily solves the problem. Now I've got to correct the whole keyboard issue.

1
  • Please accept one answer with a click on the tick on its left side. Only this will finish the question and it will not pop up again year for year.
    – Ingo
    May 1, 2020 at 8:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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