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.
I've download the zip file and try to do it as you said, and I build it without problem after added the necessary paths. But when I debug the program I get the assert as below:
<t: 30>, main.c, 762, ----- BLE Mesh Light Switch Server Demo -----
<warning> nrf_sdh_ble: RAM starts at 0x20002A68, can be adjusted to 0x20002760.
<warning> nrf_sdh_ble: RAM size can be adjusted to 0xD8A0.
<info> app: UART Start!
<error> app: ERROR 7 [NRF_ERROR_INVALID_PARAM] at F:\mesh tools\nRF5_SDK_14.2.0_17b948a\examples\ble_peripheral\ble_app_uart_Mesh\main.c:773
I don't the reason.
I mean that I don't know how to resolve it
You should try to adjust the RAM size like described. Go to Project -> Edit Options in SES, then click on the Common Configuration, go to the Linker section & double click on Section Placement Macros. There, you can change the RAM start & size values.
Now I combine the light switch client demo in mesh sdk1.0.1 with peripheral uart demo of sdk14.2. I added the mesh sdk in nRF5_SDK_14.2.0_17b948a\components\mesh and removed the sdk14.2 from F:\nrf5_SDK_for_Mesh_v1.0.1_src\external ,also I added & changed the path of these files. But I got some errors after that as follows:
Building ‘uart_pca10040’ from solution ‘uart_pca10040’ in configuration ‘Debug’
Compiling ‘main.c’
nrf_mesh_sdk.h
main.c
#error "Unknown target softdevice version"
Compiling ‘nrf_mesh_sdk.c’
nrf_mesh_sdk.h
nrf_mesh_sdk.c
#error "Unknown target softdevice version"
implicit declaration of function 'mesh_softdevice_setup' [-Wimplicit-function-declaration]
'lfc_cfg' undeclared (first use in this function)
each undeclared identifier is reported only once for each function it appears in
unknown field 'lfclksrc' specified in initializer
Compiling ‘nrf_mesh_weak.c’
nrf_mesh_prov_types.h
nrf_mesh_prov.h
nrf_mesh_weak.c
#error "At least NRF51, NRF52_SERIES or HOST must be defined."
nrf_mesh_assert.h
list.h
nrf_mesh_prov_bearer.h
nrf_mesh_prov_events.h
nrf_mesh_prov.h
nrf_mesh_weak.c
#error "Unknown target softdevice version"
nrf_mesh_weak.c
dfu_types_internal.h: No such file or directory
Compiling ‘provisioner.c’
nrf_mesh_prov_types.h
nrf_mesh_prov_events.h
provisioner.h
provisioner.c
#error "At least NRF51, NRF52_SERIES or HOST must be defined."
nrf_mesh_assert.h
list.h
nrf_mesh_prov_bearer.h
nrf_mesh_prov_events.h
provisioner.h
provisioner.c
#error "Unknown target softdevice version"
utils.h
packet.h
broadcast.h
advertiser.h
nrf_mesh_prov_bearer_adv.h
provisioner.c
#elif with no expression
#error "Unsupported hardware platform"
packet.h
broadcast.h
advertiser.h
nrf_mesh_prov_bearer_adv.h
provisioner.c
operator '||' has no right operand
Build failed
Coule you help me to solve the problem?