Bizare ssh connection issues to rpi4 coprocessor for vision

Hello everyone!

I am from team 9418 and this is my team’s first year in FRC. I am currently working on transferring my team’s raspberry pi 4B from the wpilib image to raspberry pi OS and have been encountering serious issues when trying to SSH into the pi. Whenever I try to SSH into the pi, it will 95% of the time throw one of many different error messages. When I do manage to connect to the pi successfully, it will work for enough time to run a few commands, and then it will freeze and sends this message: client_loop: send disconnect: connection reset

I have tried so many different things to resolve this issue and none of them worked. Here is a list:
-Tried to SSH over both wifi and ethernet
-Tried different computers
-Tried to use a spare rpi4
-Tried to connect with both ip and hostname
-Reflashed the micro SD card for the pi and tried different SD cards
-Tried to ssh through macOS
-Tried to connect through command prompt, powershell, and puTTy
-Tried to find it over wifi during one of the rare time I got connected with angry IP scanner (it did not find anything with the pi’s hostname)
-Created custom rules for the firewall to allow port 22 through

A list of error messages the computer has given me:
-connect to host <> port 22: Connection timed out
-could not resolve hostname <> No such host is known
-WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! (then it says there is possibly a man in the middle attack and that a key for a fingerprint has changed)

Some additional information:
-I have enabled SSH on the pi directly in raspberry pi etcher as I was flashing the SD card every time I reflashed the micro SD card
-The raspberry pi didn’t have any issues while on the wpilib image, and all our vision code code ran smoothly on it
-I did not modify any files on the pi. The errors occurred immediately after I flashed the micro SD card with the raspberry pi OS.
-I don’t know if this is important, but I did everything on the pi headless

I am honestly somewhat lost on what I should do right now. If anyone has any suggestions on how I could resolve this, please let me know; any help is appreciated.

Thank you!

You can ignore the “remote host identification” error – just follow the instructions to get around this. Given your environment, there really isn’t any “middle”. IT sounds as though your Pi may be rebooting, so it might be worth setting up a console if you can.

This means you have an unreliable network connection on your computer or the raspberry pi. How are you communicating between the two, what does your network look like?

This warning means you’re connecting to a different Raspberry Pi at the same hostname/ip address as one you saved. The fix for this is to remove the entry from the ~/.ssh/known_hosts file. On Windows, you can open the file with Notepad at C:\users<username>/.ssh/known_hosts. Then, find the row with the host/IP you’re trying to connect to and remove it. Save and close.

Thank you for the remote host identification error fix. Regarding how I communicate with the pi/my network, I connect it via ethernet to a laptop and attempt to SSH into it. I have done this both while connected to wifi and while not connected to wifi, and the errors persist.

I managed to get a hold of a micro HDMI cable today and set up a monitor and keyboard to set up some libraries on the pi. I am still worried about how the pi will integrate with the robot later those. One thing I did notice is that it gave me a low voltage warning. Do you know if low voltage could have any impact on my issues?

Low voltage was the first thing that came to my mind when you described the issues. Yes, I think a better power supply and perhaps a different USB cable for power would be a good test.

Yeah, I’ll probably do some testing with a different USB cable. I used the ones that came with some REV electronics, so I’ll try some new ones.

Check the specs for your power supply – the Pi 4 requires 2.5 amps even with no USB peripherals plugged into it. Otherwise, 3 amps.

Thanks! I’ll let you know how it goes once I do some testing.

Yeah, I plugged the pi into a proper power supply and it looks like it works now. Got vision on raspberry pi os running now.

1 Like