Public Mode + OPCODE_TO_FLIC_FORCE_BT_DISCONNECT_IND not stop advertise after disconnection

  • Hi,
    I'm Sandro and I'm new to this forum.

    I have this issue:

    • Flic2 after factory reset -> OK

    • Pressing down on the Flic and holding it for at least 1.5 seconds (red led) -> OK

    • Flic2 advertise service -> OK

    • Connect to Flic2 -> OK

    • Send FORCE_BT_DISCONNECT_IND packet with restart_adv = 0 -> OK

    • Flic2 disconnect immediattly-> OK

    • Flic2 stop advertise -> KO

    So after disconnection, the Flic2 restart advertise although restart_adv = 0

    Thanks for the support of anyone.


  • @Emil OK, thanks for the responses. See you!

  • FlicTeam

    Right... In that case I don't think there is anything you can do since that is how we designed the pairing flow.

  • @Emil Sorry, I know how to detect the ADDRESS in the laboratory, but when the Flic is used by the user, my scanning device doesn't know the ADDRESS off all possible advertising devices, I need a service ID to filter the devices around.

  • FlicTeam

    @sandro-salari You can use any general purpose Bluetooth Low Energy scanner or any of our sdks to get the bluetooth device address of nearby devices. (except on iOS where this information is not exposed)

  • @Emil You are right but I don't know the ADDRESS of the button. I don't need security, I need only to discover the Flic in proximity, connect and read Its information (MAC address), then disconnect.

    Whit this data I can identify the Flic and my use case ends.

  • FlicTeam

    @sandro-salari Not sure exactly why you don't want to pair, since using Flic without pairing will mean no security. In any case, if you already know the Bluetooth device address of the button, you can still connect to the Flic in private mode, even though the advertisement is empty. This would have the benefit that the user would not have to hold down the button for a few seconds.

  • @Emil I don't want to pair. I need only detect when the button is pressed without pairing and the only possibility is to use public mode service advertise to do it since no service advertises happens in private mode and I can't detect if the device is Flic or another one before connecting.

  • FlicTeam

    @sandro-salari What exactly are you trying to do? Why do you want to force disconnect? Doesn't the normal pairing flow work for your use case?

    Once the button is paired, the button will not be in public mode during normal user interaction. Then it will not start re-advertising if you disconnect it.

  • Hi @Emil ,
    thanks, it's just as I thought, but this condition is not explicated in the documentation, so I asked ...

    I try this procedure because 30 seconds of advertising after the connection is too high for my application, I need a max of 5 seconds of total advertising, or better I need no advertising at all after disconnection.

    Can you give me some tips to get this result (if possible to get it)?



  • This post is deleted!

  • FlicTeam

    Hi. Once the Flic 2 is set to public mode, it will stay in public mode for 30 seconds. When it disconnects before this timer expires, it will always restart advertising, regardless of the flag in the "force disconnect" packet. That flag thus only has effect in private mode, since then by default the Flic 2 will not start advertising again after a graceful disconnect.

Log in to reply