4 Replies Latest reply on Mar 11, 2015 6:59 PM by @hippiehacker

    Capturing and sending bluetooth HID profile events (at the same time)

    @hippiehacker

      TLDR; I can currently use the edison as a bluetooth keyboard to my phone and computer.

      I'm trying to connect off the shelf bluetooth keyboards directly to the edison, using it as a Man-in-the-Middle bluetooth proxy.

       

      root@edison_coil:~# grep /bluetoothd /lib/systemd/system/bluetooth.service

      ExecStart=/usr/lib/bluez5/bluetooth/bluetoothd --noplugin=input

       

      # when disabling bluetoothd input plugin, I can pair my edison to a computer or phone as a keyboard using

      either https://github.com/lvht/btk/commits/master or https://github.com/lkundrak/btkbdd

       

      If left in that mode, I can't seem to pair bluetooth keyboards TO the edison....

       

      Using the bluetoothd input plugin (as shipped in lastrelease) I can pair a couple keyboards to an edison, but I can't read events).

       

      root@edison_coil:~# grep /bluetoothd /lib/systemd/system/bluetooth.service

      ExecStart=/usr/lib/bluez5/bluetooth/bluetoothd

       

      root@edison_coil:~/edisoncoil# bluetoothctl

      [NEW] Controller 98:4F:EE:02:DF:BA edison_coil [default]

      [NEW] Device 20:73:AB:59:EA:12 Bluetooth keyboard

      [NEW] Device 00:26:08:C5:03:A3 Peaberry

      [NEW] Device F4:5F:69:00:17:D2 AUVIO1500476

      [NEW] Device 98:FE:94:48:E8:E3 mba

      [NEW] Device 20:73:AB:10:6A:09 Bluetooth Keyboard

      [CHG] Device 20:73:AB:59:EA:12 Connected: yes

      [CHG] Device 20:73:AB:10:6A:09 Connected: yes

       

      [bluetooth]# info 20:73:AB:59:EA:12

      Device 20:73:AB:59:EA:12

        Name: Bluetooth keyboard

        Alias: Bluetooth keyboard

        Class: 0x000540

        Icon: input-keyboard

        Paired: yes

        Trusted: yes

        Blocked: no

        Connected: yes

        LegacyPairing: no

        UUID: Service Discovery Serve.. (00001000-0000-1000-8000-00805f9b34fb)

        UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)

        UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)

        Modalias: bluetooth:v05ACp022Cd011B

       

      [bluetooth]# info 20:73:AB:10:6A:09

      Device 20:73:AB:10:6A:09

        Name: Bluetooth Keyboard

        Alias: Bluetooth Keyboard

        Class: 0x000540

        Icon: input-keyboard

        Paired: yes

        Trusted: yes

        Blocked: no

        Connected: yes

        LegacyPairing: no

        UUID: Service Discovery Serve.. (00001000-0000-1000-8000-00805f9b34fb)

        UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)

        UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)

        Modalias: bluetooth:v04E8p7021d011B

       

       

       

      Any thoughts on how to read those events from the keyboards or how to do both at the same time?