Have an idea on how to make Flic better? Or do you want us to build some new, clever integration?

Show off by posting your idea below, and vote for the ones already here. The more votes, the greater chance of us developing it!


My feedback

  1. 112 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    8 comments  ·  Flic Ideas  ·  Flag idea as inappropriate…  ·  Admin →
    An error occurred while saving the comment
    Anonymous commented  · 

    I did some tests and it is possible to detect flic button presses in a very "hackish" way:

    Use the "hcitool" command included in the Bluez library (I am using bluez-5.11 on Debian):

    [your bluez directory]/tools/hcitool lescan

    This will start listening for Bluetooth LE devices (until you press Ctrl+C). The instant you press your Flic you should see it pop up in this list. The output should look something like this:

    LE Scan ...
    11:22:33:44:55:66 (unknown)
    11:22:33:44:55:66 (unknown)
    80:E4:DA:xx:xx:xx F014xXxX <-- This is a Flic!
    80:E4:DA:xx:xx:xx (unknown)

    So it should be trivial to call that command inside a python script (using a shell pipe) and wait for the MAC to pop up and react!
    That's it: A proof-of-concept Flic for Linux detector that should be able to run on a Raspberry Pi.

    Now, it would be really great if the Flic team would publish details on how to detect the kind of button press (single-press, double-press, long-press, ...)

    So far I have tried accessing the BLE characteristics of the Flic (you have like 1-2 seconds to issue commands until the Flic connection is lost). So far I have found following characteristics using gatttool:

    gatttool -b 80:E4:xx:xx:xx:xx -I

    [80:E4:xx:xx:xx:xx][LE]> connect
    Attempting to connect to 80:E4:xx:xx:xx:xx
    Connection successful

    [80:E4:xx:xx:xx:xx][LE]> primary
    attr handle: 0x0001, end grp handle: 0x0009 uuid: 00001800-0000-1000-8000-00805f9b34fb
    attr handle: 0x000c, end grp handle: 0x000f uuid: 00001801-0000-1000-8000-00805f9b34fb
    attr handle: 0x0010, end grp handle: 0x0016 uuid: f02adfc0-26e7-11e4-9edc-0002a5d5c51b

    [80:E4:xx:xx:xx:xx][LE]> characteristics
    handle: 0x0002, char properties: 0x02, char value handle: 0x0003, uuid: 00002a00-0000-1000-8000-00805f9b34fb
    handle: 0x0004, char properties: 0x02, char value handle: 0x0005, uuid: 00002a01-0000-1000-8000-00805f9b34fb
    handle: 0x0006, char properties: 0x0a, char value handle: 0x0007, uuid: 00002a02-0000-1000-8000-00805f9b34fb
    handle: 0x0008, char properties: 0x02, char value handle: 0x0009, uuid: 00002a04-0000-1000-8000-00805f9b34fb
    handle: 0x000d, char properties: 0x22, char value handle: 0x000e, uuid: 00002a05-0000-1000-8000-00805f9b34fb
    handle: 0x0011, char properties: 0x1e, char value handle: 0x0012, uuid: cc7efce0-26e8-11e4-8fd2-0002a5d5c51b
    handle: 0x0014, char properties: 0x12, char value handle: 0x0015, uuid: 06053ec0-26e9-11e4-adc2-0002a5d5c51b

    [80:E4:xx:xx:xx:xx][LE]> char-desc
    handle: 0x0001, uuid: 2800
    handle: 0x0002, uuid: 2803
    handle: 0x0003, uuid: 2a00
    handle: 0x0004, uuid: 2803
    handle: 0x0005, uuid: 2a01
    handle: 0x0006, uuid: 2803
    handle: 0x0007, uuid: 2a02
    handle: 0x0008, uuid: 2803
    handle: 0x0009, uuid: 2a04
    handle: 0x000c, uuid: 2800
    handle: 0x000d, uuid: 2803
    handle: 0x000e, uuid: 2a05
    handle: 0x000f, uuid: 2902
    handle: 0x0010, uuid: 2800
    handle: 0x0011, uuid: 2803
    handle: 0x0012, uuid: cc7efce0-26e8-11e4-8fd2-0002a5d5c51b
    handle: 0x0013, uuid: 2902
    handle: 0x0014, uuid: 2803
    handle: 0x0015, uuid: 06053ec0-26e9-11e4-adc2-0002a5d5c51b
    handle: 0x0016, uuid: 2902
    Discover descriptors finished: No attribute found within the given range

    Now you can access the data of each characteristics. e.g. to read characteristic with handle 0x0010 just enter:
    [80:E4:xx:xx:xx:xx][LE]> char-read-hnd 0x0010

    So far I have not found any data that changes according to the type of button press. MAybe you have more luck!

    Greetings from Munich,

Feedback and Knowledge Base