public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Jelle de Jong <jelledejong@powercraft.nl>
To: BlueZ development <bluez-devel@lists.sourceforge.net>
Subject: [Bluez-devel] Sony Bluetooth BD Remote Control
Date: Sun, 12 Oct 2008 15:12:32 +0200	[thread overview]
Message-ID: <48F1F7C0.4040705@powercraft.nl> (raw)

[-- Attachment #1: Type: text/plain, Size: 1397 bytes --]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This message contains the following attachment(s):
Jelle de Jong - Installation Guide - Sony Bluetooth BD Remote Control -
2008-10-10 - v0.1.1j.txt

Hello everybody,

I bought a bluetooth remote for a bluetooth mobile system that I am
trying to built. (bluetooth remote, speakers, mouse, keyboard, headset, gps)

However I can't get the device to work out of the box... I have found
some script and some tools on the internet but this is not very
maintainable (and I could not get it to work)

I am wondering what is needed to create a good healthy maintainable
system to get the remote working out of the box after connecting to it
with bluez...? So how do we create out of the box support for bluetooth
devices?

hidd[3688]: New HID device 00:1E:3D:15:0A:4F (Sony Computer
Entertainment Inc BD Remote Control)
kernel: [18419.605288] input: Sony Computer Entertainment Inc BD Remote
Control as /class/input/input12

Any help is appreciated,

Kind regards,

Jelle de Jong
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iJwEAQECAAYFAkjx974ACgkQ1WclBW9j5Hn+owQAnGdjX0hXkCQBDO35sGmnA+U+
JjXTjkoFefNoem0b5NEeNvUUhwWF5Ogcdtd/tCyZ0YFhXn5w8NBlbWeMFMg1JX7L
o8Tnrj4wi6y6viJoZ1mk+CyIKPigEiqe7aQkahbiTB0LAC7H28/0Nz/AXGStyoE0
50yksr2u8P0gDmpiDm0=
=36g8
-----END PGP SIGNATURE-----

[-- Attachment #2: Jelle de Jong - Installation Guide - Sony Bluetooth BD Remote Control - 2008-10-10 - v0.1.1j.txt --]
[-- Type: text/plain, Size: 9060 bytes --]

#!/bin/sh # just for highlighting this is not a script

# creator: Jelle de Jong <jelledejong at powercraft dot com>

# 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
            <encryption> <slot offset> <timing accuracy> <role switch>
            <sniff mode> <RSSI> <power control> <enhanced iscan>
            <interlaced iscan> <interlaced pscan> <AFH cap. slave>

------------------------------------------------------------------------
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....
------------------------------------------------------------------------

[-- Attachment #3: Type: text/plain, Size: 363 bytes --]

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

[-- Attachment #4: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

             reply	other threads:[~2008-10-12 13:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-12 13:12 Jelle de Jong [this message]
2008-10-12 13:49 ` [Bluez-devel] Sony Bluetooth BD Remote Control Bastien Nocera
2008-10-12 18:01   ` Jelle de Jong
2008-10-15 12:51   ` Jelle de Jong
2008-10-15 13:54     ` Bastien Nocera
2008-10-15 14:57       ` Jelle de Jong
2008-10-15 15:09       ` [Bluez-devel] [PATCH] " Bastien Nocera
2008-10-15 15:16         ` Marcel Holtmann
2008-10-15 18:02           ` Jelle de Jong
2008-10-15 22:05             ` Bastien Nocera

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48F1F7C0.4040705@powercraft.nl \
    --to=jelledejong@powercraft.nl \
    --cc=bluez-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox