Modbus(RS485) communication using UART1 on Nrf9160

Hi,

I am working on nRF Connect sdk version1.9.0.
I am using Zephyr Modbus Server and Client Example to setup communication between two nRF9160dk .
i have 2  Arduino shield(https://www.digikey.ie/en/products/detail/dfrobot/DFR0259/6588575)  to convert RS485 to  UART .


I run server application on one Dk and Client on another.
i am getting following error on client side.

i tried to debug this error .it originates from this function in  modbus_core.c

int modbus_tx_wait_rx_adu(struct modbus_context *ctx)
{
    modbus_tx_adu(ctx);

   if (k_sem_take(&ctx->client_wait_sem, K_USEC(ctx->rxwait_to)) != 0) {
   LOG_WRN("Client wait-for-RX timeout");
     return -ETIMEDOUT;
}

return ctx->rx_adu_err;
}

Please assist us.

Regards,
Waqar Ahmed

Related