-
Notifications
You must be signed in to change notification settings - Fork 5.2k
RPI5 UART not working after reboot/ upgrade of Kernel #6374
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
Comments
As mentioned, |
There is a different potential fix for the same problem that you can try:
|
First of all, thanks for your time and response. I have updated and rebooted:
For the first boot, briefly the printer was working (Text on LCD screen, just about able to click home on the fluidd dashboard) Here are the moonraker logs:
We can see the following behaviour: Services Starting and Monitoring:
Websocket Connections: Klipper Connection Established: Power and Shutdown Handling: I will now attempt to short TX and RX to run pi-specific diagnostics, such as loopback tests, but I suspect the issue still remains. |
Interesting results on the loopback test (see Script in original post/ticket details)
(Yes, it received/read all those carriage returns)
|
Revised Script:
I seem to now be getting mixed loopback passes and failures. Could be that my script isn't entirely reliable here Any suggestions to further test the reliability and functionality of my TX/RX Pins/comms? Here is another approach:
Results:
Results are not consistent.. |
I believe it is fixed now! My issue was split into 2: UART not working - this was indeed fixed by: From my previous tests we can see UART loopback failing and succeeding. As suspected, the failures can be due to the python script itself. The fact that I was getting succeeded loopbacks after the update proved that the functionality was there. Permission issues: I cleared out my logs directory Re-created my symbolic link:
And cleared the Klipper log:
Found this:
So we're now down to a permissions issue.
Group should be dialout, not tty
The permissions did not stick.
Found this post: And Ran the following:
I had to do this because this process was blocking the port. Repeated the steps:
This time the group stuck:
In Klippy.log:
Everything is now working! |
Yesterday (11-4-24) I ran The meteopi started generating errors for me on both my test and production server. I then re-ran Will pulls/6377 be included in a Thanks, |
#6377 has not been merged - instead, DMA has been disabled on UART0. You can verify this with
|
Here is the results of my dma0 (1000010000.dma): number of channels: 5 dma1 (1000010600.dma): number of channels: 5 dma2 (1f00188000.dma): number of channels: 8 So if I understand correctly, going forward I will need to perform the following commands when updating Raspberry PI OS for the meteopi to work?
Thank You, |
That output shows that DMA is enabled, so you must be running an old kernel. But that's preferable to having the problems without DMA because it suggests a normal, up-to-date kernel will also be OK.
|
|
I ran
dma1 (1000010600.dma): number of channels: 5 dma2 (1f00188000.dma): number of channels: 8 I would like to let the meteopi run overnight and check if there are any errors in the logs in the morning. I will let you know the results tomorrow. Thanks, |
I let the meteopi run overnight, there were many errors this morning. There seems to be something in pulls/6377 that fixes the meteopi! I will re-run Thanks, |
From various (incomplete) troubleshooting documents about weather stations on the internet, it seems they use baudrates not exceeding 19200bps - that'd have to be milliseconds of interrupt latency to overflow the uart FIFO. That's a little concerning. What's the output of Of course getting DMA back is going to be the way forwards anyway. |
with speed 19200 baud; line = 0; would you like me to run |
I really don't expect the update to change the stty properties. You might see some output if you stop MeteoPi as before, then:
|
Kernel Version 6.12.20
There is no output. Kernel Version 6.6.74
There is no output. |
Describe the bug
After updating my
Raspberry Pi 5
to kernel version6.6.51-v8-16k+ #1 SMP PREEMPT
, the UART communication between the Pi and the BigTreeTech SKR Mini E3 V2 board over GPIO14 (TX) and GPIO15 (RX) pins (pins 08 and 10) has become unreliable. It generally does not connect at all. The printer cannot connect via UART, leading to the errormcu 'mcu': Unable to connect.
A UART loopback test using a Python script consistently fails, indicating an underlying communication issue with the UART.Linux Ender5Pro 6.6.51-v8-16k+ #1 SMP PREEMPT Wed Sep 18 16:24:48 UTC 2024 aarch64 GNU/Linux
Steps to reproduce the behaviour
Interestingly, after using
sudo rpi-update pulls/6371
and restarting, I notice that with this version, If I let it sit for a long time, I eventually do get text on the printer screen randomly and have had a very brief window where I was able to start the homing process, but then it just dies completely. Its very random, and has only happened like 2-3 times in my testing.
I have created this python script:
To help test UART loopback after shorting pins 8 and 10 (TX RX) , But never had a successful result from the test everytime I have tried.
I have also tried
But have been unable to connect or get loopback, which indicates that the RPI5 is the issue here , maybe due to kernel upgrade. I have not noted what my previous kernel was.
Device (s)
Raspberry Pi 5
System
Logs
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: