/** @brief Function for testing UART loop back. * @details Transmitts one character at a time to check if the data received from the loopback is same as the transmitted data. * @note @ref TX_PIN_NUMBER must be connected to @ref RX_PIN_NUMBER) */ static void uart_loopback_test() { uint8_t tx_MUX[20] = ("AT+CIPMUX=1\r\n"); //192.168.86.22 Ip address uint8_t tx_SERVER[20] = ("AT+CIPSERVER=1,80\r\n"); uint8_t tx_SEND[20] = ("AT+CIPSEND=0,11\r\n"); uint8_t tx_DATA[20] = ("Data Rssi\r\n"); //uint8_t tx_SEND_A[20] = ("AT+CIPSEND=0,15\r\n"); //uint8_t tx_DATA_A[20] = ("Shailav\r\n"); uint8_t tx_CLOSE[20] = ("AT+CIPCLOSE=0\r\n"); uint8_t rx_data; uint32_t err_code; // Start sending one byte and see if you get the same for (uint32_t i = 0; i < 40; i++) { while (app_uart_put(tx_MUX[i]) != NRF_SUCCESS); } nrf_delay_ms(10000); for (uint32_t i = 0; i < 40; i++) { while (app_uart_put(tx_SERVER[i]) != NRF_SUCCESS); } nrf_delay_ms(10000); for (uint32_t i = 0; i < 40; i++) { while (app_uart_put(tx_SEND[i]) != NRF_SUCCESS); } nrf_delay_ms(10000); for (uint32_t i = 0; i < 40; i++) { while (app_uart_put(tx_DATA[i]) != NRF_SUCCESS); } nrf_delay_ms(10000); for (uint32_t i = 0; i <40; i++) { while (app_uart_put(tx_CLOSE[i]) != NRF_SUCCESS); } nrf_delay_ms(10000); return; }