NRF node (sensor server) loses provisioning automatically

I'm using NCS V2.2.0 with the UBLOX module (nrf52832). I changed the example of the sensor server. UBLOX module's power turns off, then turns back on extetrnally(through a separate IC) for my application. The module was automatically unprovisioned after five hours of flawless operation.

I am not able to debug why this is happening, and am not sure how to prevent it.

Can someone help me figure out the problem or even bypass it?

Let me know if you need anything else.

Thanks

Parents
  • Hello,

    For how long does the separate IC turn your device off? And how often?

    When the device is unprovisioned, does the log from the nRF say anything when the application starts up again?

    Best regards,

    Edvin

  • Hey Edvin, Sorry for late reply

    The IC is supposed to turn the device on after every 30 secs. The power is cut off when BLE mesh model is done publishing data(using a GPIO to indicate that publishing is done).  The device got unprovisioned after a few hours(about 5 hours).

    The device was in the cycle of publishing and sleeping of 30 seconds for around 5 hours.

    Unfortunately, i am unable to get logs from device, as when we power the module from debugger, the power doesn't get cut off. The power cuts off only when module is powered through a battery. And that's why is it becoming difficult to debug this problem. Can you recommend me a way to get logs from the module?

  • That looks more correct. It looks like you still have an offset. 

    For current measurement purposes, try to disable the UART (typically used for logging). Add CONFIG_SERIAL=n in your prj.conf.

    This is what I see with a 50ms advertising interval:

    Best regards,

    Edvin

  • Hey Edvin,

    I am facing an issue in combining the advertiser and observer sample. I am able to advertise from one node and receive on other node.

    But when i add the observer to advertiser, the program stops working(I have added debug statements, these statements are not getting printed.....hence i think the program stops working until i press reset).

    After publishing, I start the observer( bt_le_scan_start()) and then i stop scanning(bt_le_scan_stop()) after few mili-seconds. Then the device goes into the normal sleep mode. When the device wakes up and starts this loop again, the program stops working(after publishing, while re-starting scanner)

    I am not sure what the issue is, as i am not getting any error message from scan start or stop.

    Do let me know if you need anything else.

    Thanks in advance

    Sincerely

    Aditya Nerpagar

  • AdityaN said:
    Then the device goes into the normal sleep mode.

    What sleep mode is this? What API do you use?

    Do you see any logging? Try printing the return value of bt_le_scan_start() regardless of it's value.

    Also, do you advertise? What does that return?

    BR,

    Edvin

  • What sleep mode is this? What API do you use?

    I am using 

    pm_device_action_run(cons, PM_DEVICE_ACTION_SUSPEND);
     to put device in suspended mode.

    bt_le_scan_start() returns a 0 first time and the device doesn't print anything second time. Advertising is successful because it returns a 0.

    printing and Logging stops when i call bt_le_start_scan() function second time.

  • Have you tried setting a breakpoint inside bt_le_start_scan(), to see where it hangs?

    Is there some way for me to reproduce what you are seeing?

    Best regards,

    Edvin

Reply Children
No Data
Related