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

Light_switch example does not work

Found the same problem:

https://devzone.nordicsemi.com/f/nordic-q-a/34160/light_switch-example-sdk-v2-0-1----problem-with-server

1) The server does not receive the address. But provisioner writes "all servers provisioned".

<t: 0>, main.c, 247, ----- BLE Mesh Light Switch Client Demo -----
<t: 0>, mesh_softdevice_init.c, 112, Initializing SoftDevice...
<t: 0>, mesh_softdevice_init.c, 77, Enabling BLE...
<t: 2>, mesh_softdevice_init.c, 88, Ram base: 0x200032C8
<t: 627>, main.c, 220, Initializing and adding models
<t: 5524>, main.c, 275, Device UUID : 0059ABCDEFABCDEFACCDEFABCDEFABCD
<t: 2813240>, main.c, 98, Successfully provisioned
<t: 2813243>, main.c, 102, Node Address: 0x0100

<t: 0>, main.c, 219, ----- BLE Mesh Light Switch Proxy Server Demo -----
<t: 567>, main.c, 166, Initializing and adding models
<t: 31502>, main.c, 258, Device UUID : 0059FFFF00000000CE7FB60146F2E749

<t: 0>, main.c, 550, ----- BLE Mesh Light Switch Provisioner Demo -----
<t: 0>, mesh_softdevice_init.c, 112, Initializing SoftDevice...
<t: 0>, mesh_softdevice_init.c, 77, Enabling BLE...
<t: 2>, mesh_softdevice_init.c, 88, Ram base: 0x200032C8
<t: 573>, main.c, 488, Initializing and adding models
<t: 584>, main.c, 531, Setup defaults: Adding keys, addresses, and bindings
<t: 760>, provisioner_helper.c, 329, netkey_handle: 0
<t: 772>, main.c, 578, <start>
<t: 27243>, main.c, 117, Flash write complete
<t: 27246>, main.c, 565, Starting application ...
<t: 27248>, main.c, 567, Provisoned Nodes: 0, Configured Nodes: 0 Next Address: 0x0100
<t: 27252>, main.c, 568, Dev key : C3F9DC31849FB604BC298E870CE775B2
<t: 27255>, main.c, 569, Net key : 19B805BFCA49BA46EF120CCC2226CF6A
<t: 27258>, main.c, 570, App key : 67A61EEF48D1C518E8FECAABCE7E35EF
<t: 27261>, main.c, 571, Press Button 1 to start provisioning and configuration process.
<t: 374080>, main.c, 448, Button 1 pressed
<t: 374082>, main.c, 361, Waiting for Client node to be provisioned ...
<t: 378847>, provisioner_helper.c, 282, Scanning For Unprovisioned Devices
<t: 378854>, provisioner_helper.c, 144, UUID seen: 0059FFFF00000000CE7FB60146F2E749
<t: 386084>, provisioner_helper.c, 144, UUID seen: 0059ABCDEFABCDEFACCDEFABCDEFABCD
<t: 386087>, provisioner_helper.c, 95, UUID filter matched
<t: 387841>, provisioner_helper.c, 259, Provisioning link established
<t: 401168>, provisioner_helper.c, 254, Static authentication data provided
<t: 413691>, provisioner_helper.c, 192, Provisioning completed received
<t: 413694>, provisioner_helper.c, 197, Adding device address, and device keys
<t: 413699>, provisioner_helper.c, 214, Addr: 0x0100 addr_handle: 0 netkey_handle: 0 devkey_handle: 2
<t: 417161>, provisioner_helper.c, 155, Local provisioning link closed: prov_state: 2 remaining retries: 2
<t: 417166>, main.c, 282, Provisioning successful
<t: 417168>, provisioner_helper.c, 181, Provisioning complete. Node addr: 0x0100 elements: 5
<t: 417172>, node_setup.c, 672, Configuring Node: 0x0100
<t: 417175>, node_setup.c, 586, Config client setup: devkey_handle:2 addr_handle:0
<t: 417179>, node_setup.c, 361, Getting composition data
<t: 417219>, main.c, 117, Flash write complete
<t: 471127>, main.c, 332, Config client event
<t: 471129>, node_setup.c, 371, Adding appkey
<t: 473607>, main.c, 332, Config client event
<t: 473610>, node_setup.c, 272, opcode status field: 0
<t: 473612>, node_setup.c, 382, App key bind: Health server
<t: 474448>, main.c, 332, Config client event
<t: 474450>, node_setup.c, 272, opcode status field: 0
<t: 474453>, node_setup.c, 450, Setting publication address for the health server to 0x0001
<t: 478446>, main.c, 332, Config client event
<t: 478448>, node_setup.c, 272, opcode status field: 0
<t: 478450>, node_setup.c, 416, App key bind: Simple On/Off client on element 0x0101
<t: 479997>, main.c, 332, Config client event
<t: 479999>, node_setup.c, 272, opcode status field: 0
<t: 480002>, node_setup.c, 416, App key bind: Simple On/Off client on element 0x0102
<t: 480815>, main.c, 332, Config client event
<t: 480817>, node_setup.c, 272, opcode status field: 0
<t: 480820>, node_setup.c, 416, App key bind: Simple On/Off client on element 0x0103
<t: 481552>, main.c, 332, Config client event
<t: 481555>, node_setup.c, 272, opcode status field: 0
<t: 481557>, node_setup.c, 416, App key bind: Simple On/Off client on element 0x0104
<t: 482212>, main.c, 332, Config client event
<t: 482214>, node_setup.c, 272, opcode status field: 0
<t: 482217>, node_setup.c, 301, Set: on/off client: 0x0101 pub addr: 0x0105
<t: 485838>, main.c, 332, Config client event
<t: 485840>, node_setup.c, 272, opcode status field: 0
<t: 485843>, node_setup.c, 301, Set: on/off client: 0x0102 pub addr: 0x0106
<t: 489960>, main.c, 332, Config client event
<t: 489962>, node_setup.c, 272, opcode status field: 0
<t: 489964>, node_setup.c, 301, Set: on/off client: 0x0103 pub addr: 0xC003
<t: 494260>, main.c, 332, Config client event
<t: 494262>, node_setup.c, 272, opcode status field: 0
<t: 494265>, node_setup.c, 301, Set: on/off client: 0x0104 pub addr: 0xC002
<t: 498356>, main.c, 332, Config client event
<t: 498359>, node_setup.c, 272, opcode status field: 0
<t: 498361>, main.c, 248, Configuration of device 0 successful
<t: 498364>, main.c, 267, All servers provisioned
<t: 550848>, main.c, 117, Flash write complete
<t: 803876>, main.c, 311, Node 0x0100 alive with 0 active fault(s), RSSI: -30
<t: 1131562>, main.c, 311, Node 0x0100 alive with 0 active fault(s), RSSI: -29
<t: 1459591>, main.c, 311, Node 0x0100 alive with 0 active fault(s), RSSI: -30

