1 2 Previous Next 21 Replies Latest reply on Aug 22, 2016 11:24 PM by fatalfeel

    Implementing a Bluetooth HID Profile on the Edison

    @hippiehacker

      Anyone successfully made Edison export a bluetooth hid profile?

       

      I'm looking to use the D-LInk DBT-120 as a HID Proxy (bluetooth to usb HID)

       

      Flashing the D-Link DBT-120 to become a HID proxy-capable USB bluetooth adapter | 0xf8.org 

       

      This would allow the Edison to show up as a USB Hid wirelessly via bluetooth. (similar to how Apple allows wireless keyboards to interact with the uEFI bios before boot)

       

      https://wiki.tizen.org/wiki/Bluetooth#HID

      and

      Enabling Bluetooth and Pairing to Device

       

      show connecting pairing with an external bluetooth keyboard... but what I'd like to do is become a keyboard.

       

      The crux of finding a HID proxy-capable USB bluetooth adapter | 0xf8.org

      I found one on ebay for about $12 including shipping.

        • 1. Re: Implementing a Bluetooth HID Profile on the Edison
          Intel_Alvarado

          Hi @hippiehacker,

           

          I haven’t tried to use the Edison using a Bluetooth HID profile. Can you explain in more detail you do you plan to use it?

          There are a couple of links that you might find helpful, take a look at https://communities.intel.com/docs/DOC-23618 and https://software.intel.com/en-us/blogs/2014/05/30/bluetooth-on-intel-galileo-example-nap-internet-access . This last one is for Galileo but should work on the Edison as well.

           

          Regards

          Sergio

          • 2. Re: Implementing a Bluetooth HID Profile on the Edison
            @hippiehacker

            Basically connect a usb keyboard directly to the edison and export it as bluetooth HID profile for pairing to a computer (or phone) as a keyboard.


            Eventually I'd like to have a hid daemon that we can mux various HID inputs into the standard bluetooth hid and usb hid connections.

             

            inputs:

            physical usb keyboard attached to the edison in usb HOST mode

            physical bluetooth keyboard pair with the edison

            logical api or file description to write keystrokes to (for use with web and phone apps)

             

            outputs:

            edison OTG/gadget hid connected to any usb HOST showing up as a usb keyboard

            edison bluetooth hid Profile paired with any phone, computer showing up as a bluetooth keyboard

             

            Some code samples I found:

            http://v3.sk/~lkundrak/btkbdd/ / https://github.com/lkundrak/btkbddhttp://v3.sk/~lkundrak/btkbdd/

            and

            https://github.com/lvht/btk (in Chinese, use google/bablefish to translate if needed)

            • 3. Re: Implementing a Bluetooth HID Profile on the Edison
              @hippiehacker

              Currently when paining (and running either btkbdd or btk from above) the paired edisons only show PnP, Generic, and A/V profiles.

              I'm trying to get 'iikk' (the edison connected to a usb keyboard), to show up to the second iiedison with a HID / keyboard profile.

              The attached connect.log is from btmon during a connect from iiedison.

               

              From iiedison:

               

              [bluetooth]# list

              Controller 98:4F:EE:02:E1:00 'iiedison' [default]

              [bluetooth]# show

              Controller 98:4F:EE:02:E1:00

                      Name: 'iiedison'

                      Alias: 'iiedison'

                      Class: 0x000110

                      Powered: yes

                      Discoverable: no

                      Pairable: yes

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

                      UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)

                      UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)

                      UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)

                      UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)

                      Modalias: bluetooth:vBABEpFACEd1235

                      Discovering: no

              [bluetooth]# paired-devices

              Device 98:4F:EE:02:DF:BA iikk

              [bluetooth]# info 98:4F:EE:02:DF:BA

              Device 98:4F:EE:02:DF:BA

                      Name: iikk

                      Alias: iikk

                      Class: 0x000110

                      Icon: computer

                      Paired: yes

                      Trusted: no

                      Blocked: no

                      Connected: no

                      LegacyPairing: no

                      UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)

                      UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)

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

                      UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)

                      UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)

                      Modalias: usb:v1D6Bp0246d0512

              [bluetooth]# connect 98:4F:EE:02:DF:BA

              Attempting to connect to 98:4F:EE:02:DF:BA

              [CHG] Device 98:4F:EE:02:DF:BA Connected: yes

              [CHG] Device 98:4F:EE:02:DF:BA Modalias: bluetooth:vBABEpFACEd1234

              Failed to connect: org.bluez.Error.NotAvailable

              [CHG] Device 98:4F:EE:02:DF:BA Connected: no

              [bluetooth]# connect 98:4F:EE:02:DF:BA

              Attempting to connect to 98:4F:EE:02:DF:BA

              [CHG] Device 98:4F:EE:02:DF:BA Connected: yes

              Failed to connect: org.bluez.Error.NotAvailable

              [CHG] Device 98:4F:EE:02:DF:BA Connected: no

              [CHG] Device 98:4F:EE:02:DF:BA Connected: yes

              [CHG] Device 98:4F:EE:02:DF:BA Connected: no

               

              From iikeyboard (another edison with a usb keyboard attached):

              root@iikeyboard:~# lsusb -t

              /:  Bus 02.Port 1: Dev 1, class="root_hub", Driver=dwc3-host/1p, 5000M

              /:  Bus 01.Port 1: Dev 1, class="root_hub", Driver=dwc3-host/1p, 480M

                  |__ Port 1: Dev 2, If 0, class="Hub", Driver=hub/4p, 12M

                      |__ Port 2: Dev 3, If 0, class="Human" Interface Device, Driver=usbhid, 12M

                      |__ Port 2: Dev 3, If 1, class="Human" Interface Device, Driver=usbhid, 12M

              root@iikeyboard:~# bluetoothctl show

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

              [NEW] Device 98:4F:EE:02:E1:00 'iiedison'

              [bluetooth]# show

              Controller 98:4F:EE:02:DF:BA

                      Name: iikk

                      Alias: iikk

                      Class: 0x000110

                      Powered: yes

                      Discoverable: no

                      Pairable: yes

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

                      UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)

                      UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)

                      UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)

                      UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)

                      Modalias: bluetooth:vBABEpFACEd1234

                      Discovering: no

              [bluetooth]# info 98:4F:EE:02:E1:00

              Device 98:4F:EE:02:E1:00

                      Name: 'iiedison'

                      Alias: 'iiedison'

                      Class: 0x000110

                      Icon: computer

                      Paired: yes

                      Trusted: no

                      Blocked: no

                      Connected: no

                      LegacyPairing: no

                      UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)

                      UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)

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

                      UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)

                      UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)

                      Modalias: usb:v1D6Bp0246d0512

              [CHG] Device 98:4F:EE:02:E1:00 Connected: yes

              [CHG] Device 98:4F:EE:02:E1:00 Connected: no

              [CHG] Device 98:4F:EE:02:E1:00 Connected: yes

              [CHG] Device 98:4F:EE:02:E1:00 Connected: no

              [bluetooth]# connect 98:4F:EE:02:E1:00

              Attempting to connect to 98:4F:EE:02:E1:00

              [CHG] Device 98:4F:EE:02:E1:00 Connected: yes

              [CHG] Device 98:4F:EE:02:E1:00 Modalias: bluetooth:vBABEpFACEd1235

              Failed to connect: org.bluez.Error.NotAvailable

              [CHG] Device 98:4F:EE:02:E1:00 Connected: no

              root@iikeyboard:~# btmon | tee connect.log

              • 4. Re: Implementing a Bluetooth HID Profile on the Edison
                @hippiehacker

                From https://github.com/lkundrak/btkbdd/blob/master/btkbdd.pod#bugs

                 

                Bluez bluetoothd(8) daemon is likely to listen for HID events. For btkbdd to accept connection you need to disable the Bluez input plugin by setting DisablePlugins = input in /etc/bluetooth/main.conf.

                 

                However, that doesn't seem valid in bluez5:

                 

                # systemctl status bluetooth -l

                ● bluetooth.service - Bluetooth service

                   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled)

                   Active: active (running) since Fri 2015-02-06 20:06:49 UTC; 7s ago

                     Docs: man:bluetoothd(8)

                Main PID: 380 (bluetoothd)

                   Status: "Running"

                   CGroup: /system.slice/bluetooth.service

                           └─380 /usr/lib/bluez5/bluetooth/bluetoothd

                 

                 

                Feb 06 20:06:49 iikeyboard bluetoothd[380]: Bluetooth daemon 5.18

                Feb 06 20:06:49 iikeyboard bluetoothd[380]: Unknown key DisablePlugins in main.conf

                Feb 06 20:06:49 iikeyboard systemd[1]: Started Bluetooth service.

                Feb 06 20:06:49 iikeyboard bluetoothd[380]: Starting SDP server

                Feb 06 20:06:49 iikeyboard bluetoothd[380]: Bluetooth management interface 1.3 initialized

                • 5. Re: Implementing a Bluetooth HID Profile on the Edison
                  mhahn

                  maybe try with latest Edison image (beta) just released?

                  • 6. Re: Implementing a Bluetooth HID Profile on the Edison
                    @hippiehacker

                    I imported the latest beta release into git so I could review the changes.

                     

                    https://github.com/instantinfrastructure/edison-src/pull/3


                    https://github.com/instantinfrastructure/linux-yocto-3.10/pull/1

                     

                     

                    I see a few changes with connman and bluetooth, but nothing related to hid.

                    • 7. Re: Implementing a Bluetooth HID Profile on the Edison
                      @hippiehacker

                      One of the main differences re bluetooth is the inclusion of a the Audio Source and Sink bluetooth profiles.

                      Almost there, I need to provide a HID profile.

                       

                      [bluetooth]# info 98:4F:EE:02:E1:00

                      Device 98:4F:EE:02:E1:00

                        Name: iiGadget

                        Alias: iiGadget

                        Class: 0x0c0110

                        Icon: computer

                        Paired: yes

                        Trusted: no

                        Blocked: no

                        Connected: no

                        LegacyPairing: no

                        UUID: Audio Source              (0000110a-0000-1000-8000-00805f9b34fb)

                        UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)

                        UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)

                        UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)

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

                        UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)

                        UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)

                        Modalias: usb:v1D6Bp0246d0518

                      [CHG] Controller 98:FE:94:48:E8:E3 Discoverable: no

                      • 8. Re: Implementing a Bluetooth HID Profile on the Edison
                        @hippiehacker

                        This is new with the beta release.... what's listening on PSM_INTR / 0x13?

                         

                        root@iikeyboard:~/btk# git branch

                        * master

                        root@iikeyboard:~/btk# git remote -v

                        origin  https://github.com/lvht/btk.git (fetch)

                        origin  https://github.com/lvht/btk.git (push)

                        root@iikeyboard:~/btk# python

                        .git/           agent.py        kb.py           keymap.pyc

                        .gitignore      btk.py          kb.pyc          sdp_record.xml

                        README.md       btk.pyc         keymap.py      

                        root@iikeyboard:~/btk# python btk.py

                        Traceback (most recent call last):

                          File "btk.py", line 145, in <module>

                            main()

                          File "btk.py", line 125, in main

                            sock.bind(('', PSM_INTR))

                          File "/usr/lib/python2.7/site-packages/bluetooth/bluez.py", line 172, in bind

                            return self._sock.bind (addrport)

                        _bluetooth.error: (98, 'Address already in use')

                        root@iikeyboard:~/btk# python agent.py

                        start hid

                        Traceback (most recent call last):

                          File "agent.py", line 121, in <module>

                            sock.bind(('', PSM_INTR))

                          File "/usr/lib/python2.7/site-packages/bluetooth/bluez.py", line 172, in bind

                            return self._sock.bind (addrport)

                        _bluetooth.error: (98, 'Address already in use')

                        • 9. Re: Implementing a Bluetooth HID Profile on the Edison
                          @hippiehacker

                          I this the standard ports for HID protocol are 0x11/0x13 for mouse and keyboard... and those are currently bound in the this beta release... any idea what's got a hold of them?

                           

                          There is a pretty good thread regarding HIDclient: Using a Bluez PC (or in our case an Edison) as a virtual Bluetooth keyboard and mouse

                          http://sourceforge.net/p/bluez/mailman/message/14845788/

                           

                          with this posting I publish a software that mimicks a Bluetooth HID

                          (keyboard and mouse combo device) on a Linux PC. Thus you can

                          remote-control other Bluez-equipped PCs, Widcomm-stack equipped windows

                          boxes, and basically any machine that knows how to talk to Bluetooth

                          keyboards in non-boot-protocol mode.

                           

                           

                          Source code is GNU GPLd, and can be found on

                          http://www.hoffmeister-online.de/bluez/hidclient-20060725.tar.bz2

                          • 10. Re: Implementing a Bluetooth HID Profile on the Edison
                            @hippiehacker

                            It's been done before:

                             

                            http://anselm.hoffmeister.be/computer/hidclient/index.html.en

                             

                            And updated in 2012:

                             

                            https://github.com/benizi/hidclient/blob/master/hidclient.c#L24

                             

                            * Updates

                            * 2012-02-10 by Peter G

                            * Updated to work with current distro (Lubuntu 11.10)

                            * EDIT FILE /etc/bluetooth/main.conf

                            * to include:

                            * DisablePlugins = network,input,hal,pnat

                            * AMH: Just disable input might be good enough.

                            * recomended to change:

                            * Class = 0x000540

                            * AMH: This leads to the device being found as "Keyboard".

                            * Some devices might ignore non-0x540 input devices

                            * before starting, also execute the following commands

                            * hciconfig hci0 class 0x000540

                            * # AMH: Should be optional if Class= set (above)

                            * hciconfig hci0 name \'Bluetooth Keyboard\'

                            * # AMH: Optional: Name will be seen by other BTs

                            * hciconfig hci0 sspmode 0

                            * # AMH: Optional: Disables simple pairing mode

                            * sdptool del 0x10000

                            * sdptool del 0x10001

                            * sdptool del 0x10002

                            * sdptool del 0x10003

                            * sdptool del 0x10004

                            * sdptool del 0x10005

                            * sdptool del 0x10006

                            * sdptool del 0x10007

                            * sdptool del 0x10008

                            * # This removes any non-HID SDP entries.

                            * # Might help if other devices only like

                            * # single-function Bluetooth devices

                            * # Not strictly required though.

                             

                            But I'm still not sure how to 'DisablePlugins=input in current release, since it seems invalid.

                            • 11. Re: Implementing a Bluetooth HID Profile on the Edison
                              @hippiehacker

                              You'll need to cp /etc/systemd/system/bluetooth.target.wants/bluetooth.service /etc/systemd/system/ so you can override the command line to add --compat.

                              # cat /etc/systemd/system/bluetooth.service

                              [Unit]

                              Description=Bluetooth service

                              Documentation=man:bluetoothd(8)

                               

                               

                              [Service]

                              Type=dbus

                              BusName=org.bluez

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

                              NotifyAccess=main

                              #WatchdogSec=10

                              #Restart=on-failure

                              CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE

                              LimitNPROC=1

                               

                               

                              [Install]

                              WantedBy=bluetooth.target

                              Alias=dbus-org.bluez.service

                              • 12. Re: Implementing a Bluetooth HID Profile on the Edison
                                @hippiehacker

                                Ok, further verification that PSM 17/19 are in use... I could have sworn that I didn't get these errors on R1. I may rollback and see what happens.

                                root@iikeyboard:~/hidclient# git remote -v

                                origin  https://github.com/benizi/hidclient.git (fetch)

                                origin  https://github.com/benizi/hidclient.git (push)

                                 

                                root@iikeyboard:~/hidclient# sdptool browse local | grep Service\ Name

                                Service Name: Generic Access Profile

                                Service Name: Generic Attribute Profile

                                Service Name: AVRCP CT

                                Service Name: AVRCP TG

                                Service Name: Audio Source

                                Service Name: Audio Sink

                                root@iikeyboard:~/hidclient# ./hidclient

                                HID keyboard/mouse service registered

                                Opened /dev/input/event0 as event device [counter 0]

                                Opened /dev/input/event1 as event device [counter 1]

                                Opened /dev/input/event2 as event device [counter 2]

                                Opened /dev/input/event3 as event device [counter 3]

                                Bind error (PSM 19): Address already in use

                                Failed to bind sockets (9/8) to PSM (17/19)

                                root@iikeyboard:~/hidclient# sdptool browse local | grep Service\ Name

                                Service Name: Generic Access Profile

                                Service Name: Generic Attribute Profile

                                Service Name: AVRCP CT

                                Service Name: AVRCP TG

                                Service Name: Audio Source

                                Service Name: Audio Sink

                                Service Name: Bluez virtual Mouse and Keyboard

                                root@iikeyboard:~/hidclient# ./hidclient

                                HID keyboard/mouse service registered

                                Opened /dev/input/event0 as event device [counter 0]

                                Opened /dev/input/event1 as event device [counter 1]

                                Opened /dev/input/event2 as event device [counter 2]

                                Opened /dev/input/event3 as event device [counter 3]

                                Bind error (PSM 19): Address already in use

                                Failed to bind sockets (9/8) to PSM (17/19)

                                root@iikeyboard:~/hidclient# sdptool browse local | grep Service\ Name

                                Service Name: Generic Access Profile

                                Service Name: Generic Attribute Profile

                                Service Name: AVRCP CT

                                Service Name: AVRCP TG

                                Service Name: Audio Source

                                Service Name: Audio Sink

                                Service Name: Bluez virtual Mouse and Keyboard

                                Service Name: Bluez virtual Mouse and Keyboard


                                From http://sourceforge.net/p/bluez/mailman/message/14845791/


                                 

                                 

                                > It seems you already have a bluetooth daemon using the PSM 19. I do not

                                > know which one that might be, but if I remember right, that should be

                                > reserved for HID!? Sorry I cannot tell you how to find out which program

                                > that might be. If possible, you could try to shutdown the bluetooth

                                > daemons currently running, and see wether that port becomes free.

                                 

                                Hmmm. ps auwx | grep hi root 6147 0.0 0.0 1816 444 ? Ss 12:08 0:00

                                /usr/bin/hidd --server

                                 

                                After killed it all works fine now...

                                ./hidclient

                                HID keyboard/mouse service registered

                                Opened event device [/dev/input/event0]

                                Opened event device [/dev/input/event1]

                                Opened event device [/dev/input/event2]

                                Opened event device [/dev/input/event3]

                                The HID-Client is now ready to accept connections from another machine

                                 

                                So it must be something running on that port.

                                • 13. Re: Implementing a Bluetooth HID Profile on the Edison
                                  @hippiehacker

                                  It's interesting to note that sdp is --compat, it appears it doesn't affect things under bluetoothctl, only spd browse local etc:

                                  # bluetoothctl

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

                                  [bluetooth]# show

                                  Controller 98:4F:EE:02:DF:BA

                                          Name: iikeyboard

                                          Alias: iikeyboard

                                          Class: 0x0c0110

                                          Powered: yes

                                          Discoverable: no

                                          Pairable: yes

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

                                          UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)

                                          UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)

                                          UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)

                                          UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)

                                          UUID: Audio Source              (0000110a-0000-1000-8000-00805f9b34fb)

                                          UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)

                                          Modalias: bluetooth:vBABEpFACEdBABE

                                          Discovering: no

                                   

                                  # systemctl status bluetooth -l

                                  ● bluetooth.service - Bluetooth service

                                    Loaded: loaded (/etc/systemd/system/bluetooth.service; enabled)

                                    Active: active (running) since Mon 2015-02-09 04:48:22 UTC; 14min ago

                                      Docs: man:bluetoothd(8)

                                  Main PID: 401 (bluetoothd)

                                    Status: "Running"

                                    CGroup: /system.slice/bluetooth.service

                                            └─401 /usr/lib/bluez5/bluetooth/bluetoothd --compat

                                   

                                   

                                  Feb 09 04:48:22 iikeyboard bluetoothd[401]: Bluetooth daemon 5.24

                                  Feb 09 04:48:22 iikeyboard bluetoothd[401]: Unknown key DisablePlugins in main.conf

                                  Feb 09 04:48:22 iikeyboard bluetoothd[401]: Starting SDP server

                                  Feb 09 04:48:22 iikeyboard bluetoothd[401]: Bluetooth management interface 1.3 initialized

                                  Feb 09 04:48:22 iikeyboard bluetoothd[401]: Sap driver initialization failed.

                                  Feb 09 04:48:22 iikeyboard bluetoothd[401]: sap-server: Operation not permitted (1)

                                  Feb 09 04:48:22 iikeyboard bluetoothd[401]: hci0 Load Connection Parameters failed: Unknown Command (0x01)

                                  Feb 09 04:48:22 iikeyboard bluetoothd[401]: Endpoint registered: sender=:1.7 path=/MediaEndpoint/A2DPSource

                                  Feb 09 04:48:22 iikeyboard bluetoothd[401]: Endpoint registered: sender=:1.7 path=/MediaEndpoint/A2DPSink

                                  Feb 09 04:48:22 iikeyboard systemd[1]: Started Bluetooth service.

                                   

                                  These two A2DP endpoints were added in the last release, so let's go find them in the code.

                                  • 14. Re: Implementing a Bluetooth HID Profile on the Edison
                                    @hippiehacker

                                    I thought enabling UserspaceHID might work... but still the same results.

                                    # cat /etc/bluetooth/input.conf

                                    # Configuration file for the input service

                                     

                                    # This section contains options which are not specific to any

                                    # particular interface

                                    [General]

                                     

                                    # Set idle timeout (in minutes) before the connection will

                                    # be disconnect (defaults to 0 for no timeout)

                                    #IdleTimeout=30

                                     

                                    # Enable HID protocol handling in userspace input profile

                                    # Defaults to false (HIDP handled in HIDP kernel module)

                                    UserspaceHID=true

                                     

                                    root@iikeyboard:~# ./btkbdd/btkbdd /dev/input/by-id/usb-05f3_0007-event-kbd

                                    Cannot bind a L2CAP server socket: Address already in use

                                     

                                    root@iikeyboard:~# python ./btk/agent.py

                                    start hid

                                    Traceback (most recent call last):

                                      File "./btk/agent.py", line 121, in <module>

                                        sock.bind(('', PSM_INTR))

                                      File "/usr/lib/python2.7/site-packages/bluetooth/bluez.py", line 172, in bind

                                        return self._sock.bind (addrport)

                                    _bluetooth.error: (98, 'Address already in use')

                                     

                                    root@iikeyboard:~# ./hidclient/hidclient

                                    HID keyboard/mouse service registered

                                    Opened /dev/input/event0 as event device [counter 0]

                                    Opened /dev/input/event1 as event device [counter 1]

                                    Opened /dev/input/event2 as event device [counter 2]

                                    Opened /dev/input/event3 as event device [counter 3]

                                    Bind error (PSM 19): Address already in use

                                    Failed to bind sockets (9/8) to PSM (17/19)

                                    1 2 Previous Next