-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible bug when auto login is used on the device #103
Comments
Hi, this is the age-old console log clutter issue. The solution is to set your # Allow clutter after the login prompt
login_prompt = tbot.Re(r"~ # .{0,100}")
# Wait for 2 seconds until all messages have been printed
login_delay = 2 Let me know if this works! |
@Rahix main problems I see with your solution:
|
@MihaiGruieti1, sorry for the delayed response. Your points are absolutely valid - however there is not really anything we can do about that. tbot expects a clean console which isn't interrupted by random trace messages. It would be impossible to build a robust console parser which can deal with such random clutter. Instead, it is your duty to provide such a clean console. My suggestion above is a workaround for situations where you can't change the kernel config for a silent console. In similar spirit, another workaround is to immediately send a |
Hello.
I have a problem with a case when a board uses an autologin. read_until_prompt method doesn't work if the device keeps sending logs.
For example, if we set login_promt like this
~ #
and the input bytearray will become like this~ # [ 10.364872] startup_sh[0]: IP is: 192.168.80.254
the method will just ignore the string.My suggestion is to replace
endwith
withfind
herePlease, guide me if I'm wrong.
The text was updated successfully, but these errors were encountered: