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?
I've solved it by adding some things like NRF52_SERIES to list of preprocessor symbols.
But whne I build my program it shows more errors about .o files. Just like this :
It shows there are many functions are undefined or multiple defined . I couldn't deal with it and can you help me?
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.
The code is gray because the UART, APP_FIFO & APP_UART are not enabled in NRF_MODULE__ENABLED. You will have to enable these to stop the conditional preprocessor macros from being gray. It seems that the mesh does not work because the softdevice has not been enabled. I think you need to enable the modules first & then take it from there.
Yes you are right. But how to enable the softdevice and UART etc,I can't find the codes to enable them .
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.