Hardware Serial Port Issues: Local (internal) port behaves odd, same settings on /dev/usbX work fine
Turbo last edited by
I'm working with a new IoT device based on ARM. It has several hardware serial ports, mapped to /dev/ttymxc0 through /dev/ttymxc6.
I was testing this out here, and the hardware serial ports don't seem to work: It looks like Mango is sending the proper string, and the slave device is responding with the proper data (at least according to my scope grab of the bus). But Mango never gets the response.
I tried every possible setting of flow control and echo, and got the same results. Same setup on the /dev/USBx device (a standard FT232RL cheapo converter) workes just fine.
Any ideas on troubleshooting this one?
There's no fire here; It just means I have multiple USB dongles hanging out of the thing, and I'd rather not have that...
Turbo last edited by
If I use miniterm or something, I can get data out of the /dev/ttymxc devices just fine. And they can listen for incoming things, once again via your local term software, so the ports appear to be showing up.. Just not quite right to Mango.
phildunlap last edited by
What data source type are you using? I would consider trying a Serial data source with the catchall configuration described in posts like this one: https://forum.infiniteautomation.com/topic/2274/serial-data-source-trouble-to-show-value-from-com-port/2
One thing that would enable someone to do is drop a breakpoint in the SerialDataSourceRT's serial event method and see what is actually being returned to Mango: https://github.com/infiniteautomation/ma-modules-public/blob/main/Serial Data Source/src/com/infiniteautomation/serial/rt/SerialDataSourceRT.java#L250
If we didn't want to bother with breakpoints, we could log I/O from our serial data source and we'll either get an event, some characters captured and recorded in a log, or absolutely nothing. If we get an event, we'll need to troubleshoot what the event is for. If we get things captured and logged, we would need to figure out where the actual protocol you were attempting (or maybe it was a Serial data source all along!) is going astray. And, if there is nothing at all, then I would wonder if there's some subtlety in the Linux configuration of those ports that isn't comporting with the JSSC library's expectations. But, I would have expected an event when attempting to open the serial port, if that was the case.
I assume you updated the regex in the env.properties for serial ports to correctly resolve these ports. Sounds like you got past that part.