Flic Home

    Community

    • Login
    • Search
    • Popular
    • Users

    Public Mode + OPCODE_TO_FLIC_FORCE_BT_DISCONNECT_IND not stop advertise after disconnection

    Developers
    2
    12
    1382
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Emil
      Emil FlicTeam last edited by

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

      sandro.salari 1 Reply Last reply Reply Quote 0
      • sandro.salari
        sandro.salari @Emil last edited by

        @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.

        1 Reply Last reply Reply Quote 0
        • Emil
          Emil FlicTeam @sandro.salari last edited by

          @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)

          sandro.salari 1 Reply Last reply Reply Quote 0
          • sandro.salari
            sandro.salari @Emil last edited by

            @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.

            Emil 1 Reply Last reply Reply Quote 0
            • Emil
              Emil FlicTeam @sandro.salari last edited by

              @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.

              sandro.salari 1 Reply Last reply Reply Quote 0
              • sandro.salari
                sandro.salari @Emil last edited by

                @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.

                Emil 1 Reply Last reply Reply Quote 0
                • Emil
                  Emil FlicTeam @sandro.salari last edited by

                  @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.

                  sandro.salari 1 Reply Last reply Reply Quote 0
                  • sandro.salari
                    sandro.salari @Emil last edited by

                    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)?

                    Thanks.

                    Best
                    Sandro.

                    Emil 1 Reply Last reply Reply Quote 0
                    • sandro.salari
                      sandro.salari last edited by sandro.salari

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • Emil
                        Emil FlicTeam last edited by

                        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.

                        sandro.salari 1 Reply Last reply Reply Quote 0
                        • First post
                          Last post