I am running a C application on OpenWRT, which reads/writes on a serial port (half-duplex RS485). The first hours, everything goes ok but then start having non-stop messages like this:
2025 Jan 12 04:42:03.002 kernel: [119175.678591] mxs-auart mxs-auart.0: Unhandled status 520280
2025 Jan 12 04:42:03.672 kernel: [119176.344520] mxs-auart mxs-auart.0: Unhandled status 520280
2025 Jan 12 04:42:03.682 kernel: [119176.359067] mxs-auart mxs-auart.0: Unhandled status 520280
2025 Jan 12 04:42:04.152 kernel: [119176.829745] mxs-auart mxs-auart.0: Unhandled status 520280
2025 Jan 12 04:42:04.192 kernel: [119176.869154] mxs-auart mxs-auart.0: Unhandled status 520080
2025 Jan 12 04:42:05.502 kernel: [119178.170790] mxs-auart mxs-auart.0: Unhandled status 520080
2025 Jan 12 04:42:05.864 kernel: [119178.539585] mxs-auart mxs-auart.0: Unhandled status 520280
2025 Jan 12 04:42:07.502 kernel: [119180.178272] mxs-auart mxs-auart.0: Unhandled status 520280
Eventually the app stops running. I don't understand the cause, or how to fix it.
The port is opened at 9600 bauds, 8N1, and I flush both input and output before writing or reading from the port. The processor is an iMX28, if it helps.
This port is almost unheard of on routers!? They almost always have standard ttl serial/uart port directly communicating with the cpu hardware so they don’t really fail, or some kind of Cisco consol port can sometimes be used on some devices.
Almost all failures for serial is always connectors that doesn’t have good contact.
The CPU is an ARM926EJ-S @ 450 MHz. And it is using a customized OpenWRT as a lightweight OS, the device itself is not working as a router.
This is not a problem of electrical contact. My suspicion, after digging around in other forums, is that this is a problem with the RTS pin. It needs to be set when transmitting, but otherwise cleared.
I thought about asking on this forum, because my application runs on OpenWRT (v10.03 I think).
It appears you are using firmware that is not from the official OpenWrt project.
When using forks/offshoots/vendor-specific builds that are "based on OpenWrt", there may be many differences compared to the official versions (hosted by OpenWrt.org). Some of these customizations may fundamentally change the way that OpenWrt works. You might need help from people with specific/specialized knowledge about the firmware you are using, so it is possible that advice you get here may not be useful.
Ask for help from the maintainer(s) or user community of the specific firmware that you are using.
Provide the source code for the firmware so that users on this forum can understand how your firmware works (OpenWrt forum users are volunteers, so somebody might look at the code if they have time and are interested in your issue).
If you believe that this specific issue is common to generic/official OpenWrt and/or the maintainers of your build have indicated as such, please feel free to clarify.
This is a proprietary device, and the manufacturer could not help.
I understand that this was not the proper place to ask the question, but I was increasingly frustrated with the issue.