2) Also regularly falls stack. We have to burn " s140_nrf52_6.0.0_softdevice.hex".
Most often, the stack falls for the client. For what reason?

Parents
  • Hi,

    1) Have you, as in the other question that you refer to, set SERVER_NODE_COUNT to 1?

    If you have then yes, it looks like there might be an issue where the provisioner will not provision and configure the server. In that case, can you try increasing the SERVER_NODE_COUNT to 2?

    2) What do you mean? That the SoftDevice is removed/damaged/overwritten or similar? If this happens, can you do a flash dump of the affected board and attach it here for me to have a look at it? You can make a flash dump using the command

    nrfjprog --readcode flashdump.hex

    which will store the flash contents in a hex file named flashdump.hex.

    Regards,
    Terje

  • 1) Great, it's working! Thanks..

    2) Now the power to switch on for provisioner. And I am watching the error:

    <t: 0>, main.c, 550, ----- BLE Mesh Light Switch Provisioner Demo -----
    <t: 0>, mesh_softdevice_init.c, 112, Initializing SoftDevice...
    <t: 0>, mesh_softdevice_init.c, 77, Enabling BLE...
    <t: 2>, mesh_softdevice_init.c, 88, Ram base: 0x200032C8
    <t: 566>, main.c, 488, Initializing and adding models
    <t: 571>, app_error_weak.c, 95, Mesh assert at 0x0003189A (:0)

    there is "flashdump.hex"

    yadi.sk/.../sLgLPv7q3Vwv9G

  • Hi,

    I could not get the hex file download to work, can you attach the file here instead? (You should be able to upload files through the "Insert" -> "Insert image/video/file" menu choice in the editor.)

    You could do a debug session, with a breakpoint in app_error_fault_handler() in app_error_weak.c, which should leave you with a full stack trace. You should then be able to figure out what call failed and with what error message.

    Regards,
    Terje

Reply
  • Hi,

    I could not get the hex file download to work, can you attach the file here instead? (You should be able to upload files through the "Insert" -> "Insert image/video/file" menu choice in the editor.)

    You could do a debug session, with a breakpoint in app_error_fault_handler() in app_error_weak.c, which should leave you with a full stack trace. You should then be able to figure out what call failed and with what error message.

    Regards,
    Terje

Children
No Data
Related