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?
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?
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.
Go to sdk_config.h configuration wizard, open the nRF_Libraries tab & make sure APP_FIFO_ENABLED is true, APP_UART_ENABLED is true, etc. Then recompile & the conditional preprocessor macros should not be grey anymore.
I've solved it , thank you.
can u write a blog , how u did it?
I add the uart to mesh SDK ,and remove the repeated function (just remaining one of them ). also you should add all the path of the head file in uart example ,but don't change the preprocesser definitions ,the program didn't work when I added something to it. it's OK
Hi Bjorn Kvaale, I try to combine uart example (without ble) nrf SDK 15 with mesh sdk2.0.1. It still shows the same problem ,the codes are gray although I enabled the UART, APP_FIFO & APP_UART in sdk_config.h. Can you help me to find the reason?
Hi Bjorn Kvaale, I try to combine uart example (without ble) nrf SDK 15 with mesh sdk2.0.1. It still shows the same problem ,the codes are gray although I enabled the UART, APP_FIFO & APP_UART in sdk_config.h. Can you help me to find the reason?