How to stop nus advertising in Matter

Hi Team,

I have added the NUS function in the Matter project. After the commissioning broadcast is turned off, NUS broadcast will automatically start. I want to manually start and stop NUS broadcast. How should I handle this, ncs v3.0.0.
Best regards,
Danny
  • Hi Danny, 

    As I understand it, the way that NUS advertising is configured to start/stop is to assign callbacks in the init function for the NUS Service. More specifically, on line 61 and line 69 of v3.0.0/samples/matter/common/src/bt_nus/bt_nus_service.cpp. 

    If you end up editing that file, please make sure that you keep the original functionality so that there are no conflicts with other samples using the file. 

    How the implementation for the manual starting and stopping of advertising is done is up to you, but it looks like that file is a feasable starting point. 

    Best regards,

    Maria 

Related