debevv / nanoMODBUS

A compact MODBUS RTU/TCP C library for embedded/microcontrollers
MIT License
234 stars 47 forks source link

Make Unknown Functions Reply to Client #54

Closed pseudotronics closed 1 week ago

pseudotronics commented 2 weeks ago

Changed the default case in handle_req_fc to respond instead of silently erroring. This should be done to avoid the connection timing out.

Most clients expect a response even when the function is unsupported.

debevv commented 1 week ago

Right, this was probably made when the calling function was supposed to call send_exception_msg() with the returned error. Shame that tests didn't catch this.
Thank you