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

How to communicate between PC and mesh client via uart

now I want to transfer  some data between  PC and the client of mesh,I have read this  case   and try to add the light switch client example to the uart example.but I don't know how to exchange the codes of main.c.Can you tell me how to do it?

Parents
  • You can also take a look at this infocenter link. In the link you provided, there is a zip file with the whole example code. I would suggest to download it & see how the main.c code is implemented.

  • Hi Bjorn,

    I have solved it and I can build the program successfully if I remove three NRF_MODULE_ENABLED functions.

    They are 

    1://#if NRF_MODULE_ENABLED(UART)

     //#endif //NRF_MODULE_ENABLED(UART)

    2://#if NRF_MODULE_ENABLED(APP_FIFO)

     //#endif //NRF_MODULE_ENABLED(APP_FIFO)

    3://#if NRF_MODULE_ENABLED(APP_UART)

     //#endif //NRF_MODULE_ENABLED(APP_UART)

    If I don't remove them I can't use the functions defined in them ( the codes are gray between  the #if  and #endif ). I tried it when I just use the demo of  peripheral uart in sdk v14.2 and the program worked successfully.

    After built  it successfully , I can see the nrf_log doesn't work and the program stopped in ERROR_CHECK(sd_softdevice_enable(&lfc_cfg, softdevice_assert_handler));.

    The mesh is not work.

Reply
  • Hi Bjorn,

    I have solved it and I can build the program successfully if I remove three NRF_MODULE_ENABLED functions.

    They are 

    1://#if NRF_MODULE_ENABLED(UART)

     //#endif //NRF_MODULE_ENABLED(UART)

    2://#if NRF_MODULE_ENABLED(APP_FIFO)

     //#endif //NRF_MODULE_ENABLED(APP_FIFO)

    3://#if NRF_MODULE_ENABLED(APP_UART)

     //#endif //NRF_MODULE_ENABLED(APP_UART)

    If I don't remove them I can't use the functions defined in them ( the codes are gray between  the #if  and #endif ). I tried it when I just use the demo of  peripheral uart in sdk v14.2 and the program worked successfully.

    After built  it successfully , I can see the nrf_log doesn't work and the program stopped in ERROR_CHECK(sd_softdevice_enable(&lfc_cfg, softdevice_assert_handler));.

    The mesh is not work.

Children
Related