> > But the simplest thing that comes to mind is just to kill the NSH task, > run modbus, and restart NSH when you are finished with modbus. >
Maybe even simpler: Run the modbus task at a higher priority than NSH. Then all of the serial into should go to Modbus and not to NSH