Skip to content

flicd hanging after pairing attempt. #117

Description

@yetzt

I have original Flic buttons (from 2016, not version two), they work fine with the Flic app on MacOS.

I am running the x86_64 version of flicd using an rtl8761b based USB bluetooth adapter. I'm starting flicd flicd -f flicd.sqlite -s 0.0.0.0. I connect with the node client. The button is found, but after attempted pairing, i receive a timeout.

> node newscanwizard.js
Welcome to the add new button wizard. Press and hold down your Flic button to add it.
Your button is private. Hold down for 7 seconds to make it public.
Found public button 80:e4:da:71:33:63 (F018cTNj). Now connecting...
Completed with result: WizardFailedTimeout

On subsequent tries no button is found until i restart flicd.

According to btmon, there apears to be some sort of endless loop until flicd is stopped.

[...]
> HCI Event: LE Meta Event (0x3e) plen 43                 #152 [hci0] 13.885227
      LE Advertising Report (0x02)
        Num reports: 1
        Event type: Connectable undirected - ADV_IND (0x00)
        Address type: Public (0x00)
        Address: 80:E4:DA:71:33:63 (OUI 80-E4-DA)
        Data length: 31
        Flags: 0x06
          LE General Discoverable Mode
          BR/EDR Not Supported
        128-bit Service UUIDs (complete): 1 entry
          Vendor specific (f02adfc0-26e7-11e4-9edc-0002a5d5c51b)
        Name (complete): f018cTNj
        RSSI: -79 dBm (0xb1)
> HCI Event: LE Meta Event (0x3e) plen 43                 #153 [hci0] 13.932553
      LE Advertising Report (0x02)
        Num reports: 1
        Event type: Connectable undirected - ADV_IND (0x00)
        Address type: Public (0x00)
        Address: 80:E4:DA:71:33:63 (OUI 80-E4-DA)
        Data length: 31
        Flags: 0x06
          LE General Discoverable Mode
          BR/EDR Not Supported
        128-bit Service UUIDs (complete): 1 entry
          Vendor specific (f02adfc0-26e7-11e4-9edc-0002a5d5c51b)
        Name (complete): f018cTNj
        RSSI: -83 dBm (0xad)
> HCI Event: LE Meta Event (0x3e) plen 40                 #154 [hci0] 13.991403
      LE Advertising Report (0x02)
        Num reports: 1
        Event type: Connectable undirected - ADV_IND (0x00)
        Address type: Public (0x00)
        Address: D4:AD:FC:BB:38:F9 (OUI D4-AD-FC)
        Data length: 28
        Name (complete): GBK_H6125_38F9
        Company: not assigned (34818)
          Data: ec000a0101
        Flags: 0x05
          LE Limited Discoverable Mode
          BR/EDR Not Supported
        RSSI: -69 dBm (0xbb)
> HCI Event: LE Meta Event (0x3e) plen 43                 #155 [hci0] 14.122604
      LE Advertising Report (0x02)
        Num reports: 1
        Event type: Connectable undirected - ADV_IND (0x00)
        Address type: Public (0x00)
        Address: 80:E4:DA:71:33:63 (OUI 80-E4-DA)
        Data length: 31
        Flags: 0x06
          LE General Discoverable Mode
          BR/EDR Not Supported
        128-bit Service UUIDs (complete): 1 entry
          Vendor specific (f02adfc0-26e7-11e4-9edc-0002a5d5c51b)
        Name (complete): F018cTNj
        RSSI: -77 dBm (0xb3)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2    #156 [hci0] 14.128023
        Scanning: Disabled (0x00)
        Filter duplicates: Disabled (0x00)
> HCI Event: Command Complete (0x0e) plen 4               #157 [hci0] 14.131068
      LE Set Scan Enable (0x08|0x000c) ncmd 2
        Status: Success (0x00)
< HCI Command: LE Add Device To W.. (0x08|0x0011) plen 7  #158 [hci0] 14.131229
        Address type: Public (0x00)
        Address: 80:E4:DA:71:33:63 (OUI 80-E4-DA)
> HCI Event: Command Complete (0x0e) plen 4               #159 [hci0] 14.134188
      LE Add Device To White List (0x08|0x0011) ncmd 2
        Status: Success (0x00)
< HCI Command: LE Create Connect.. (0x08|0x000d) plen 25  #160 [hci0] 14.134331
        Scan interval: 60.000 msec (0x0060)
        Scan window: 30.000 msec (0x0030)
        Filter policy: White list is used (0x01)
        Peer address type: Public (0x00)
        Peer address: 00:00:00:00:00:00 (OUI 00-00-00)
        Own address type: Public (0x00)
        Min connection interval: 20.00 msec (0x0010)
        Max connection interval: 25.00 msec (0x0014)
        Connection latency: 0 (0x0000)
        Supervision timeout: 200 msec (0x0014)
        Min connection length: 0.000 msec (0x0000)
        Max connection length: 0.000 msec (0x0000)
