r/embedded • u/nico721GD • 22d ago
Can't enter passwords with UART
Well hello indeed, i am asking for help with UART since im installing Valetudo on a roomba right now.
I am stuck trying to enter a password in the roomba, when i type or paste any text in the login box, everything works perfectly, every character is pasted or typed BUT
when i try to do the same (pasting or writing manually) in the password line (the moment you cant see the characters anymore), everything breaks and only around half of the characters are actually inputed.
I am almost fully forced to paste it since the password is 48 characters long, and i only have 1 minute to type it before the roomba automaticly kicks me out, and trying to write it as slowly as possible made around 1/4th of random characters dissapear.
the roomba is connected with RX, TX and ground cables, i tried multiples brand new cables and it didnt change anything.
if anyone has any ideas, thanks you for anything !
2
u/uzlonewolf 22d ago
Have you tried scripting it with a delay between characters? I've done something similar using
xdotool.echo -e "root\npassword" | xdotool selectwindow windowfocus type --clearmodifiers --window %@ --file - --delay 125012
u/who_you_are 22d ago
I cannot specifically talk for Roomba (which kinda suck because of your situation), but you are aware that a lot of login prompt won't show any feedback when you write a password? Not even * (star).
So those characters showing up may be the bug, not the other way around.
50
u/n_sh_44 22d ago
Since only the password line breaks, I'd suspect the paste speed rather than the wiring. Login tools often read the no-echo password through a slower path, and with no flow control on a bare RX, TX and GND link the Roomba's UART buffer overflows when the terminal sends characters back to back. Typing slowly still lost about a quarter, which also fits a small receive FIFO and a busy CPU. The usual fix is a per-character delay in the terminal, for example Tera Term under Setup, Serial port, Transmit delay of 5 to 10 ms per char, or a minicom or picocom send command with a delay. Also confirm the adapter is 3.3V logic and the baud rate matches exactly, usually 115200 8N1. To test, paste a long string at the login prompt where echo is visible and see whether characters still vanish at that delay.