#!/bin/sh # just for highlighting this is not a script # creator: Jelle de Jong # background: information: http://www2.apebox.org/wordpress/programming/28/ # background: information: http://ant.starikov.googlepages.com/linuxdriverforsonybdremote Simultaneously press "Start" and "Enter" buttons on the remote for about 5 seconds, to get the device in pairing mode. sudo /etc/init.d/sysklogd start sudo /etc/init.d/klogd start sudo /etc/init.d/bluetooth restart sudo tail --lines=100 --follow /var/log/syslog ------------------------------------------------------------------------ hcitool scan Scanning ... 00:1E:3D:15:0A:4F BD Remote Control ------------------------------------------------------------------------ sudo hidd --connect 00:1E:3D:15:0A:4F hidd: New HID device 00:1E:3D:15:0A:4F (Sony Computer Entertainment Inc BD Remote Control) kernel: [15926.724235] input: Sony Computer Entertainment Inc BD Remote Control as /class/input/input11 ------------------------------------------------------------------------ sudo hcitool info 00:1E:3D:15:0A:4F Requesting information ... BD Address: 00:1E:3D:15:0A:4F Device Name: BD Remote Control LMP Version: 2.0 (0x3) LMP Subversion: 0x229 Manufacturer: Broadcom Corporation (15) Features: 0xbc 0x02 0x04 0x38 0x08 0x00 0x00 0x00 ------------------------------------------------------------------------ echo 'HIDD_OPTIONS="--connect 00:1E:3D:15:0A:4F --server"' | sudo tee --append /etc/default/bluetooth cat /etc/default/bluetooth ------------------------------------------------------------------------ cat /etc/default/bluetooth HIDD_ENABLED=1 HIDD_OPTIONS="--search --server" HIDD_OPTIONS="--connect 11:11:11:11:17:95 --server" HIDD_OPTIONS="--connect 00:07:61:0F:4A:60 --server" HIDD_OPTIONS="--connect 00:1E:3D:15:0A:4F --server" ------------------------------------------------------------------------ sdptool browse 00:1E:3D:15:0A:4F Browsing 00:1E:3D:15:0A:4F ... Service Name: BD Remote Control Service Description: BD Remote Control Service Provider: Sony Computer Entertainment Inc Service RecHandle: 0x10000 Service Class ID List: "Human Interface Device" (0x1124) Protocol Descriptor List: "L2CAP" (0x0100) PSM: 17 "HIDP" (0x0011) Language Base Attr List: code_ISO639: 0x656e encoding: 0x6a base_offset: 0x100 Profile Descriptor List: "Human Interface Device" (0x1124) Version: 0x0100 ------------------------------------------------------------------------ sudo hcitool con Connections: < ACL 00:1E:3D:15:0A:4F handle 42 state 1 lm MASTER ------------------------------------------------------------------------ udevinfo -a -p $(udevinfo -q path -n /dev/input/event11) Udevinfo starts with the device specified by the devpath and then walks up the chain of parent devices. It prints for every device found, all possible attributes in the udev rules key format. A rule to match, can be composed by the attributes of the device and the attributes from one single parent device. looking at device '/class/input/input11/event11': KERNEL=="event11" SUBSYSTEM=="input" DRIVER=="" looking at parent device '/class/input/input11': KERNELS=="input11" SUBSYSTEMS=="input" DRIVERS=="" ATTRS{name}=="Sony Computer Entertainment Inc BD Remote Control" ATTRS{phys}=="00:1B:DC:00:32:71" ATTRS{uniq}=="00:1E:3D:15:0A:4F" ATTRS{modalias}=="input:b0005v054Cp0306e0100-e0,kramlsfw" looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb1/1-2/1-2:1.0/hci0/acl001E3D150A4F': KERNELS=="acl001E3D150A4F" SUBSYSTEMS=="bluetooth" DRIVERS=="" ATTRS{type}=="ACL" ATTRS{address}=="00:1E:3D:15:0A:4F" looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb1/1-2/1-2:1.0/hci0': KERNELS=="hci0" SUBSYSTEMS=="bluetooth" DRIVERS=="" ATTRS{type}=="USB" ATTRS{name}=="BlueZ (0)" ATTRS{class}=="0x080100" ATTRS{address}=="00:1B:DC:00:32:71" ATTRS{features}=="0xffff8ffe9bf90080" ATTRS{manufacturer}=="10" ATTRS{hci_version}=="3" ATTRS{hci_revision}=="3164" ATTRS{inquiry_cache}=="00:1E:3D:15:0A:4F 1 2 0 0x00250c 0x294d -51 3905334" ATTRS{idle_timeout}=="0" ATTRS{sniff_max_interval}=="800" ATTRS{sniff_min_interval}=="80" looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb1/1-2/1-2:1.0': KERNELS=="1-2:1.0" SUBSYSTEMS=="usb" DRIVERS=="hci_usb" ATTRS{bInterfaceNumber}=="00" ATTRS{bAlternateSetting}==" 0" ATTRS{bNumEndpoints}=="03" ATTRS{bInterfaceClass}=="e0" ATTRS{bInterfaceSubClass}=="01" ATTRS{bInterfaceProtocol}=="01" ATTRS{modalias}=="usb:v0A12p0001d3164dcE0dsc01dp01icE0isc01ip01" looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb1/1-2': KERNELS=="1-2" SUBSYSTEMS=="usb" DRIVERS=="usb" ATTRS{configuration}=="" ATTRS{bNumInterfaces}==" 2" ATTRS{bConfigurationValue}=="1" ATTRS{bmAttributes}=="80" ATTRS{bMaxPower}==" 0mA" ATTRS{urbnum}=="151688" ATTRS{idVendor}=="0a12" ATTRS{idProduct}=="0001" ATTRS{bcdDevice}=="3164" ATTRS{bDeviceClass}=="e0" ATTRS{bDeviceSubClass}=="01" ATTRS{bDeviceProtocol}=="01" ATTRS{bNumConfigurations}=="1" ATTRS{bMaxPacketSize0}=="64" ATTRS{speed}=="12" ATTRS{busnum}=="1" ATTRS{devnum}=="2" ATTRS{version}==" 2.00" ATTRS{maxchild}=="0" ATTRS{quirks}=="0x0" ATTRS{authorized}=="1" looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb1': KERNELS=="usb1" SUBSYSTEMS=="usb" DRIVERS=="usb" ATTRS{configuration}=="" ATTRS{bNumInterfaces}==" 1" ATTRS{bConfigurationValue}=="1" ATTRS{bmAttributes}=="e0" ATTRS{bMaxPower}==" 0mA" ATTRS{urbnum}=="39" ATTRS{idVendor}=="1d6b" ATTRS{idProduct}=="0001" ATTRS{bcdDevice}=="0206" ATTRS{bDeviceClass}=="09" ATTRS{bDeviceSubClass}=="00" ATTRS{bDeviceProtocol}=="00" ATTRS{bNumConfigurations}=="1" ATTRS{bMaxPacketSize0}=="64" ATTRS{speed}=="12" ATTRS{busnum}=="1" ATTRS{devnum}=="1" ATTRS{version}==" 1.10" ATTRS{maxchild}=="2" ATTRS{quirks}=="0x0" ATTRS{authorized}=="1" ATTRS{manufacturer}=="Linux 2.6.26-1-686 uhci_hcd" ATTRS{product}=="UHCI Host Controller" ATTRS{serial}=="0000:00:1d.0" ATTRS{authorized_default}=="1" looking at parent device '/devices/pci0000:00/0000:00:1d.0': KERNELS=="0000:00:1d.0" SUBSYSTEMS=="pci" DRIVERS=="uhci_hcd" ATTRS{vendor}=="0x8086" ATTRS{device}=="0x2658" ATTRS{subsystem_vendor}=="0x1043" ATTRS{subsystem_device}=="0x82d8" ATTRS{class}=="0x0c0300" ATTRS{irq}=="23" ATTRS{local_cpus}=="ff" ATTRS{local_cpulist}=="0-7" ATTRS{modalias}=="pci:v00008086d00002658sv00001043sd000082D8bc0Csc03i00" ATTRS{broken_parity_status}=="0" ATTRS{msi_bus}=="" looking at parent device '/devices/pci0000:00': KERNELS=="pci0000:00" SUBSYSTEMS=="" DRIVERS=="" ------------------------------------------------------------------------ sudo evtest /dev/input/event11 ------------------------------------------------------------------------ sudo apt-get install libbluetooth-dev cd bdremote-0.2/ make gcc -O3 bdremoted.c -o bdremoted -lpthread sudo cp --verbose bdremoted /usr/bin/bdremoted `bdremoted' -> `/usr/bin/bdremoted' sudo chmod --verbose 755 /usr/bin/bdremoted mode of `/usr/bin/bdremoted' changed to 0755 (rwxr-xr-x) ------------------------------------------------------------------------ sudo hidd --kill 00:1E:3D:15:0A:4F sudo hcitool con Connections: bdremoted -h sudo bdremoted -a 00:1E:3D:15:0A:4F -p 8888 -d 4 -n det=0, port=8888, tmout=60, rep=10, deb=4, addr=00:1E:3D:15:0A:4F Can't listen on HID control channel: Address already in use BTBD try to reconnect. Can't listen on HID control channel: Address already in use BTBD try to reconnect. sudo /etc/init.d/lirc stop sudo lircd -H null --connect 127.0.0.1:8888 irw # no output sudo killall -9 bdremoted sudo killall -9 lircd sudo bdremoted -a 00:1E:3D:15:0A:4F -p 8888 # 100% cpu load.... ------------------------------------------------------------------------ # svn should have been git :-p sudo dpkg -i $HOME/bluez-utils_4.13svn_i386.deb sudo dpkg -i $HOME/bluez-gnome_1.8svn_i386.deb sudo ldconfig -v ------------------------------------------------------------------------ sudo /usr/sbin/bluetoothd --nodaemon --debug sudo bluetooth-applet ------------------------------------------------------------------------ bluetoothd[14894]: Bluetooth daemon bluetoothd[14894]: Enabling debug information bluetoothd[14894]: parsing main.conf bluetoothd[14894]: offmode=NoScan bluetoothd[14894]: discovto=0 bluetoothd[14894]: pageto=8192 bluetoothd[14894]: name=%h-%d bluetoothd[14894]: class=0x000100 bluetoothd[14894]: inqmode=0 bluetoothd[14894]: Starting SDP server bluetoothd[14894]: Loading plugins /usr/lib/bluetooth/plugins bluetoothd[14894]: /usr/lib/bluetooth/plugins/service.so bluetoothd[14894]: /usr/lib/bluetooth/plugins/hal.so bluetoothd[14894]: /usr/lib/bluetooth/plugins/network.so bluetoothd[14894]: Parsing /etc/bluetooth/network.conf failed: No such file or directory bluetoothd[14894]: Config options: InterfacePrefix=bnep%d, PANU_Script=(null), GN_Script=(null), NAP_Script=(null), GN_Interface=pan0, NAP_Interface=pan1, Security=true bluetoothd[14894]: bridge pan0 created bluetoothd[14894]: /usr/lib/bluetooth/plugins/serial.so bluetoothd[14894]: /usr/lib/bluetooth/plugins/input.so bluetoothd[14894]: Parsing /etc/bluetooth/input.conf failed: No such file or directory bluetoothd[14894]: /usr/lib/bluetooth/plugins/audio.so bluetoothd[14894]: Unix socket created: 13 bluetoothd[14894]: Telephony plugin initialized bluetoothd[14894]: HFP AG features: "Ability to reject a call" "Enhanced call status" "Extended Error Result Codes" bluetoothd[14894]: HCI dev 0 registered bluetoothd[14894]: child 14903 forked bluetoothd[14894]: HCI dev 0 already up bluetoothd[14894]: service_probe: path /org/bluez/hci0 bluetoothd[14894]: Registered interface org.bluez.Service on path /org/bluez/hci0 bluetoothd[14894]: network_server_probe: path /org/bluez/hci0 bluetoothd[14894]: Adding record with handle 0x10000 bluetoothd[14894]: Record pattern UUID 0000000f-0000-1000-8000-00805f9 bluetoothd[14894]: Record pattern UUID 00000100-0000-1000-8000-00805f9 bluetoothd[14894]: Record pattern UUID 00001002-0000-1000-8000-00805f9 bluetoothd[14894]: Record pattern UUID 00001115-0000-1000-8000-00805f9 bluetoothd[14894]: register_server_record: got record id 0x10000 bluetoothd[14894]: Registered interface org.bluez.NetworkPeer on path /org/bluez/hci0 bluetoothd[14894]: network_server_probe: path /org/bluez/hci0 bluetoothd[14894]: Adding record with handle 0x10001 bluetoothd[14894]: Record pattern UUID 0000000f-0000-1000-8000-00805f9 bluetoothd[14894]: Record pattern UUID 00000100-0000-1000-8000-00805f9 bluetoothd[14894]: Record pattern UUID 00001002-0000-1000-8000-00805f9 bluetoothd[14894]: Record pattern UUID 00001117-0000-1000-8000-00805f9 bluetoothd[14894]: register_server_record: got record id 0x10001 bluetoothd[14894]: Registered interface org.bluez.NetworkHub on path /org/bluez/hci0 bluetoothd[14894]: network_server_probe: path /org/bluez/hci0 bluetoothd[14894]: Adding record with handle 0x10002 bluetoothd[14894]: Record pattern UUID 0000000f-0000-1000-8000-00805f9 bluetoothd[14894]: Record pattern UUID 00000100-0000-1000-8000-00805f9 bluetoothd[14894]: Record pattern UUID 00001002-0000-1000-8000-00805f9 bluetoothd[14894]: Record pattern UUID 00001116-0000-1000-8000-00805f9 bluetoothd[14894]: register_server_record: got record id 0x10002 bluetoothd[14894]: Registered interface org.bluez.NetworkRouter on path /org/bluez/hci0 bluetoothd[14894]: proxy_probe: path /org/bluez/hci0 bluetoothd[14894]: Registered interface org.bluez.SerialProxyManager on path /org/bluez/hci0 bluetoothd[14894]: headset_server_probe: path /org/bluez/hci0 bluetoothd[14894]: audio.conf: Key file does not have key 'Master' bluetoothd[14894]: Adding record with handle 0x10003 bluetoothd[14894]: Record pattern UUID 00000003-0000-1000-8000-00805f9 bluetoothd[14894]: Record pattern UUID 00000100-0000-1000-8000-00805f9 bluetoothd[14894]: Record pattern UUID 00001002-0000-1000-8000-00805f9 bluetoothd[14894]: Record pattern UUID 00001108-0000-1000-8000-00805f9 bluetoothd[14894]: Record pattern UUID 00001112-0000-1000-8000-00805f9 bluetoothd[14894]: Record pattern UUID 00001203-0000-1000-8000-00805f9 bluetoothd[14894]: audio.conf: Key file does not have key 'SCORouting' bluetoothd[14894]: a2dp_server_probe: path /org/bluez/hci0 bluetoothd[14894]: audio.conf: Key file does not have key 'Disable' bluetoothd[14894]: audio.conf: Key file does not have group 'A2DP' bluetoothd[14894]: audio.conf: Key file does not have group 'A2DP' bluetoothd[14894]: audio.conf: Key file does not have group 'A2DP' bluetoothd[14894]: audio.conf: Key file does not have group 'A2DP' bluetoothd[14894]: audio.conf: Key file does not have key 'Master' bluetoothd[14894]: SEP 0xb9296078 registered: type:0 codec:0 seid:1 bluetoothd[14894]: Adding record with handle 0x10004 bluetoothd[14894]: Record pattern UUID 00000019-0000-1000-8000-00805f9 bluetoothd[14894]: Record pattern UUID 00000100-0000-1000-8000-00805f9 bluetoothd[14894]: Record pattern UUID 00001002-0000-1000-8000-00805f9 bluetoothd[14894]: Record pattern UUID 0000110a-0000-1000-8000-00805f9 bluetoothd[14894]: Record pattern UUID 0000110d-0000-1000-8000-00805f9 bluetoothd[14894]: avrcp_server_probe: path /org/bluez/hci0 bluetoothd[14894]: audio.conf: Key file does not have key 'Master' bluetoothd[14894]: Adding record with handle 0x10005 bluetoothd[14894]: Record pattern UUID 00000017-0000-1000-8000-00805f9 bluetoothd[14894]: Record pattern UUID 00000100-0000-1000-8000-00805f9 bluetoothd[14894]: Record pattern UUID 00001002-0000-1000-8000-00805f9 bluetoothd[14894]: Record pattern UUID 0000110c-0000-1000-8000-00805f9 bluetoothd[14894]: Record pattern UUID 0000110e-0000-1000-8000-00805f9 bluetoothd[14894]: Adding record with handle 0x10006 bluetoothd[14894]: Record pattern UUID 00000017-0000-1000-8000-00805f9 bluetoothd[14894]: Record pattern UUID 00000100-0000-1000-8000-00805f9 bluetoothd[14894]: Record pattern UUID 00001002-0000-1000-8000-00805f9 bluetoothd[14894]: Record pattern UUID 0000110e-0000-1000-8000-00805f9 bluetoothd[14894]: Adapter /org/bluez/hci0 has been enabled bluetoothd[14894]: Starting security manager 0 bluetoothd[14894]: child 14903 exited bluetoothd[14894]: Computer is classified as laptop bluetoothd[14894]: Current device class is 0x0a010c bluetoothd[14894]: Setting 0x00010c for major/minor device class bluetoothd[14894]: Agent registered for hci0 at :1.42:/org/bluez/agent/hci0 bluetoothd[14894]: Discovery session 0xb9291c98 with :1.44 activated bluetoothd[14894]: session_ref(0xb9291c98): ref=1 bluetoothd[14894]: session_unref(0xb9291c98): ref=0 bluetoothd[14894]: Discovery session 0xb9291c98 with :1.44 deactivated bluetoothd[14894]: Stopping discovery bluetoothd[14894]: bonding_request_new(00:1E:3D:15:0A:4F) bluetoothd[14894]: adapter_get_device(00:1E:3D:15:0A:4F) bluetoothd[14894]: adapter_create_device(00:1E:3D:15:0A:4F) bluetoothd[14894]: Creating device /org/bluez/hci0/dev_00_1E_3D_15_0A_4F bluetoothd[14894]: Temporary agent registered for hci0/00:1E:3D:15:0A:4F at :1.44:/org/bluez/agent/wizard bluetoothd[14894]: adapter_get_device(00:1E:3D:15:0A:4F) bluetoothd[14894]: link_key_request (sba=00:1B:DC:00:32:71, dba=00:1E:3D:15:0A:4F) bluetoothd[14894]: kernel auth requirements = 0x00 bluetoothd[14894]: pin_code_request (sba=00:1B:DC:00:32:71, dba=00:1E:3D:15:0A:4F) bluetoothd[14894]: hcid_dbus_new_auth_request bluetoothd[14894]: hcid_dbus_bonding_process_complete: status=18 bluetoothd[14894]: Releasing agent :1.44, /org/bluez/agent/wizard bluetoothd[14894]: Removing temporary device 00:1E:3D:15:0A:4F bluetoothd[14894]: Removing device /org/bluez/hci0/dev_00_1E_3D_15_0A_4F bluetoothd[14894]: Discovery session 0xb928f3a8 with :1.44 activated bluetoothd[14894]: session_ref(0xb928f3a8): ref=1 bluetoothd[14894]: session_unref(0xb928f3a8): ref=0 bluetoothd[14894]: Discovery session 0xb928f3a8 with :1.44 deactivated bluetoothd[14894]: Stopping discovery bluetoothd[14894]: bonding_request_new(00:1E:3D:15:0A:4F) bluetoothd[14894]: adapter_get_device(00:1E:3D:15:0A:4F) bluetoothd[14894]: adapter_create_device(00:1E:3D:15:0A:4F) bluetoothd[14894]: Creating device /org/bluez/hci0/dev_00_1E_3D_15_0A_4F bluetoothd[14894]: Temporary agent registered for hci0/00:1E:3D:15:0A:4F at :1.44:/org/bluez/agent/wizard bluetoothd[14894]: adapter_get_device(00:1E:3D:15:0A:4F) bluetoothd[14894]: link_key_request (sba=00:1B:DC:00:32:71, dba=00:1E:3D:15:0A:4F) bluetoothd[14894]: kernel auth requirements = 0x00 bluetoothd[14894]: pin_code_request (sba=00:1B:DC:00:32:71, dba=00:1E:3D:15:0A:4F) bluetoothd[14894]: hcid_dbus_new_auth_request bluetoothd[14894]: hcid_dbus_bonding_process_complete: status=18 bluetoothd[14894]: Releasing agent :1.44, /org/bluez/agent/wizard bluetoothd[14894]: Removing temporary device 00:1E:3D:15:0A:4F bluetoothd[14894]: Removing device /org/bluez/hci0/dev_00_1E_3D_15_0A_4F