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

find the demo

Hi
Where can I find "light_switch demo" and what programs do I need to run it?
I'm have the nrf52840
i hope some can help

Parents Reply Children
  • ok, i'm not sure what you did to hose your mesh setup but to get back on track I would suggest that you extract the nRF5-SDK-for-Mesh v1.0.1 SDK to your preferred folder/location and once that is in place simply extract the examples.zip file (provided by Hung Bui) over the %nrf5-mesh-sdk_v1.0.1%/examples folder (%nrf5-mesh-sdk_v1.0.1% = the folder where you extracted mesh).

    With that in place, you should then be able to see:

    (1) light_switch_server_nrf52840_xxAA_s140_5_0_0-3_alpha.emProject and 

    (2) light_switch_client_nrf52840_xxAA_s140_5_0_0-3_alpha.emProject in the

    .\examples\light_switch\server and .\examples\light_switch\client folders respectively.

    From there you should be able to launch those .emProject files in Segger Embedded Studio and build successfully.

    Regards,

  • it works now, but when I'm testing the program, I'm not sure if it works because it's like the the client does not always get any of the servers. somthing else i'm not syre of is it true that all 4 LEDs should light up once on one server and is it true that I should be able to manage 2 servers at Button 1

  • ok, you should be able to look at the debug output from each client/server(s) instance to determine the last log message reported...

    If running under Segger Embedded Studio (SES) look at the Debug Terminal window for output similar to the following... 

    <t:          0>, main.c,  119, ----- BLE Mesh Light Switch Server Demo -----
    <t:        306>, main.c,   85, Initializing and adding models
    <t:        392>, nrf_mesh_node_config.c,  296, Found previous provisioning data
    <t:        398>, main.c,   95, Successfully provisioned
    <t:     328072>, access.c,  453, Src Addr: 0x0100, Dst Addr: 0x0001, ttl: 1 
    <t:     655783>, access.c,  453, Src Addr: 0x0100, Dst Addr: 0x0001, ttl: 1 
    <t:     983496>, access.c,  453, Src Addr: 0x0100, Dst Addr: 0x0001, ttl: 1 

    <t:          0>, main.c,  431, ----- BLE Mesh Light Switch Client Demo -----
    <t:          0>, nrf_mesh_sdk.c,  190, Initializing softdevice
    <t:          0>, nrf_mesh_sdk.c,  125, Initializing SoftDevice...
    <t:          2>, nrf_mesh_sdk.c,  134, Ram base: 0x200019C0
    <t:         14>, nrf_mesh_sdk.c,  200, Initializing mesh stack
    <t:        301>, nrf_mesh_sdk.c,  208, Enabling mesh stack
    <t:        306>, main.c,  183, Setting up access layer and models
    <t:     780589>, main.c,  305, Node 0x0100 alive with 0 active fault(s), RSSI: -22
    <t:    1108509>, main.c,  305, Node 0x0100 alive with 0 active fault(s), RSSI: -22
    <t:    1436233>, main.c,  305, Node 0x0100 alive with 0 active fault(s), RSSI: -21

    If you are provisioning a server the first time around (or after flash erase) you should see something similar to the following on the client console...

    <t:          0>, main.c,  432, ----- BLE Mesh Light Switch Client Demo -----
    <t:          0>, nrf_mesh_sdk.c,  190, Initializing softdevice
    <t:          0>, nrf_mesh_sdk.c,  125, Initializing SoftDevice...
    <t:          2>, nrf_mesh_sdk.c,  134, Ram base: 0x200031B8
    <t:         18>, nrf_mesh_sdk.c,  200, Initializing mesh stack
    <t:        296>, nrf_mesh_sdk.c,  208, Enabling mesh stack
    <t:        301>, main.c,  183, Setting up access layer and models
    <t:    3157745>, provisioner.c,  226, Starting provisioning for dev-uuid: 0xAA:BB:CC:DD:EE:8D
    <t:    3313091>, provisioner.c,  278, Local provisioning link established...
    <t:    3423959>, provisioner.c,  264, Using static authentication
    <t:    3710813>, main.c,  402, Provisioning complete. Adding address 0x0100.
    <t:    3815676>, provisioner.c,  111, Getting composition data
    <t:    3987315>, provisioner.c,  233, Local provisioning link closed...
    <t:    3989603>, provisioner.c,  321, Composition data: 0059000000000020000100000002010000020059000000
    <t:    4092674>, provisioner.c,  119, Adding appkey
    <t:    4182852>, provisioner.c,  128, Binding appkey to the Health model
    <t:    4275555>, provisioner.c,  140, Binding appkey to the Simple On/Off model
    <t:    4540729>, provisioner.c,  165, Setting publication address for the health server to 0x0001
    <t:    4646250>, provisioner.c,  187, Setting publication address for the On/Off server to 0x0001
    <t:    4715953>, provisioner.c,  196, Adding subscription
    <t:    4720264>, main.c,  365, Configuration of device 0 successful
    <t:    4870118>, main.c,  305, Node 0x0100 alive with 0 active fault(s), RSSI: -22
    <t:    5197769>, main.c,  305, Node 0x0100 alive with 0 active fault(s), RSSI: -21
    <t:    5525929>, main.c,  305, Node 0x0100 alive with 0 active fault(s), RSSI: -23

    Here's an example of how the Debug Terminal should look from SES...

    If you aren't running within SES then the J-Link RTT Viewer client can be used to monitor debug output from each client and respective server(s).

    Regards,

  • hi i have now try to debug it, i can see that the server do not get into the two  config_params.setup_callback = configuration_setup;
        config_params.complete_callback = provisioning_complete;

  • also on the client falling into Hardfault_handler

Related