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.
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?
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?