This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

UART implementation mesh light switch client nRF52 to nRF9160

Hello,

I am trying to send data from my light switch mesh client (nRF52840) to my gateway, the nRF9160 using UART. I added the UART functionality to the light switch client. 

I use the app_uart_put function in the app_generic_onoff_client_status_cb to send data to the nRF9160 when a status message is received. 

The issue I am facing is that I only receive the UART data on the NRF9160 when the p_in->present_on_off is equal to 0. If it is a 1, the app_uart_put returns SUCCESS but I never receive data on the nRF9160. I do not understand what the issue is. I tried using flags to trigger the app_uart_put in my while loop instead of the status_cb but I still don't receive any data.

Do you have have any ideas as to what the issue might be?

I am using the latest softdevice.

Thank you.

Parents
  • Hello,

    Have you tried to connect something else (than the nRF91) to the UART to see whether the UART message is actually sent from the nRF52? If you set it up to use  pin 6(TX) and 8(RX), you should be able to monitor the UART in an UART terminal on a computer, if you test with an nRF52840 DK.

    Could it be that there is a trigger character that the nRF91 is looking for that is sent when you have p_in->present_on_off = 0, but not when it is 1? I.e. "\r\n" ?

    BR,

    Edvin

Reply
  • Hello,

    Have you tried to connect something else (than the nRF91) to the UART to see whether the UART message is actually sent from the nRF52? If you set it up to use  pin 6(TX) and 8(RX), you should be able to monitor the UART in an UART terminal on a computer, if you test with an nRF52840 DK.

    Could it be that there is a trigger character that the nRF91 is looking for that is sent when you have p_in->present_on_off = 0, but not when it is 1? I.e. "\r\n" ?

    BR,

    Edvin

Children
No Data
Related