> HCI Event: Command Status (0x0f) plen 4                 #161 [hci0] 14.138329
      LE Create Connection (0x08|0x000d) ncmd 2
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 31                 #162 [hci0] 14.289313
      LE Enhanced Connection Complete (0x0a)
        Status: Success (0x00)
        Handle: 16
        Role: Master (0x00)
        Peer address type: Public (0x00)
        Peer address: 80:E4:DA:71:33:63 (OUI 80-E4-DA)
        Local resolvable private address: 00:00:00:00:00:00 (Non-Resolvable)
        Peer resolvable private address: 00:00:00:00:00:00 (Non-Resolvable)
        Connection interval: 22.50 msec (0x0012)
        Connection latency: 0 (0x0000)
        Supervision timeout: 200 msec (0x0014)
        Master clock accuracy: 0x00
< HCI Command: LE Create Connecti.. (0x08|0x000e) plen 0  #163 [hci0] 44.138827
> HCI Event: Disconnect Complete (0x05) plen 4            #164 [hci0] 44.240127
        Status: Success (0x00)
        Handle: 16
        Reason: Connection Timeout (0x08)
> HCI Event: Command Complete (0x0e) plen 4               #165 [hci0] 44.245202
      LE Create Connection Cancel (0x08|0x000e) ncmd 2
        Status: Command Disallowed (0x0c)
< HCI Command: LE Create Connecti.. (0x08|0x000e) plen 0  #166 [hci0] 44.245418
> HCI Event: Command Complete (0x0e) plen 4               #167 [hci0] 44.248357
      LE Create Connection Cancel (0x08|0x000e) ncmd 2
        Status: Command Disallowed (0x0c)
< HCI Command: LE Create Connecti.. (0x08|0x000e) plen 0  #168 [hci0] 44.248488
> HCI Event: Command Complete (0x0e) plen 4               #169 [hci0] 44.251496
      LE Create Connection Cancel (0x08|0x000e) ncmd 2
        Status: Command Disallowed (0x0c)
< HCI Command: LE Create Connecti.. (0x08|0x000e) plen 0  #170 [hci0] 44.251610
> HCI Event: Command Complete (0x0e) plen 4               #171 [hci0] 44.254721
      LE Create Connection Cancel (0x08|0x000e) ncmd 2
        Status: Command Disallowed (0x0c)
< HCI Command: LE Create Connecti.. (0x08|0x000e) plen 0  #172 [hci0] 44.254869
> HCI Event: Command Complete (0x0e) plen 4               #173 [hci0] 44.257992
      LE Create Connection Cancel (0x08|0x000e) ncmd 2
        Status: Command Disallowed (0x0c)
< HCI Command: LE Create Connecti.. (0x08|0x000e) plen 0  #174 [hci0] 44.258140
> HCI Event: Command Complete (0x0e) plen 4               #175 [hci0] 44.261061
      LE Create Connection Cancel (0x08|0x000e) ncmd 2
        Status: Command Disallowed (0x0c)
< HCI Command: LE Create Connecti.. (0x08|0x000e) plen 0  #176 [hci0] 44.261167
> HCI Event: Command Complete (0x0e) plen 4               #177 [hci0] 44.264238
      LE Create Connection Cancel (0x08|0x000e) ncmd 2
        Status: Command Disallowed (0x0c)
< HCI Command: LE Create Connecti.. (0x08|0x000e) plen 0  #178 [hci0] 44.264378
> HCI Event: Command Complete (0x0e) plen 4               #179 [hci0] 44.267434
      LE Create Connection Cancel (0x08|0x000e) ncmd 2
        Status: Command Disallowed (0x0c)
< HCI Command: LE Create Connecti.. (0x08|0x000e) plen 0  #180 [hci0] 44.267551
> HCI Event: Command Complete (0x0e) plen 4               #181 [hci0] 44.270606
      LE Create Connection Cancel (0x08|0x000e) ncmd 2
        Status: Command Disallowed (0x0c)
< HCI Command: LE Create Connecti.. (0x08|0x000e) plen 0  #182 [hci0] 44.270721
> HCI Event: Command Complete (0x0e) plen 4               #183 [hci0] 44.273785
      LE Create Connection Cancel (0x08|0x000e) ncmd 2
        Status: Command Disallowed (0x0c)
< HCI Command: LE Create Connecti.. (0x08|0x000e) plen 0  #184 [hci0] 44.273900
[...]
< HCI Command: LE Create Connecti.. (0x08|0x000e) plen 0  #548 [hci0] 44.841832
> HCI Event: Command Complete (0x0e) plen 4               #549 [hci0] 44.844832
      LE Create Connection Cancel (0x08|0x000e) ncmd 2
        Status: Command Disallowed (0x0c)
< HCI Command: Reset (0x03|0x0003) plen 0                 #550 [hci0] 44.844891
> HCI Event: Command Complete (0x0e) plen 4               #551 [hci0] 44.856154
      Reset (0x03|0x0003) ncmd 3
        Status: Success (0x00)
@ USER Close: flicd                                   {0x0002} [hci0] 44.856316
= Close Index: 8A:88:4B:C0:DA:D5                               [hci0] 44.856327

I've attached the btmon log in text and btsnoop format:

btmonlog.txt
btmonlog.btsnoop

I hope this issue can be resolved.

I have to express my frustration that the flicd server component is proprietary closed source and offers no way to debug anything. This is stark contrast of the "hackable" advertisement that lead me to buy this product back in 2015. I have waited almost a decade now to use these buttons for anything but making fart noises.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions