apache / nuttx

Apache NuttX is a mature, real-time embedded operating system (RTOS)
https://nuttx.apache.org/
Apache License 2.0
2.51k stars 1.06k forks source link

MODBUS NOT USABLE WITH USB SERIAL #3430

Open protobits opened 3 years ago

protobits commented 3 years ago
  Description: Modbus can be used with USB serial, however, if the USB
               serial connection is lost, Modbus will hang in an infinite
               loop.

               This is a problem in the handling of select() and read()
               and could probably resolved by studying the Modbus error
               handling.

               A more USB-friendly solution would be to: (1) Re-connect and
               (2) re-open the serial drivers.  That is what is done is NSH.
               When the serial USB device is removed, this terminates the
               session and NSH will then try to re-open the USB device.  See
               the function nsh_waitusbready() in the file
               apps/nshlib/nsh_usbconsole.c. When the USB serial is
               reconnected the open() in the function will succeed and a new
               session will be started.
  Status:      Open
  Priority:    Low.  This is really an enhancement request:  Modbus was never
               designed to work with removable serial devices.
fjpanag commented 3 years ago

I think Modbus is only part of the apps repo.
Maybe this is to be moved too?

acassis commented 3 years ago

I think Modbus is only part of the apps repo. Maybe this is to be moved too?

+1 -> apps