Posts: 20
Joined: Aug 2009
Reputation:
0
Does anyone know the process of pairing the remote on the command-line? I have bluez-4.50 patched with the keycode patch and powersaving patch and it can discover the remote with this:
hcitool scan
It gives me the mac address but I'm not sure what to do next to get it to pair if that's even needed. bluez-4.50 doesn't have the hidd command anymore.
Posts: 20
Joined: Aug 2009
Reputation:
0
Ruff: passkey-agent doesn't appear to exist in bluez-4.50. What has it been replaced with?
I found some directions on how to pair but I don't know where to get the passkey-agent equivalent:
passkey-agent –default /usr/bin/bluez-pin
hcitool scan
hcitool cc
hcitool auth
Posts: 20
Joined: Aug 2009
Reputation:
0
Ruff: I think I have it bonded now. I installed blueman to see what it's doing an I saw that it brings up the hci0 interface with page and inquiry scan enabled.
So that's as simple as running this command line:
hciconfig hci0 up piscan
Then when you type hciconfig again, you should see this:
hci0: Type: USB
BD Address: 00:1E:58:3F:64:CD ACL MTU: 384:8 SCO MTU: 64:8
UP RUNNING PSCAN ISCAN
RX bytes:15010 acl:184 sco:0 events:574 errors:0
TX bytes:5839 acl:253 sco:0 commands:149 errors:0
If both page scan and inquiry scan aren't enabled, the bdremote won't communicate with the dongle.
Then now I have hcidump running in a console and when I press a key, it is detected and throws up something like this when pressing the play button:
> HCI Event: Connect Request (0x04) plen 10
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: Role Change (0x12) plen 8
> HCI Event: Connect Complete (0x03) plen 11
> ACL data: handle 42 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 17 scid 0x00ff
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
< ACL data: handle 42 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0040 scid 0x00ff result 1 status 0
Connection pending - No futher information available
< ACL data: handle 42 flags 0x02 dlen 10
L2CAP(s): Info req: type 2
> HCI Event: Page Scan Repetition Mode Change (0x20) plen 7
> HCI Event: Number of Completed Packets (0x13) plen 5
> HCI Event: Command Status (0x0f) plen 4
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
> HCI Event: Number of Completed Packets (0x13) plen 5
> HCI Event: Command Status (0x0f) plen 4
> ACL data: handle 42 flags 0x02 dlen 16
L2CAP(s): Info rsp: type 2 result 0
Extended feature mask 0x0004
< ACL data: handle 42 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0040 scid 0x00ff result 0 status 0
Connection successful
> HCI Event: Read Remote Supported Features (0x0b) plen 11
> HCI Event: Number of Completed Packets (0x13) plen 5
> ACL data: handle 42 flags 0x02 dlen 16
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
MTU 185
< ACL data: handle 42 flags 0x02 dlen 18
L2CAP(s): Config rsp: scid 0x00ff flags 0x00 result 0 clen 4
MTU 185
< ACL data: handle 42 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x00ff flags 0x00 clen 0
> HCI Event: Number of Completed Packets (0x13) plen 5
> HCI Event: Number of Completed Packets (0x13) plen 5
> ACL data: handle 42 flags 0x02 dlen 18
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 4
MTU 185
< ACL data: handle 42 flags 0x02 dlen 5
L2CAP(d): cid 0x00ff len 1 [psm 17]
HIDP: Control: Virtual cable unplug
< ACL data: handle 42 flags 0x02 dlen 12
L2CAP(s): Disconn req: dcid 0x00ff scid 0x0040
> ACL data: handle 42 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 19 scid 0x0100
< ACL data: handle 42 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0100 result 1 status 2
Connection pending - Authorization pending
< ACL data: handle 42 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0100 result 3 status 0
Connection refused - security block
> ACL data: handle 42 flags 0x02 dlen 12
L2CAP(s): Disconn req: dcid 0x0040 scid 0x00ff
< ACL data: handle 42 flags 0x02 dlen 12
L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x00ff
> ACL data: handle 42 flags 0x02 dlen 12
L2CAP(s): Disconn req: dcid 0x0041 scid 0x0100
< ACL data: handle 42 flags 0x02 dlen 12
L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x0100
> ACL data: handle 42 flags 0x02 dlen 12
L2CAP(s): Disconn rsp: dcid 0x00ff scid 0x0040
> HCI Event: Remote Name Req Complete (0x07) plen 255
< HCI Command: Read Remote Version Information (0x01|0x001d) plen 2
> HCI Event: Number of Completed Packets (0x13) plen 5
> HCI Event: Number of Completed Packets (0x13) plen 5
> HCI Event: Number of Completed Packets (0x13) plen 5
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: Number of Completed Packets (0x13) plen 5
> HCI Event: Number of Completed Packets (0x13) plen 5
> HCI Event: Number of Completed Packets (0x13) plen 5
> HCI Event: Disconn Complete (0x05) plen 4
> HCI Event: Read Remote Ver Info Complete (0x0c) plen 8
> HCI Event: Command Status (0x0f) plen 4
The strange thing I've noticed though is lsinput does not list the bdremote as an input device. I know people have previously mentioned that they could see it there but is it necessary to see it there even with your patches?
So at this point I know the remote is communicating with the dongle and I'm wondering how to translate that to keypresses in mythtv.
Posts: 20
Joined: Aug 2009
Reputation:
0
Ruff: I applied both your bdremote and powersave patch but I don't get that. lsinput lists similar info as cat /proc/bus/input/devices. Here's my output for cat /proc/bus/input/devices | grep Name:
N: Name="Power Button"
N: Name="Power Button"
N: Name="Sleep Button"
N: Name="Microsoft Natural� Ergonomic Keyboard 4000"
N: Name="Microsoft Natural� Ergonomic Keyboard 4000"
N: Name="Logitech USB-PS/2 Optical Mouse"
This is while I have the dongle plugged in and keypresses generate dump signals to hcidump.
Posts: 20
Joined: Aug 2009
Reputation:
0
Ruff: This is what I get when I plug the bluetooth dongle in in /var/log/messages:
Sep 6 16:18:58 aragorn bluetoothd[2853]: Bluetooth daemon 4.50
Sep 6 16:18:58 aragorn bluetoothd[2856]: Starting SDP server
Sep 6 16:18:58 aragorn bluetoothd[2856]: Starting experimental netlink support
Sep 6 16:18:58 aragorn bluetoothd[2856]: Failed to find Bluetooth netlink family
Sep 6 16:18:58 aragorn bluetoothd[2856]: Failed to init netlink plugin
Sep 6 16:18:58 aragorn bluetoothd[2856]: Can't create GN bridge
Sep 6 16:18:58 aragorn bluetoothd[2856]: HCI dev 0 registered
Sep 6 16:18:58 aragorn bluetoothd[2856]: Failed to open RFKILL control device
Sep 6 16:18:58 aragorn bluetoothd[2856]: HCI dev 0 up
Sep 6 16:18:58 aragorn bluetoothd[2856]: Starting security manager 0
Sep 6 16:18:59 aragorn bluetoothd[2856]: Parsing /etc/bluetooth/serial.conf failed: No such file or directory
Sep 6 16:18:59 aragorn bluetoothd[2856]: Adapter /org/bluez/2853/hci0 has been enabled