I’ve also added some rui_uart_mode_config(RUI_UART1, RUI_UART_USER);, because in some example projects it says rui_uart_recv will only work if uart is in user mode.
Tried different flow control.
Still, I do not receive a single byte.
Transmission on the other hand works perfectly fine. PC receives each and every byte from RAK5010
So if anyone can explain how to connect to the device and/or what am I doing wrong – it would be highly appreciated.
Especially if I get some help before I get fired
Did you connect the supply of the FT232RL to the pin EXT_VREF?
Because the nRF52 is powered with 1.8V, there is a voltage converter between the pin headers and the nRF52840. Without supplying EXT_VREF no signal will pass:
Congratulations, you found a glitch in our documentation.
rui_uart_recv(RUI_UART_DEF uart_def, uint8_t *pdata, uint16_t len) is never called. It should not even be in the documentation.
To receive UART data, you have to do it in at.c because all received UART data is handled by void at_parse(char *cmd).
Look for
if(cmd[0] == 0)
{
return;
}
and add your received data handler there
Example (not tested)
if(cmd[0] == 0)
{
// Received data is empty, return
return;
}
if(cmd[0] != 'a')
{
// Received data doesn't start with `a` so it is not an AT command
uint16_t i;
if(cmd[0] == 0){
APP_PRINT("\r\nUART ERROR");
return;
}
int idx = 0;
while(cmd[idx] != 0){
APP_PRINT("\r\n0x%02X", cmd[idx++]);
}
return;
}
RUI V2 will not get any new features anymore. We are working right now on a complete new RUI version which has many improvements. But no release data available yet.