Mobilinkd NucleoTNC Fails to Connect at 38400 Baud
Status: Beta
Brought to you by:
apavlin
beta154 -- cannot open any TNC at 38400 baud. The Mobilinkd NucleoTNC operates at 38400 baud. Attempting to connect to the TNC at 38400 baud results in an exception (see attached screenshot).
Opening the TNC at 115200 succeeds. However, YAAC will only receive garbled data at that speed.
Similar problem is observed with a TNC3, which ignores baud rate settings. Connecting at 115200 succeeds, whereas 38400 fails with the same exception.
Anonymous
Please send the YAAC.out file from your configured YAAC log directory. Your screenshot showed only part of the error message.
Log file attached.
Relevant information seems to be:
Googling for "RXTXPort.java:211" returns a lot of results, many of the related to 38400 baud rate.
Note that termios(3) says this:
After looking at the code, my hunch is that the termios struct is not zeroed out, leaving garbage in the custom divisor. When B38400 is passed, the kernel tries to construct a baud rate using the garbage in the custom divisor field and fails.
This seems to be a potential fix for the issue.
https://sources.debian.org/patches/rxtx/2.2pre2+dfsg1-2/usb_38400.patch/