2009-09-06, 22:15
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.
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.