Modbus timeout callback

Hi.

I would like to know how to get req_timeout_cb to work after no respond from the device I call

I already include mgos_modbus.h and override the method

static void req_timeout_cb(void* arg) {
    LOG(LL_WARN, ("############ Modbus timeout"));

(void)arg;
}

Thanks you for your answer!

You can’t.

Why would you want to do it?
Every mb_read_*/mb_write_* function takes a callback function argument which will be called by the library upon success or fail. The first argument of the callback is the status of the transaction: RESP_SUCCESS, RESP_INVALID_SLAVE_ID, etc

OK. Thanks you so much