Menu

#15 Mobilinkd NucleoTNC Fails to Connect at 38400 Baud

YAAC 1.0-beta
open
nobody
None
2020-07-08
2020-07-05
Rob Riggs
No

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.

1 Attachments

Discussion

  • Andrew Pavlin

    Andrew Pavlin - 2020-07-06

    Please send the YAAC.out file from your configured YAAC log directory. Your screenshot showed only part of the error message.

     
  • Rob Riggs

    Rob Riggs - 2020-07-07

    Log file attached.

    Relevant information seems to be:

    Caused by: gnu.io.UnsupportedCommOperationException: Invalid Parameter
            at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:211)
            at org.ka2ddo.yaac.io.SerialTNCConnector.configure(SerialTNCConnector.java:160)
    

    Googling for "RXTXPort.java:211" returns a lot of results, many of the related to 38400 baud rate.

     
  • Rob Riggs

    Rob Riggs - 2020-07-07

    Note that termios(3) says this:

    The actual bit rate corresponding to B38400 may be altered
    with setserial(8).

    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.

     
  • Rob Riggs

    Rob Riggs - 2020-07-08

    This seems to be a potential fix for the issue.

    https://sources.debian.org/patches/rxtx/2.2pre2+dfsg1-2/usb_38400.patch/

     

Anonymous
Anonymous

Add attachments
Cancel