Usage of XBOX360 Wireless Controller as Android BT GamePad

Discuss everything to do with GIMX here
trcsoftware
Posts: 8
Joined: Wed Apr 13, 2016 9:34 am

Usage of XBOX360 Wireless Controller as Android BT GamePad

Post by trcsoftware »

Hi Matlo and community,

I have an international Samsung Galaxy S7 SM-G930F (NOROOT) with a Gear VR. I can connect my XBOX360 Wireless Controller to this phone with the USB/BT Joycenter application 8.1 .
Unfortunately Samsung has removed USB OTG Support from the Consumer Gear VR and left over the only possibility to use bluetooth gamepads.

Therefore I have found your software GIMX and I am trying to expose my XBOX360 Wireless Controller as a Android Bluetooth Gamepad to use it in VR Applications.

I have setup Ubuntu 14.04 with the Bluetooth dongle and XBOX360 Wireless Controller and tested successful the functionality of both devices.
- Bluetooth = Standard Ubuntu Bluetooth application with exposing host and connecting to other devices
- Gamepad = Installing application gt-joytest and tested XBOX360 functionality (Buttons, rstick ... )

Code: Select all

osboxes@osboxes:~/.gimx/bluetooth/40:E2:30:3C:4F:7F$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
XBOX Controller -> Bus 002 Device 005: ID 045e:0719 Microsoft Corp. Xbox 360 Wireless Adapter
Bluetooth       -> Bus 002 Device 004: ID 0b05:180a ASUSTek Computer, Inc. 

I have downloaded the config X360PadUsb.xml and modified it to accept the XBOX360 Wireless Controller in GIMX
(Just Replacing the joystick name with Xbox 360 Wireless Receiver)

I have faked the gimx linkkeys setup by placing in the directory

Code: Select all

/.gimx/bluetooth/40:E2:30:3C:4F:7F 
the file linkkeys with the following content (based on your https://github.com/matlo/GIMX-tools/blo ... -helper.sh)

Code: Select all

00:00:00:00:00:00 0000 4 0
A4:84:31:2F:85:C6 0000 4 0
The Samsung Galaxy S7 has the bluetooth address A4:84:31:2F:85:C6 my bluetooth dongle has the address 40:E2:30:3C:4F:7F

Code: Select all

Output hciconfig -a

Manufacturer:   Broadcom Corporation (15)
Device address: 40:E2:30:3C:4F:7F

hci0:	Type: BR/EDR  Bus: USB
	BD Address: 40:E2:30:3C:4F:7F  ACL MTU: 1021:8  SCO MTU: 64:1
	UP RUNNING PSCAN 
	RX bytes:2637 acl:0 sco:0 events:136 errors:0
	TX bytes:1429 acl:0 sco:0 commands:113 errors:0
	Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
	Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
	Link policy: RSWITCH SNIFF 
	Link mode: SLAVE ACCEPT 
	Name: 'osboxes-1'
	Class: 0x600100
	Service Classes: Audio, Telephony
	Device Class: Computer, Uncategorized
	HCI Version: 4.0 (0x6)  Revision: 0x16b2
	LMP Version: 4.0 (0x6)  Subversion: 0x220e
	Manufacturer: Broadcom Corporation (15
I have paired the Samsung Galaxy S7 with the Bluetooth and it was recognized as Desktop as expected.

Now the GIMX way.

I have started gimx with this commandline

Code: Select all

gimx --type DS4 --config X360PadUsb.xml --bdaddr A4:84:31:2F:85:C6 --hci 0 --nograb --status
--type 360pad was not accepted maybe you could change this

Code: Select all

osboxes@osboxes:~$ gimx --type DS4 --config X360PadUsb.xml --bdaddr A4:84:31:2F:85:C6 --hci 0 --nograb --status
option -t with value `DS4'
option -c with value `X360PadUsb.xml'
option -b with value `00:04:0E:89:B9:09'
option -h with value `0'
grab flag is unset
status flag is set
using default refresh period: 10.00ms
Warning: can't open macro directory /home/osboxes//.gimx//macros/
listening on psm: 0x0001
listening on psm: 0x0011
listening on psm: 0x0013
Testing X360 Pad

Code: Select all

0 1460409944.568671
0 1460409944.618742
0 1460409944.747846, rstick y (1)
0 1460409945.118202
0 1460409945.128212, rstick x (14), rstick y (-3)
0 1460409945.138228, rstick x (15), rstick y (-4)
0 1460409945.158271, rstick x (17), rstick y (-4)
0 1460409945.168262, rstick x (17), rstick y (-7)
0 1460409945.178286, rstick x (19), rstick y (-7)
0 1460409945.188263, rstick x (19), rstick y (-9)
In a separate Window I have executed the command

Code: Select all

root@osboxes:~# hciconfig -a
hci0:	Type: BR/EDR  Bus: USB
	BD Address: 40:E2:30:3C:4F:7F  ACL MTU: 1021:8  SCO MTU: 64:1
	UP RUNNING PSCAN 
	RX bytes:3943 acl:0 sco:0 events:168 errors:0
	TX bytes:2061 acl:0 sco:0 commands:146 errors:0
	Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
	Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
	Link policy: RSWITCH SNIFF 
	Link mode: SLAVE ACCEPT 
	Name: 'Wireless Controller'
	Class: 0x002508
	Service Classes: Unspecified
	Device Class: Peripheral, Gamepad
	HCI Version: 4.0 (0x6)  Revision: 0x16b2
	LMP Version: 4.0 (0x6)  Subversion: 0x220e
	Manufacturer: Broadcom Corporation (15)
	
Surprise now it's a Gamepad :)

Try to connect with S7 to the new Gamepad which is now recognized as a Gamepad in Android Bluetooth settings.
So the Blutooth link (Desktop) with the name osboxes-1 has changed to (Gamepad) Wireless Controller still paired but not connected.

Code: Select all

osboxes@osboxes:~/.gimx/bluetooth/40:E2:30:3C:4F:7F$ gimx --type DS4 --config X360PadUsb.xml --bdaddr A4:84:31:2F:85:C6 --hci 0 --nograb --status
option -t with value `DS4'
option -c with value `X360PadUsb.xml'
option -b with value `A4:84:31:2F:85:C6'
option -h with value `0'
grab flag is unset
status flag is set
using default refresh period: 10.00ms
Warning: can't open macro directory /home/osboxes//.gimx//macros/
listening on psm: 0x0001
listening on psm: 0x0011
listening on psm: 0x0013
Timer fired several times...
accepted connection from A4:84:31:2F:85:C6 (psm: 0x0001)
hci_open_dev: No such device
connecting with hci0 = 40:E2:30:3C:4F:7F to A4:84:31:2F:85:C6 psm 0x0011
connecting with hci0 = 40:E2:30:3C:4F:7F to A4:84:31:2F:85:C6 psm 0x0013
connection failed: Connection refused
can't connect to psm 0x0013
accepted connection from A4:84:31:2F:85:C6 (psm: 0x0001)
accepted connection from A4:84:31:2F:85:C6 (psm: 0x0001)
accepted connection from A4:84:31:2F:85:C6 (psm: 0x0001)
Timer fired several times...
Timer fired several times...
0 1460549588.965538, lstick x (37), lstick y (114), rstick x (4), rstick y (91), share (255), options (255), PS (255), up (255), right (255), down (255), circle (255), cross (255), l1 (255), r1 (255), l3 (255), r3 (255)
Exiting
But now GIMX exiting I don't now why 0x0013 is needed or that you need to open several bluetooth connections to the same host maybe a PS4 requirement.

I see that the bluetooth adapter is transferring

Code: Select all

	RX bytes:2637 acl:0 sco:0 events:136 errors:0
	TX bytes:1429 acl:0 sco:0 commands:113 errors:0
but it seems to be that no data is received by the S7 besides the Connection handling

Please download the btsnoop_hci.log from Android (Wireshark format) http://s000.tinyupload.com/index.php?fi ... 8221690616
(If any other file hoster is required please let me know)

Maybe something with the linkkey ? I have set it to 0000 (see line 128 in the log)

It would be great if you could help me to connect it properly to the S7
User avatar
Matlo
Posts: 5768
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: Usage of XBOX360 Wireless Controller as Android BT GameP

Post by Matlo »

Try with the link key from the /var/lib/bluetooth/<dongle address>/linkkeys file.
GIMX creator
trcsoftware
Posts: 8
Joined: Wed Apr 13, 2016 9:34 am

Re: Usage of XBOX360 Wireless Controller as Android BT GameP

Post by trcsoftware »

That's a good idea to use the same linkkeys :-) but it doesn't work :

Code: Select all

root@osboxes:~#  cat /var/lib/bluetooth/40\:E2\:30\:3C\:4F\:7F/linkkeys 
00:04:0E:89:B9:09 4F75475873C4DA4ED7FB09F715C649F5 0 0
A4:84:31:2F:85:C6 FDF97035E4C55292D8FF99D415CE1C77 4 0

osboxes@osboxes:~$ cat ~/.gimx/bluetooth/40\:E2\:30\:3C\:4F\:7F/linkkeys 
00:04:0E:89:B9:09 4F75475873C4DA4ED7FB09F715C649F5 0 0
A4:84:31:2F:85:C6 FDF97035E4C55292D8FF99D415CE1C77 4 0

osboxes@osboxes:~$ gimx --type DS4 --config X360PadUsb.xml --bdaddr A4:84:31:2F:85:C6 --hci 0 --nograb --status
option -t with value `DS4'
option -c with value `X360PadUsb.xml'
option -b with value `A4:84:31:2F:85:C6'
option -h with value `0'
grab flag is unset
status flag is set
using default refresh period: 10.00ms
Warning: can't open macro directory /home/osboxes//.gimx//macros/
listening on psm: 0x0001
listening on psm: 0x0011
listening on psm: 0x0013
accepted connection from A4:84:31:2F:85:C6 (psm: 0x0001)
hci_open_dev: No such device
connecting with hci0 = 40:E2:30:3C:4F:7F to A4:84:31:2F:85:C6 psm 0x0011
connecting with hci0 = 40:E2:30:3C:4F:7F to A4:84:31:2F:85:C6 psm 0x0013
connection failed: Connection refused
can't connect to psm 0x0013
Timer fired several times...
accepted connection from A4:84:31:2F:85:C6 (psm: 0x0001)
accepted connection from A4:84:31:2F:85:C6 (psm: 0x0001)
accepted connection from A4:84:31:2F:85:C6 (psm: 0x0001)
0 1460710724.832660, rstick y (-5)
Exiting
osboxes@osboxes:~$ 

Still the error "can't connect to psm 0x0013 " and the disconnect of the S7.

New bluetooth log is uploaded to http://s000.tinyupload.com/index.php?fi ... 5839964833
User avatar
Matlo
Posts: 5768
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: Usage of XBOX360 Wireless Controller as Android BT GameP

Post by Matlo »

Try without "--hci 0".
GIMX creator
trcsoftware
Posts: 8
Joined: Wed Apr 13, 2016 9:34 am

Re: Usage of XBOX360 Wireless Controller as Android BT GameP

Post by trcsoftware »

Same result.

Code: Select all

osboxes@osboxes:~$ gimx --type DS4 --config X360PadUsb.xml --bdaddr A4:84:31:2F:85:C6  --nograb --status
option -t with value `DS4'
option -c with value `X360PadUsb.xml'
option -b with value `A4:84:31:2F:85:C6'
grab flag is unset
status flag is set
using default refresh period: 10.00ms
Warning: can't open macro directory /home/osboxes//.gimx//macros/
listening on psm: 0x0001
listening on psm: 0x0011
listening on psm: 0x0013
accepted connection from A4:84:31:2F:85:C6 (psm: 0x0001)
hci_open_dev: No such device
connecting with hci0 = 40:E2:30:3C:4F:7F to A4:84:31:2F:85:C6 psm 0x0011
connecting with hci0 = 40:E2:30:3C:4F:7F to A4:84:31:2F:85:C6 psm 0x0013
accepted connection from A4:84:31:2F:85:C6 (psm: 0x0001)
connection failed: Connection refused
can't connect to psm 0x0013
accepted connection from A4:84:31:2F:85:C6 (psm: 0x0001)
accepted connection from A4:84:31:2F:85:C6 (psm: 0x0001)
accepted connection from A4:84:31:2F:85:C6 (psm: 0x0001)
Timer fired several times...
accepted connection from A4:84:31:2F:85:C6 (psm: 0x0001)
Timer fired several times...
Timer fired several times...
Timer fired several times...
I have analyzed this in the Bluetooth HCI Log with another bluetooth dongle

Code: Select all

ubuntu@ubuntu:~$ gimx --type DS4 --config X360PadUsb.xml --bdaddr A4:84:31:2F:85:C6  --nograb --status
option -t with value `DS4'
option -c with value `X360PadUsb.xml'
option -b with value `A4:84:31:2F:85:C6'
grab flag is unset
status flag is set
using default refresh period: 10.00ms
Warning: can't open macro directory /home/osboxes//.gimx//macros/
listening on psm: 0x0001
listening on psm: 0x0011
listening on psm: 0x0013
accepted connection from A4:84:31:2F:85:C6 (psm: 0x0001)
no further output and it takes much longer on the S7

285 211.094242 AvmGmbh_89:b9:09 (Wireless Controller) localhost (MR Galaxy S7) L2CAP 21 Rcvd Connection Response - Refused - PSM not supported (SCID: 0x0043)

Bluetooth L2CAP Protocol
Command Code: Connection Response (0x03)
Command Identifier: 0x07
Command Length: 8
Destination CID: Null identifier (0x0000)
Source CID: Dynamically Allocated Channel (0x0043)
Result: Refused - PSM not supported (0x0002)
Status: No further information available (0x0000)
trcsoftware
Posts: 8
Joined: Wed Apr 13, 2016 9:34 am

Re: Usage of XBOX360 Wireless Controller as Android BT GameP

Post by trcsoftware »

I have started fresh with a new BT Dongle HAMA https://de.hama.com/00049232/hama-nano- ... class2_eng with some simple goal.

Connect the exposed XBOX360 Wireless Controller as "Generic" Bluetooth Gamepad via Ubuntu 14.04.4 GIMX to Windows 10 Bluetooth stack or BlueSoleil

But it still fails at the PSM 0x0013 connection

Standard Windows10 Bluetooth stack (Pairing with GIMX successfully)

Code: Select all

root@ubuntu-ThinkPad-T60:~# hcidump
HCI sniffer - Bluetooth packet analyzer ver 2.5
device: hci0 snap_len: 1500 filter: 0xffffffff
< HCI Command: Read BD ADDR (0x04|0x0009) plen 0
> HCI Event: Command Complete (0x0e) plen 10
    Read BD ADDR (0x04|0x0009) ncmd 1
    status 0x00 bdaddr 00:1B:DC:06:69:A9
< HCI Command: Read BD ADDR (0x04|0x0009) plen 0
> HCI Event: Command Complete (0x0e) plen 10
    Read BD ADDR (0x04|0x0009) ncmd 1
    status 0x00 bdaddr 00:1B:DC:06:69:A9
< HCI Command: Write Class of Device (0x03|0x0024) plen 3
    class 0x002508
> HCI Event: Command Complete (0x0e) plen 4
    Write Class of Device (0x03|0x0024) ncmd 1
    status 0x00
> HCI Event: Connect Request (0x04) plen 10
    bdaddr 40:E2:30:3C:4F:7F class 0x020104 type ACL
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
    bdaddr 40:E2:30:3C:4F:7F role 0x01
    Role: Slave
> HCI Event: Command Status (0x0f) plen 4
    Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1
> HCI Event: Connect Complete (0x03) plen 11
    status 0x00 handle 70 bdaddr 40:E2:30:3C:4F:7F type ACL encrypt 0x00
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
    handle 70
> HCI Event: Page Scan Repetition Mode Change (0x20) plen 7
    bdaddr 40:E2:30:3C:4F:7F mode 0
> HCI Event: Max Slots Change (0x1b) plen 3
    handle 70 slots 5
> HCI Event: Command Status (0x0f) plen 4
    Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 0
> HCI Event: Command Status (0x0f) plen 4
    Unknown (0x00|0x0000) status 0x00 ncmd 1
> HCI Event: Read Remote Supported Features (0x0b) plen 11
    status 0x00 handle 70
    Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
< HCI Command: Read Remote Extended Features (0x01|0x001c) plen 3
    handle 70 page 1
> HCI Event: Command Status (0x0f) plen 4
    Read Remote Extended Features (0x01|0x001c) status 0x00 ncmd 1
> HCI Event: Read Remote Extended Features (0x23) plen 13
    status 0x00 handle 70 page 1 max 1
    Features: 0x07 0x00 0x00 0x00 0x00 0x00 0x00 0x00
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
    bdaddr 40:E2:30:3C:4F:7F mode 2 clkoffset 0x0000
< ACL data: handle 70 flags 0x00 dlen 10
    L2CAP(s): Info req: type 2
> HCI Event: Command Status (0x0f) plen 4
    Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
> ACL data: handle 70 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 1 scid 0x0040
< ACL data: handle 70 flags 0x00 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 1 status 0
      Connection pending - No futher information available
< ACL data: handle 70 flags 0x00 dlen 10
    L2CAP(s): Info req: type 2
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 70 packets 1
> ACL data: handle 70 flags 0x02 dlen 16
    L2CAP(s): Info rsp: type 2 result 0
      Extended feature mask 0x00b8
        Enhanced Retransmission mode
        Streaming mode
        FCS Option
        Fixed Channels
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 70 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 70 packets 1
> ACL data: handle 70 flags 0x02 dlen 16
    L2CAP(s): Info rsp: type 2 result 0
      Extended feature mask 0x00b8
        Enhanced Retransmission mode
        Streaming mode
        FCS Option
        Fixed Channels
< ACL data: handle 70 flags 0x00 dlen 10
    L2CAP(s): Info req: type 3
> ACL data: handle 70 flags 0x02 dlen 20
    L2CAP(s): Info rsp: type 3 result 0
      Fixed channel list 0x00000072
        L2CAP Signalling Channel
< ACL data: handle 70 flags 0x00 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 0 status 0
      Connection successful
< ACL data: handle 70 flags 0x00 dlen 27
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 15
      MTU 1024 
      RFC 0x00 (Basic) 
> ACL data: handle 70 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
      MTU 1024 
< ACL data: handle 70 flags 0x00 dlen 18
    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 4
      MTU 1024 
> ACL data: handle 70 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
      Success
< HCI Command: Create Connection (0x01|0x0005) plen 13
    bdaddr 00:00:00:00:00:00 ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5 
> ACL data: handle 70 flags 0x02 dlen 24
    L2CAP(d): cid 0x0040 len 20 [psm 1]
        SDP SSA Req: tid 0x0 len 0xf
          pat uuid-16 0x0100 (L2CAP)
          max 1016
          aid(s) 0x0000 - 0xffff
          cont 00
< ACL data: handle 70 flags 0x00 dlen 310
< ACL data: handle 70 flags 0x01 dlen 38
    L2CAP(d): cid 0x0040 len 344 [psm 1]
        SDP SSA Rsp: tid 0x1 len 0x153
          count 336
          record #0
              aid 0x0000 (SrvRecHndl)
                 uint 0x10005
              aid 0x0001 (SrvClassIDList)
                 < uuid-16 0x110a (AudioSource) >
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) uint 0x19 > <
                 uuid-16 0x0019 (AVDTP) uint 0x102 > >
              aid 0x0009 (BTProfileDescList)
                 < < uuid-16 0x110d (AdvAudio) uint 0x102 > >
          record #1
              aid 0x0000 (SrvRecHndl)
                 uint 0x10006
              aid 0x0001 (SrvClassIDList)
                 < uuid-16 0x110b (AudioSink) >
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) uint 0x19 > <
                 uuid-16 0x0019 (AVDTP) uint 0x102 > >
              aid 0x0009 (BTProfileDescList)
                 < < uuid-16 0x110d (AdvAudio) uint 0x102 > >
          record #2
              aid 0x0000 (SrvRecHndl)
                 uint 0x10007
              aid 0x0001 (SrvClassIDList)
                 < uuid-16 0x110e (AVRemote) uuid-16 0x110f (VideoConf) >
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) uint 0x17 > <
                 uuid-16 0x0017 (AVCTP) uint 0x103 > >
              aid 0x0009 (BTProfileDescList)
                 < < uuid-16 0x110e (AVRemote) uint 0x104 > >
              aid 0x0311 (SuppFeatures)
                 uint 0x2
          record #3
              aid 0x0000 (SrvRecHndl)
                 uint 0x10008
              aid 0x0001 (SrvClassIDList)
                 < uuid-16 0x110c (AVRemTarget) >
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) uint 0x17 > <
                 uuid-16 0x0017 (AVCTP) uint 0x103 > >
              aid 0x0009 (BTProfileDescList)
                 < < uuid-16 0x110e (AVRemote) uint 0x104 > >
              aid 0x000d (AdditionalProtocolDescLists)
                 < < uuid-16 0x0100 (L2CAP) uint 0x1b > < uuid-16 0x0017 (AVCTP) uint 0x103 > >
              aid 0x0311 (SuppFeatures)
                 uint 0x1
          record #4
              aid 0x0000 (SrvRecHndl)
                 uint 0x1000a
              aid 0x0001 (SrvClassIDList)
                 < uuid-16 0x1200 (PNPInfo) >
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) uint 0x1 > <
                 uuid-16 0x0001 (SDP) > >
              aid 0x0009 (BTProfileDescList)
                 < < uuid-16 0x1200 (PNPInfo) uint 0x103 > >
              aid 0x0200 (VersionNumList)
                 uint 0x103
              aid 0x0201 (SrvDBState)
                 uint 0x54c
              aid 0x0202 (unknown)
                 uint 0x81f
              aid 0x0203 (unknown)
                 uint 0x100
              aid 0x0204 (unknown)
                 bool 0x1
              aid 0x0205 (unknown)
                 uint 0x2
          cont 00
> HCI Event: Remote Name Req Complete (0x07) plen 255
    status 0x00 bdaddr 40:E2:30:3C:4F:7F name 'TRC'
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 70 packets 1
> HCI Event: Command Status (0x0f) plen 4
    Create Connection (0x01|0x0005) status 0x00 ncmd 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 70 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 70 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 70 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 70 packets 2
> HCI Event: IO Capability Response (0x32) plen 9
    bdaddr 40:E2:30:3C:4F:7F capability 0x01 oob 0x00 auth 0x05
    Capability: DisplayYesNo (OOB data not present)
    Authentication: General Bonding (MITM Protection)
> HCI Event: IO Capability Request (0x31) plen 6
    bdaddr 40:E2:30:3C:4F:7F
< HCI Command: IO Capability Request Reply (0x01|0x002b) plen 9
    bdaddr 40:E2:30:3C:4F:7F capability 0x03 oob 0x00 auth 0x04
    Capability: NoInputNoOutput (OOB data not present)
    Authentication: General Bonding (No MITM Protection)
> HCI Event: Command Complete (0x0e) plen 10
    IO Capability Request Reply (0x01|0x002b) ncmd 1
    status 0x00 bdaddr 40:E2:30:3C:4F:7F
> HCI Event: Connect Complete (0x03) plen 11
    status 0x04 handle 0 bdaddr 00:00:00:00:00:00 type ACL encrypt 0x00
    Error: Page Timeout
> HCI Event: User Confirmation Request (0x33) plen 10
    bdaddr 40:E2:30:3C:4F:7F passkey 123558
< HCI Command: User Confirmation Request Reply (0x01|0x002c) plen 6
    bdaddr 40:E2:30:3C:4F:7F
> HCI Event: Command Complete (0x0e) plen 10
    User Confirmation Request Reply (0x01|0x002c) ncmd 1
    status 0x00 bdaddr 40:E2:30:3C:4F:7F
> HCI Event: Simple Pairing Complete (0x36) plen 7
    status 0x00 bdaddr 40:E2:30:3C:4F:7F
> HCI Event: Link Key Notification (0x18) plen 23
    bdaddr 40:E2:30:3C:4F:7F key BF233748D4641B5C3F562F00F8A950A8 type 4
    Type: Unauthenticated Combination Key
> HCI Event: Encrypt Change (0x08) plen 4
    status 0x00 handle 70 encrypt 0x01
< HCI Command: Read Encryption Key Size (0x05|0x0008) plen 2
> ACL data: handle 70 flags 0x02 dlen 24
    L2CAP(d): cid 0x0040 len 20 [psm 1]
        SDP SSA Req: tid 0x1 len 0xf
          pat uuid-16 0x0100 (L2CAP)
          max 1016
          aid(s) 0x0000 - 0xffff
          cont 00
< ACL data: handle 70 flags 0x00 dlen 310
< ACL data: handle 70 flags 0x01 dlen 38
    L2CAP(d): cid 0x0040 len 344 [psm 1]
        SDP SSA Rsp: tid 0x1 len 0x153
          count 336
          record #0
              aid 0x0000 (SrvRecHndl)
                 uint 0x10005
              aid 0x0001 (SrvClassIDList)
                 < uuid-16 0x110a (AudioSource) >
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) uint 0x19 > <
                 uuid-16 0x0019 (AVDTP) uint 0x102 > >
              aid 0x0009 (BTProfileDescList)
                 < < uuid-16 0x110d (AdvAudio) uint 0x102 > >
          record #1
              aid 0x0000 (SrvRecHndl)
                 uint 0x10006
              aid 0x0001 (SrvClassIDList)
                 < uuid-16 0x110b (AudioSink) >
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) uint 0x19 > <
                 uuid-16 0x0019 (AVDTP) uint 0x102 > >
              aid 0x0009 (BTProfileDescList)
                 < < uuid-16 0x110d (AdvAudio) uint 0x102 > >
          record #2
              aid 0x0000 (SrvRecHndl)
                 uint 0x10007
              aid 0x0001 (SrvClassIDList)
                 < uuid-16 0x110e (AVRemote) uuid-16 0x110f (VideoConf) >
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) uint 0x17 > <
                 uuid-16 0x0017 (AVCTP) uint 0x103 > >
              aid 0x0009 (BTProfileDescList)
                 < < uuid-16 0x110e (AVRemote) uint 0x104 > >
              aid 0x0311 (SuppFeatures)
                 uint 0x2
          record #3
              aid 0x0000 (SrvRecHndl)
                 uint 0x10008
              aid 0x0001 (SrvClassIDList)
                 < uuid-16 0x110c (AVRemTarget) >
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) uint 0x17 > <
                 uuid-16 0x0017 (AVCTP) uint 0x103 > >
              aid 0x0009 (BTProfileDescList)
                 < < uuid-16 0x110e (AVRemote) uint 0x104 > >
              aid 0x000d (AdditionalProtocolDescLists)
                 < < uuid-16 0x0100 (L2CAP) uint 0x1b > < uuid-16 0x0017 (AVCTP) uint 0x103 > >
              aid 0x0311 (SuppFeatures)
                 uint 0x1
          record #4
              aid 0x0000 (SrvRecHndl)
                 uint 0x1000a
              aid 0x0001 (SrvClassIDList)
                 < uuid-16 0x1200 (PNPInfo) >
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) uint 0x1 > <
                 uuid-16 0x0001 (SDP) > >
              aid 0x0009 (BTProfileDescList)
                 < < uuid-16 0x1200 (PNPInfo) uint 0x103 > >
              aid 0x0200 (VersionNumList)
                 uint 0x103
              aid 0x0201 (SrvDBState)
                 uint 0x54c
              aid 0x0202 (unknown)
                 uint 0x81f
              aid 0x0203 (unknown)
                 uint 0x100
              aid 0x0204 (unknown)
                 bool 0x1
              aid 0x0205 (unknown)
                 uint 0x2
          cont 00
> HCI Event: Command Complete (0x0e) plen 7
    Read Encryption Key Size (0x05|0x0008) ncmd 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 70 packets 2
> ACL data: handle 70 flags 0x02 dlen 12
    L2CAP(s): Disconn req: dcid 0x0040 scid 0x0040
< ACL data: handle 70 flags 0x00 dlen 12
    L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0040
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 70 packets 1
> ACL data: handle 70 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 25 scid 0x0041
< ACL data: handle 70 flags 0x00 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0000 scid 0x0041 result 2 status 0
      Connection refused - PSM not supported
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 70 packets 1
> ACL data: handle 70 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 23 scid 0x0042
< ACL data: handle 70 flags 0x00 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0000 scid 0x0042 result 2 status 0
      Connection refused - PSM not supported
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 70 packets 1
< HCI Command: Disconnect (0x01|0x0006) plen 3
    handle 70 reason 0x13
    Reason: Remote User Terminated Connection
> HCI Event: Command Status (0x0f) plen 4
    Disconnect (0x01|0x0006) status 0x00 ncmd 1
> HCI Event: Disconn Complete (0x05) plen 4
    status 0x00 handle 70 reason 0x16
    Reason: Connection Terminated by Local Host

Code: Select all

ubuntu@ubuntu-ThinkPad-T60:/$ gimx --type DS4 --config X360PadUsb.xml --bdaddr 40:E2:30:3C4F:7F --hci 0 --nograb --status
option -t with value `DS4'
option -c with value `X360PadUsb.xml'
option -b with value `40:E2:30:3C4F:7F'
option -h with value `0'
grab flag is unset
status flag is set
using default refresh period: 10.00ms
Warning: can't open macro directory /home/ubuntu//.gimx//macros/
listening on psm: 0x0001
listening on psm: 0x0011
listening on psm: 0x0013
accepted connection from 40:E2:30:3C:4F:7F (psm: 0x0001)
connecting with hci0 = 00:1B:DC:06:69:A9 to 40:E2:30:3C4F:7F psm 0x0011
connecting with hci0 = 00:1B:DC:06:69:A9 to 40:E2:30:3C4F:7F psm 0x0013
connection failed: Host is down
can't connect to psm 0x0011
connection failed: Host is down
can't connect to psm 0x0013


New dongle

Code: Select all

Bus 004 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

Code: Select all

root@ubuntu-ThinkPad-T60:~# hciconfig -a
hci0:	Type: BR/EDR  Bus: USB
	BD Address: 00:1B:DC:06:69:A9  ACL MTU: 310:10  SCO MTU: 64:8
	UP RUNNING PSCAN ISCAN 
	RX bytes:11057 acl:96 sco:0 events:343 errors:0
	TX bytes:7392 acl:106 sco:0 commands:144 errors:0
	Features: 0xff 0xff 0x8f 0xfe 0xdb 0xff 0x5b 0x87
	Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
	Link policy: RSWITCH HOLD SNIFF PARK 
	Link mode: SLAVE ACCEPT 
	Name: 'Wireless Controller'
	Class: 0x002508
	Service Classes: Unspecified
	Device Class: Peripheral, Gamepad
	HCI Version: 4.0 (0x6)  Revision: 0x22bb
	LMP Version: 4.0 (0x6)  Subversion: 0x22bb
	Manufacturer: Cambridge Silicon Radio (10)
Standard

Code: Select all

root@ubuntu-ThinkPad-T60:~# hciconfig -a
hci0:	Type: BR/EDR  Bus: USB
	BD Address: 00:1B:DC:06:69:A9  ACL MTU: 310:10  SCO MTU: 64:8
	UP RUNNING PSCAN ISCAN 
	RX bytes:11370 acl:96 sco:0 events:352 errors:0
	TX bytes:8187 acl:106 sco:0 commands:153 errors:0
	Features: 0xff 0xff 0x8f 0xfe 0xdb 0xff 0x5b 0x87
	Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
	Link policy: RSWITCH HOLD SNIFF PARK 
	Link mode: SLAVE ACCEPT 
	Name: 'ubuntu-0'
	Class: 0x640100
	Service Classes: Rendering, Audio, Telephony
	Device Class: Computer, Uncategorized
	HCI Version: 4.0 (0x6)  Revision: 0x22bb
	LMP Version: 4.0 (0x6)  Subversion: 0x22bb
	Manufacturer: Cambridge Silicon Radio (10)


Last edited by trcsoftware on Sat Apr 16, 2016 10:12 pm, edited 1 time in total.
trcsoftware
Posts: 8
Joined: Wed Apr 13, 2016 9:34 am

Re: Usage of XBOX360 Wireless Controller as Android BT GameP

Post by trcsoftware »

Bluefritz (Bluesoleil stack)

Before paired without GIMX and copied the linkkeys

Code: Select all

root@ubuntu-ThinkPad-T60:~# hcidump
HCI sniffer - Bluetooth packet analyzer ver 2.5
device: hci0 snap_len: 1500 filter: 0xffffffff
< HCI Command: Read Local Name (0x03|0x0014) plen 0
> HCI Event: Command Complete (0x0e) plen 252
    Read Local Name (0x03|0x0014) ncmd 1
    status 0x00 name 'Wireless Controller'
< HCI Command: Read Class of Device (0x03|0x0023) plen 0
> HCI Event: Command Complete (0x0e) plen 7
    Read Class of Device (0x03|0x0023) ncmd 1
    status 0x00 class 0x002508
< HCI Command: Read Local Version Information (0x04|0x0001) plen 0
> HCI Event: Command Complete (0x0e) plen 12
    Read Local Version Information (0x04|0x0001) ncmd 1
    status 0x00
    HCI Version: 4.0 (0x6) HCI Revision: 0x22bb
    LMP Version: 4.0 (0x6) LMP Subversion: 0x22bb
    Manufacturer: Cambridge Silicon Radio (10)
> HCI Event: Connect Request (0x04) plen 10
    bdaddr 00:04:0E:89:B9:09 class 0x120104 type ACL
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
    bdaddr 00:04:0E:89:B9:09 role 0x01
    Role: Slave
> HCI Event: Command Status (0x0f) plen 4
    Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1
> HCI Event: Connect Complete (0x03) plen 11
    status 0x00 handle 71 bdaddr 00:04:0E:89:B9:09 type ACL encrypt 0x00
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
    handle 71
> HCI Event: Page Scan Repetition Mode Change (0x20) plen 7
    bdaddr 00:04:0E:89:B9:09 mode 1
> HCI Event: Command Status (0x0f) plen 4
    Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 0
> HCI Event: Max Slots Change (0x1b) plen 3
    handle 71 slots 5
> HCI Event: Command Status (0x0f) plen 4
    Unknown (0x00|0x0000) status 0x00 ncmd 1
> HCI Event: Read Remote Supported Features (0x0b) plen 11
    status 0x00 handle 71
    Features: 0xff 0xff 0x05 0x00 0x00 0x00 0x00 0x00
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
    bdaddr 00:04:0E:89:B9:09 mode 2 clkoffset 0x0000
< ACL data: handle 71 flags 0x00 dlen 10
    L2CAP(s): Info req: type 2
> HCI Event: Command Status (0x0f) plen 4
    Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 71 packets 1
> ACL data: handle 71 flags 0x02 dlen 10
    L2CAP(s): Info req: type 2
< ACL data: handle 71 flags 0x00 dlen 16
    L2CAP(s): Info rsp: type 2 result 0
      Extended feature mask 0x02b8
        Enhanced Retransmission mode
        Streaming mode
        FCS Option
        Fixed Channels
        Unicast Connectless Data Reception
> ACL data: handle 71 flags 0x02 dlen 16
    L2CAP(s): Info rsp: type 2 result 0
      Extended feature mask 0x01bc
        Bi-directional QoS
        Enhanced Retransmission mode
        Streaming mode
        FCS Option
        Fixed Channels
        Extended Window Size
< ACL data: handle 71 flags 0x00 dlen 10
    L2CAP(s): Info req: type 3
> ACL data: handle 71 flags 0x02 dlen 10
    L2CAP(s): Info req: type 3
< ACL data: handle 71 flags 0x00 dlen 20
    L2CAP(s): Info rsp: type 3 result 0
      Fixed channel list 0x00000006
        L2CAP Signalling Channel
        L2CAP Connless
> ACL data: handle 71 flags 0x02 dlen 20
    L2CAP(s): Info rsp: type 3 result 0
      Fixed channel list 0x0000007a
        L2CAP Signalling Channel
        AMP Manager Protocol
> ACL data: handle 71 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 1 scid 0x0042
< ACL data: handle 71 flags 0x00 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0042 result 0 status 0
      Connection successful
< ACL data: handle 71 flags 0x00 dlen 27
    L2CAP(s): Config req: dcid 0x0042 flags 0x00 clen 15
      MTU 1024 
      RFC 0x00 (Basic) 
> ACL data: handle 71 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
      MTU 1024 
< ACL data: handle 71 flags 0x00 dlen 18
    L2CAP(s): Config rsp: scid 0x0042 flags 0x00 result 0 clen 4
      MTU 1024 
> ACL data: handle 71 flags 0x02 dlen 29
    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 15
      MTU 1024 
      RFC 0x00 (Basic) 
> HCI Event: Remote Name Req Complete (0x07) plen 255
    status 0x00 bdaddr 00:04:0E:89:B9:09 name 'TRC-Hama'
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 71 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 71 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 71 packets 1
> ACL data: handle 71 flags 0x02 dlen 17
    L2CAP(d): cid 0x0040 len 13 [psm 1]
        SDP SS Req: tid 0x0 len 0x8
          pat uuid-16 0x0100 (L2CAP)
          max 64
          cont 00
< ACL data: handle 71 flags 0x00 dlen 310
< ACL data: handle 71 flags 0x01 dlen 310
< ACL data: handle 71 flags 0x01 dlen 92
    L2CAP(d): cid 0x0042 len 708 [psm 1]
        SDP SSA Rsp: tid 0x1 len 0x2bf
          count 700
          record #0
              aid 0x0000 (SrvRecHndl)
                 uint 0x10001
              aid 0x0001 (SrvClassIDList)
                 < uuid-16 0x1124 (HID) >
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) uint 0x11 > <
                 uuid-16 0x0011 (HIDP) > >
              aid 0x0006 (LangBaseAttrIDList)
                 < uint 0x656e uint 0x6a uint 0x100 >
              aid 0x0009 (BTProfileDescList)
                 < < uuid-16 0x1124 (HID) uint 0x100 > >
              aid 0x000d (AdditionalProtocolDescLists)
                 < < < uuid-16 0x0100 (L2CAP) uint 0x13 > < uuid-16 0x0011 (HIDP) > > >
              aid 0x0100 (SrvName)
                 str "Wireless Controller"
              aid 0x0101 (SrvDesc)
                 str "Game Controller"
              aid 0x0102 (ProviderName)
                 str "Sony Computer Entertainment"
              aid 0x0200 (VersionNumList)
                 uint 0x100
              aid 0x0201 (SrvDBState)
                 uint 0x111
              aid 0x0202 (unknown)
                 uint 0x8
              aid 0x0203 (unknown)
                 uint 0x0
              aid 0x0204 (unknown)
                 bool 0x0
              aid 0x0205 (unknown)
                 bool 0x1
              aid 0x0206 (unknown)
                 < < uint 0x22 str 05 01 09 05 a1 01 85 01 09 30 09 31 09 32 09 35 15 00 26 ff 00 75 08 95 04 81 02 09 39 15 00 25 07 75 04 95 01 81 42 05 09 19 01 29 0e 15 00 25 01 75 01 95 0e 81 02 75 06 95 01 81 01 05 01 09 33 09 34 15 00 26 ff 00 75 08 95 02 81 02 06 04 ff 85 02 09 24 95 24 b1 02 85 a3 09 25 95 30 b1 02 85 05 09 26 95 28 b1 02 85 06 09 27 95 34 b1 02 85 07 09 28 95 30 b1 02 85 08 09 29 95 2f b1 02 06 03 ff 85 03 09 21 95 26 b1 02 85 04 09 22 95 2e b1 02 85 f0 09 47 95 3f b1 02 85 f1 09 48 95 3f b1 02 85 f2 09 49 95 0f b1 02 06 00 ff 85 11 09 20 15 00 26 ff 00 75 08 95 4d 81 02 09 21 91 02 85 12 09 22 95 8d 81 02 09 23 91 02 85 13 09 24 95 cd 81 02 09 25 91 02 85 14 09 26 96 0d 01 81 02 09 27 91 02 85 15 09 28 96 4d 01 81 02 09 29 91 02 85 16 09 2a 96 8d 01 81 02 09 2b 91 02 85 17 09 2c 96 cd 01 81 02 09 2d 91 02 85 18 09 2e 96 0d 02 81 02 09 2f 91 02 85 19 09 30 96 22 02 81 02 09 31 91 02 06 80 ff 85 82 09 22 95 3f b1 02 85 83 09 23 b1 02 85 84 09 24 b1 02 85 90 09 30 b1 02 85 91 09 31 b1 02 85 92 09 32 b1 02 85 93 09 33 b1 02 85 a0 09 40 b1 02 85 a4 09 44 b1 02 c0 > >
              aid 0x0207 (unknown)
                 < < uint 0x409 uint 0x100 > >
              aid 0x0208 (unknown)
                 bool 0x0
              aid 0x0209 (unknown)
                 bool 0x1
              aid 0x020a (unknown)
                 bool 0x1
              aid 0x020b (unknown)
                 uint 0x100
              aid 0x020c (unknown)
                 uint 0x1f40
              aid 0x020d (unknown)
                 bool 0x0
              aid 0x020e (unknown)
                 bool 0x0
          record #1
              aid 0x0000 (SrvRecHndl)
                 uint 0x10002
              aid 0x0001 (SrvClassIDList)
                 < uuid-16 0x1200 (PNPInfo) >
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) uint 0x1 > <
                 uuid-16 0x0001 (SDP) > >
              aid 0x0009 (BTProfileDescList)
                 < < uuid-16 0x1200 (PNPInfo) uint 0x103 > >
              aid 0x0200 (VersionNumList)
                 uint 0x103
              aid 0x0201 (SrvDBState)
                 uint 0x54c
              aid 0x0202 (unknown)
                 uint 0x5c4
              aid 0x0203 (unknown)
                 uint 0x100
              aid 0x0204 (unknown)
                 bool 0x1
              aid 0x0205 (unknown)
                 uint 0x2
          cont 00
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 71 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 71 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 71 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 71 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 71 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 71 packets 1
> ACL data: handle 71 flags 0x02 dlen 12
    L2CAP(s): Disconn req: dcid 0x0040 scid 0x0042
< ACL data: handle 71 flags 0x00 dlen 12
    L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0042
< HCI Command: Authentication Requested (0x01|0x0011) plen 2
    handle 71
> HCI Event: Command Status (0x0f) plen 4
    Authentication Requested (0x01|0x0011) status 0x00 ncmd 1
> HCI Event: Link Key Request (0x17) plen 6
    bdaddr 00:04:0E:89:B9:09
< HCI Command: Link Key Request Negative Reply (0x01|0x000c) plen 6
    bdaddr 00:04:0E:89:B9:09
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 71 packets 1
> HCI Event: Command Complete (0x0e) plen 10
    Link Key Request Negative Reply (0x01|0x000c) ncmd 1
    status 0x00 bdaddr 00:04:0E:89:B9:09
> HCI Event: PIN Code Request (0x16) plen 6
    bdaddr 00:04:0E:89:B9:09
> HCI Event: Auth Complete (0x06) plen 3
    status 0x13 handle 71
    Error: Remote User Terminated Connection
> HCI Event: Disconn Complete (0x05) plen 4
    status 0x00 handle 71 reason 0x13
    Reason: Remote User Terminated Connection

Code: Select all

ubuntu@ubuntu-ThinkPad-T60:/$ gimx --type DS4 --config X360PadUsb.xml --bdaddr 00:04:0E:89:B9:09 --hci 0 --nograb --status
option -t with value `DS4'
option -c with value `X360PadUsb.xml'
option -b with value `00:04:0E:89:B9:09'
option -h with value `0'
grab flag is unset
status flag is set
using default refresh period: 10.00ms
Warning: can't open macro directory /home/ubuntu//.gimx//macros/
listening on psm: 0x0001
listening on psm: 0x0011
listening on psm: 0x0013
accepted connection from 00:04:0E:89:B9:09 (psm: 0x0001)
hci_open_dev: No such device
connecting with hci0 = 00:1B:DC:06:69:A9 to 00:04:0E:89:B9:09 psm 0x0011
connecting with hci0 = 00:1B:DC:06:69:A9 to 00:04:0E:89:B9:09 psm 0x0013
connection failed: Connection reset by peer
can't connect to psm 0x0013


Below is the Pairing attempt this fails while the PIN entry

Code: Select all

> HCI Event: Connect Request (0x04) plen 10
    bdaddr 00:04:0E:89:B9:09 class 0x120104 type ACL
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
    bdaddr 00:04:0E:89:B9:09 role 0x01
    Role: Slave
> HCI Event: Command Status (0x0f) plen 4
    Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1
> HCI Event: Connect Complete (0x03) plen 11
    status 0x00 handle 71 bdaddr 00:04:0E:89:B9:09 type ACL encrypt 0x00
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
    handle 71
> HCI Event: Page Scan Repetition Mode Change (0x20) plen 7
    bdaddr 00:04:0E:89:B9:09 mode 1
> HCI Event: Max Slots Change (0x1b) plen 3
    handle 71 slots 5
> HCI Event: Command Status (0x0f) plen 4
    Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 0
> HCI Event: Command Status (0x0f) plen 4
    Unknown (0x00|0x0000) status 0x00 ncmd 1
> HCI Event: Read Remote Supported Features (0x0b) plen 11
    status 0x00 handle 71
    Features: 0xff 0xff 0x05 0x00 0x00 0x00 0x00 0x00
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
    bdaddr 00:04:0E:89:B9:09 mode 2 clkoffset 0x0000
< ACL data: handle 71 flags 0x00 dlen 10
    L2CAP(s): Info req: type 2
> HCI Event: Command Status (0x0f) plen 4
    Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
> ACL data: handle 71 flags 0x02 dlen 10
    L2CAP(s): Info req: type 2
< ACL data: handle 71 flags 0x00 dlen 16
    L2CAP(s): Info rsp: type 2 result 0
      Extended feature mask 0x02b8
        Enhanced Retransmission mode
        Streaming mode
        FCS Option
        Fixed Channels
        Unicast Connectless Data Reception
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 71 packets 1
> ACL data: handle 71 flags 0x02 dlen 16
    L2CAP(s): Info rsp: type 2 result 0
      Extended feature mask 0x01bc
        Bi-directional QoS
        Enhanced Retransmission mode
        Streaming mode
        FCS Option
        Fixed Channels
        Extended Window Size
< ACL data: handle 71 flags 0x00 dlen 10
    L2CAP(s): Info req: type 3
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 71 packets 1
> ACL data: handle 71 flags 0x02 dlen 10
    L2CAP(s): Info req: type 3
< ACL data: handle 71 flags 0x00 dlen 20
    L2CAP(s): Info rsp: type 3 result 0
      Fixed channel list 0x00000006
        L2CAP Signalling Channel
        L2CAP Connless
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 71 packets 1
> ACL data: handle 71 flags 0x02 dlen 20
    L2CAP(s): Info rsp: type 3 result 0
      Fixed channel list 0x0000007a
        L2CAP Signalling Channel
        AMP Manager Protocol
> ACL data: handle 71 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 1 scid 0x0049
< ACL data: handle 71 flags 0x00 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0049 result 0 status 0
      Connection successful
< ACL data: handle 71 flags 0x00 dlen 27
    L2CAP(s): Config req: dcid 0x0049 flags 0x00 clen 15
      MTU 1024 
      RFC 0x00 (Basic) 
> ACL data: handle 71 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
      MTU 1024 
< ACL data: handle 71 flags 0x00 dlen 18
    L2CAP(s): Config rsp: scid 0x0049 flags 0x00 result 0 clen 4
      MTU 1024 
> ACL data: handle 71 flags 0x02 dlen 29
    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 15
      MTU 1024 
      RFC 0x00 (Basic) 
> ACL data: handle 71 flags 0x02 dlen 17
    L2CAP(d): cid 0x0040 len 13 [psm 1]
        SDP SS Req: tid 0x0 len 0x8
          pat uuid-16 0x0100 (L2CAP)
          max 64
          cont 00
< ACL data: handle 71 flags 0x00 dlen 310
< ACL data: handle 71 flags 0x01 dlen 310
< ACL data: handle 71 flags 0x01 dlen 92
    L2CAP(d): cid 0x0049 len 708 [psm 1]
        SDP SSA Rsp: tid 0x1 len 0x2bf
          count 700
          record #0
              aid 0x0000 (SrvRecHndl)
                 uint 0x10001
              aid 0x0001 (SrvClassIDList)
                 < uuid-16 0x1124 (HID) >
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) uint 0x11 > <
                 uuid-16 0x0011 (HIDP) > >
              aid 0x0006 (LangBaseAttrIDList)
                 < uint 0x656e uint 0x6a uint 0x100 >
              aid 0x0009 (BTProfileDescList)
                 < < uuid-16 0x1124 (HID) uint 0x100 > >
              aid 0x000d (AdditionalProtocolDescLists)
                 < < < uuid-16 0x0100 (L2CAP) uint 0x13 > < uuid-16 0x0011 (HIDP) > > >
              aid 0x0100 (SrvName)
                 str "Wireless Controller"
              aid 0x0101 (SrvDesc)
                 str "Game Controller"
              aid 0x0102 (ProviderName)
                 str "Sony Computer Entertainment"
              aid 0x0200 (VersionNumList)
                 uint 0x100
              aid 0x0201 (SrvDBState)
                 uint 0x111
              aid 0x0202 (unknown)
                 uint 0x8
              aid 0x0203 (unknown)
                 uint 0x0
              aid 0x0204 (unknown)
                 bool 0x0
              aid 0x0205 (unknown)
                 bool 0x1
              aid 0x0206 (unknown)
                 < < uint 0x22 str 05 01 09 05 a1 01 85 01 09 30 09 31 09 32 09 35 15 00 26 ff 00 75 08 95 04 81 02 09 39 15 00 25 07 75 04 95 01 81 42 05 09 19 01 29 0e 15 00 25 01 75 01 95 0e 81 02 75 06 95 01 81 01 05 01 09 33 09 34 15 00 26 ff 00 75 08 95 02 81 02 06 04 ff 85 02 09 24 95 24 b1 02 85 a3 09 25 95 30 b1 02 85 05 09 26 95 28 b1 02 85 06 09 27 95 34 b1 02 85 07 09 28 95 30 b1 02 85 08 09 29 95 2f b1 02 06 03 ff 85 03 09 21 95 26 b1 02 85 04 09 22 95 2e b1 02 85 f0 09 47 95 3f b1 02 85 f1 09 48 95 3f b1 02 85 f2 09 49 95 0f b1 02 06 00 ff 85 11 09 20 15 00 26 ff 00 75 08 95 4d 81 02 09 21 91 02 85 12 09 22 95 8d 81 02 09 23 91 02 85 13 09 24 95 cd 81 02 09 25 91 02 85 14 09 26 96 0d 01 81 02 09 27 91 02 85 15 09 28 96 4d 01 81 02 09 29 91 02 85 16 09 2a 96 8d 01 81 02 09 2b 91 02 85 17 09 2c 96 cd 01 81 02 09 2d 91 02 85 18 09 2e 96 0d 02 81 02 09 2f 91 02 85 19 09 30 96 22 02 81 02 09 31 91 02 06 80 ff 85 82 09 22 95 3f b1 02 85 83 09 23 b1 02 85 84 09 24 b1 02 85 90 09 30 b1 02 85 91 09 31 b1 02 85 92 09 32 b1 02 85 93 09 33 b1 02 85 a0 09 40 b1 02 85 a4 09 44 b1 02 c0 > >
              aid 0x0207 (unknown)
                 < < uint 0x409 uint 0x100 > >
              aid 0x0208 (unknown)
                 bool 0x0
              aid 0x0209 (unknown)
                 bool 0x1
              aid 0x020a (unknown)
                 bool 0x1
              aid 0x020b (unknown)
                 uint 0x100
              aid 0x020c (unknown)
                 uint 0x1f40
              aid 0x020d (unknown)
                 bool 0x0
              aid 0x020e (unknown)
                 bool 0x0
          record #1
              aid 0x0000 (SrvRecHndl)
                 uint 0x10002
              aid 0x0001 (SrvClassIDList)
                 < uuid-16 0x1200 (PNPInfo) >
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) uint 0x1 > <
                 uuid-16 0x0001 (SDP) > >
              aid 0x0009 (BTProfileDescList)
                 < < uuid-16 0x1200 (PNPInfo) uint 0x103 > >
              aid 0x0200 (VersionNumList)
                 uint 0x103
              aid 0x0201 (SrvDBState)
                 uint 0x54c
              aid 0x0202 (unknown)
                 uint 0x5c4
              aid 0x0203 (unknown)
                 uint 0x100
              aid 0x0204 (unknown)
                 bool 0x1
              aid 0x0205 (unknown)
                 uint 0x2
          cont 00
> HCI Event: Remote Name Req Complete (0x07) plen 255
    status 0x00 bdaddr 00:04:0E:89:B9:09 name 'TRC-Blue'
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 71 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 71 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 71 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 71 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 71 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 71 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 71 packets 1
> ACL data: handle 71 flags 0x02 dlen 12
    L2CAP(s): Disconn req: dcid 0x0040 scid 0x0049
< ACL data: handle 71 flags 0x00 dlen 12
    L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0049
< HCI Command: Authentication Requested (0x01|0x0011) plen 2
    handle 71
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 71 packets 1
> HCI Event: Command Status (0x0f) plen 4
    Authentication Requested (0x01|0x0011) status 0x00 ncmd 1
> HCI Event: Link Key Request (0x17) plen 6
    bdaddr 00:04:0E:89:B9:09
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
    bdaddr 00:04:0E:89:B9:09 key 46618D4EA31A55508088D96DB5EA9FA2
> HCI Event: Command Complete (0x0e) plen 10
    Link Key Request Reply (0x01|0x000b) ncmd 1
    status 0x00 bdaddr 00:04:0E:89:B9:09
> HCI Event: Auth Complete (0x06) plen 3
    status 0x00 handle 71
< HCI Command: Set Connection Encryption (0x01|0x0013) plen 3
    handle 71 encrypt 0x01
> HCI Event: Command Status (0x0f) plen 4
    Set Connection Encryption (0x01|0x0013) status 0x00 ncmd 1
> HCI Event: Encrypt Change (0x08) plen 4
    status 0x00 handle 71 encrypt 0x01
< HCI Command: Read Encryption Key Size (0x05|0x0008) plen 2
> HCI Event: Command Complete (0x0e) plen 7
    Read Encryption Key Size (0x05|0x0008) ncmd 1
< ACL data: handle 71 flags 0x00 dlen 12
    L2CAP(s): Connect req: psm 19 scid 0x0041
< ACL data: handle 71 flags 0x00 dlen 12
    L2CAP(s): Connect req: psm 17 scid 0x0040
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 71 packets 1
> ACL data: handle 71 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x004a scid 0x0041 result 4 status 0
      Connection refused - no resources available
> ACL data: handle 71 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x004b scid 0x0040 result 4 status 0
      Connection refused - no resources available
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 71 packets 1
< HCI Command: Disconnect (0x01|0x0006) plen 3
    handle 71 reason 0x13
    Reason: Remote User Terminated Connection
> HCI Event: Command Status (0x0f) plen 4
    Disconnect (0x01|0x0006) status 0x00 ncmd 1
> HCI Event: Disconn Complete (0x05) plen 4
    status 0x00 handle 71 reason 0x16
    Reason: Connection Terminated by Local Host
> HCI Event: Connect Request (0x04) plen 10
    bdaddr 00:04:0E:89:B9:09 class 0x120104 type ACL
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
    bdaddr 00:04:0E:89:B9:09 role 0x01
    Role: Slave
> HCI Event: Command Status (0x0f) plen 4
    Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1
> HCI Event: Connect Complete (0x03) plen 11
    status 0x00 handle 70 bdaddr 00:04:0E:89:B9:09 type ACL encrypt 0x00
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
    handle 70
> HCI Event: Page Scan Repetition Mode Change (0x20) plen 7
    bdaddr 00:04:0E:89:B9:09 mode 1
> HCI Event: Max Slots Change (0x1b) plen 3
    handle 70 slots 5
> HCI Event: Command Status (0x0f) plen 4
    Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 0
> HCI Event: Command Status (0x0f) plen 4
    Unknown (0x00|0x0000) status 0x00 ncmd 1
> HCI Event: Read Remote Supported Features (0x0b) plen 11
    status 0x00 handle 70
    Features: 0xff 0xff 0x05 0x00 0x00 0x00 0x00 0x00
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
    bdaddr 00:04:0E:89:B9:09 mode 2 clkoffset 0x0000
< ACL data: handle 70 flags 0x00 dlen 10
    L2CAP(s): Info req: type 2
> HCI Event: Command Status (0x0f) plen 4
    Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 70 packets 1
> ACL data: handle 70 flags 0x02 dlen 10
    L2CAP(s): Info req: type 2
< ACL data: handle 70 flags 0x00 dlen 16
    L2CAP(s): Info rsp: type 2 result 0
      Extended feature mask 0x02b8
        Enhanced Retransmission mode
        Streaming mode
        FCS Option
        Fixed Channels
        Unicast Connectless Data Reception
> ACL data: handle 70 flags 0x02 dlen 16
    L2CAP(s): Info rsp: type 2 result 0
      Extended feature mask 0x01bc
        Bi-directional QoS
        Enhanced Retransmission mode
        Streaming mode
        FCS Option
        Fixed Channels
        Extended Window Size
< ACL data: handle 70 flags 0x00 dlen 10
    L2CAP(s): Info req: type 3
> ACL data: handle 70 flags 0x02 dlen 10
    L2CAP(s): Info req: type 3
< ACL data: handle 70 flags 0x00 dlen 20
    L2CAP(s): Info rsp: type 3 result 0
      Fixed channel list 0x00000006
        L2CAP Signalling Channel
        L2CAP Connless
> ACL data: handle 70 flags 0x02 dlen 20
    L2CAP(s): Info rsp: type 3 result 0
      Fixed channel list 0x0000007a
        L2CAP Signalling Channel
        AMP Manager Protocol
> ACL data: handle 70 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 1 scid 0x004c
< ACL data: handle 70 flags 0x00 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x004c result 0 status 0
      Connection successful
< ACL data: handle 70 flags 0x00 dlen 27
    L2CAP(s): Config req: dcid 0x004c flags 0x00 clen 15
      MTU 1024 
      RFC 0x00 (Basic) 
> ACL data: handle 70 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
      MTU 1024 
< ACL data: handle 70 flags 0x00 dlen 18
    L2CAP(s): Config rsp: scid 0x004c flags 0x00 result 0 clen 4
      MTU 1024 
> ACL data: handle 70 flags 0x02 dlen 29
    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 15
      MTU 1024 
      RFC 0x00 (Basic) 
> HCI Event: Remote Name Req Complete (0x07) plen 255
    status 0x00 bdaddr 00:04:0E:89:B9:09 name 'TRC-Blue'
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 70 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 70 packets 1
> ACL data: handle 70 flags 0x02 dlen 17
    L2CAP(d): cid 0x0040 len 13 [psm 1]
        SDP SS Req: tid 0x0 len 0x8
          pat uuid-16 0x0100 (L2CAP)
          max 64
          cont 00
< ACL data: handle 70 flags 0x00 dlen 310
< ACL data: handle 70 flags 0x01 dlen 310
< ACL data: handle 70 flags 0x01 dlen 92
    L2CAP(d): cid 0x004c len 708 [psm 1]
        SDP SSA Rsp: tid 0x1 len 0x2bf
          count 700
          record #0
              aid 0x0000 (SrvRecHndl)
                 uint 0x10001
              aid 0x0001 (SrvClassIDList)
                 < uuid-16 0x1124 (HID) >
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) uint 0x11 > <
                 uuid-16 0x0011 (HIDP) > >
              aid 0x0006 (LangBaseAttrIDList)
                 < uint 0x656e uint 0x6a uint 0x100 >
              aid 0x0009 (BTProfileDescList)
                 < < uuid-16 0x1124 (HID) uint 0x100 > >
              aid 0x000d (AdditionalProtocolDescLists)
                 < < < uuid-16 0x0100 (L2CAP) uint 0x13 > < uuid-16 0x0011 (HIDP) > > >
              aid 0x0100 (SrvName)
                 str "Wireless Controller"
              aid 0x0101 (SrvDesc)
                 str "Game Controller"
              aid 0x0102 (ProviderName)
                 str "Sony Computer Entertainment"
              aid 0x0200 (VersionNumList)
                 uint 0x100
              aid 0x0201 (SrvDBState)
                 uint 0x111
              aid 0x0202 (unknown)
                 uint 0x8
              aid 0x0203 (unknown)
                 uint 0x0
              aid 0x0204 (unknown)
                 bool 0x0
              aid 0x0205 (unknown)
                 bool 0x1
              aid 0x0206 (unknown)
                 < < uint 0x22 str 05 01 09 05 a1 01 85 01 09 30 09 31 09 32 09 35 15 00 26 ff 00 75 08 95 04 81 02 09 39 15 00 25 07 75 04 95 01 81 42 05 09 19 01 29 0e 15 00 25 01 75 01 95 0e 81 02 75 06 95 01 81 01 05 01 09 33 09 34 15 00 26 ff 00 75 08 95 02 81 02 06 04 ff 85 02 09 24 95 24 b1 02 85 a3 09 25 95 30 b1 02 85 05 09 26 95 28 b1 02 85 06 09 27 95 34 b1 02 85 07 09 28 95 30 b1 02 85 08 09 29 95 2f b1 02 06 03 ff 85 03 09 21 95 26 b1 02 85 04 09 22 95 2e b1 02 85 f0 09 47 95 3f b1 02 85 f1 09 48 95 3f b1 02 85 f2 09 49 95 0f b1 02 06 00 ff 85 11 09 20 15 00 26 ff 00 75 08 95 4d 81 02 09 21 91 02 85 12 09 22 95 8d 81 02 09 23 91 02 85 13 09 24 95 cd 81 02 09 25 91 02 85 14 09 26 96 0d 01 81 02 09 27 91 02 85 15 09 28 96 4d 01 81 02 09 29 91 02 85 16 09 2a 96 8d 01 81 02 09 2b 91 02 85 17 09 2c 96 cd 01 81 02 09 2d 91 02 85 18 09 2e 96 0d 02 81 02 09 2f 91 02 85 19 09 30 96 22 02 81 02 09 31 91 02 06 80 ff 85 82 09 22 95 3f b1 02 85 83 09 23 b1 02 85 84 09 24 b1 02 85 90 09 30 b1 02 85 91 09 31 b1 02 85 92 09 32 b1 02 85 93 09 33 b1 02 85 a0 09 40 b1 02 85 a4 09 44 b1 02 c0 > >
              aid 0x0207 (unknown)
                 < < uint 0x409 uint 0x100 > >
              aid 0x0208 (unknown)
                 bool 0x0
              aid 0x0209 (unknown)
                 bool 0x1
              aid 0x020a (unknown)
                 bool 0x1
              aid 0x020b (unknown)
                 uint 0x100
              aid 0x020c (unknown)
                 uint 0x1f40
              aid 0x020d (unknown)
                 bool 0x0
              aid 0x020e (unknown)
                 bool 0x0
          record #1
              aid 0x0000 (SrvRecHndl)
                 uint 0x10002
              aid 0x0001 (SrvClassIDList)
                 < uuid-16 0x1200 (PNPInfo) >
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) uint 0x1 > <
                 uuid-16 0x0001 (SDP) > >
              aid 0x0009 (BTProfileDescList)
                 < < uuid-16 0x1200 (PNPInfo) uint 0x103 > >
              aid 0x0200 (VersionNumList)
                 uint 0x103
              aid 0x0201 (SrvDBState)
                 uint 0x54c
              aid 0x0202 (unknown)
                 uint 0x5c4
              aid 0x0203 (unknown)
                 uint 0x100
              aid 0x0204 (unknown)
                 bool 0x1
              aid 0x0205 (unknown)
                 uint 0x2
          cont 00
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 70 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 70 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 70 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 70 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 70 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 70 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 70 packets 1
> ACL data: handle 70 flags 0x02 dlen 12
    L2CAP(s): Disconn req: dcid 0x0040 scid 0x004c
< ACL data: handle 70 flags 0x00 dlen 12
    L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x004c
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 70 packets 1
< HCI Command: Disconnect (0x01|0x0006) plen 3
    handle 70 reason 0x13
    Reason: Remote User Terminated Connection
> HCI Event: Command Status (0x0f) plen 4
    Disconnect (0x01|0x0006) status 0x00 ncmd 1
> HCI Event: Disconn Complete (0x05) plen 4
    status 0x00 handle 70 reason 0x16
    Reason: Connection Terminated by Local Host
> HCI Event: Connect Request (0x04) plen 10
    bdaddr 00:04:0E:89:B9:09 class 0x120104 type ACL
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
    bdaddr 00:04:0E:89:B9:09 role 0x01
    Role: Slave
> HCI Event: Command Status (0x0f) plen 4
    Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1
> HCI Event: PIN Code Request (0x16) plen 6
    bdaddr 00:04:0E:89:B9:09
> HCI Event: Connect Complete (0x03) plen 11
    status 0x22 handle 71 bdaddr 00:04:0E:89:B9:09 type ACL encrypt 0x00
    Error: LMP Response Timeout



trcsoftware
Posts: 8
Joined: Wed Apr 13, 2016 9:34 am

Re: Usage of XBOX360 Wireless Controller as Android BT GameP

Post by trcsoftware »

S7

Code: Select all

root@ubuntu-ThinkPad-T60:~# hcidump
HCI sniffer - Bluetooth packet analyzer ver 2.5
device: hci0 snap_len: 1500 filter: 0xffffffff
< HCI Command: Read Local Name (0x03|0x0014) plen 0
> HCI Event: Command Complete (0x0e) plen 252
    Read Local Name (0x03|0x0014) ncmd 1
    status 0x00 name 'Wireless Controller'
< HCI Command: Read Class of Device (0x03|0x0023) plen 0
> HCI Event: Command Complete (0x0e) plen 7
    Read Class of Device (0x03|0x0023) ncmd 1
    status 0x00 class 0x002508
< HCI Command: Read Local Version Information (0x04|0x0001) plen 0
> HCI Event: Command Complete (0x0e) plen 12
    Read Local Version Information (0x04|0x0001) ncmd 1
    status 0x00
    HCI Version: 4.0 (0x6) HCI Revision: 0x22bb
    LMP Version: 4.0 (0x6) LMP Subversion: 0x22bb
    Manufacturer: Cambridge Silicon Radio (10)
> HCI Event: Connect Request (0x04) plen 10
    bdaddr A4:84:31:2F:85:C6 class 0x5a020c type ACL
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
    bdaddr A4:84:31:2F:85:C6 role 0x01
    Role: Slave
> HCI Event: Command Status (0x0f) plen 4
    Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1
> HCI Event: Connect Complete (0x03) plen 11
    status 0x00 handle 70 bdaddr A4:84:31:2F:85:C6 type ACL encrypt 0x00
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
    handle 70
> HCI Event: Page Scan Repetition Mode Change (0x20) plen 7
    bdaddr A4:84:31:2F:85:C6 mode 0
> HCI Event: Max Slots Change (0x1b) plen 3
    handle 70 slots 5
> HCI Event: Command Status (0x0f) plen 4
    Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 0
> ACL data: handle 70 flags 0x02 dlen 10
    L2CAP(s): Info req: type 2
> HCI Event: Command Status (0x0f) plen 4
    Unknown (0x00|0x0000) status 0x00 ncmd 1
> HCI Event: Read Remote Supported Features (0x0b) plen 11
    status 0x00 handle 70
    Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
< HCI Command: Read Remote Extended Features (0x01|0x001c) plen 3
    handle 70 page 1
> HCI Event: Link Supervision Timeout Change (0x38) plen 4
    handle 70 timeout 8000
> HCI Event: Command Status (0x0f) plen 4
    Read Remote Extended Features (0x01|0x001c) status 0x00 ncmd 1
> HCI Event: Read Remote Extended Features (0x23) plen 13
    status 0x00 handle 70 page 1 max 2
    Features: 0x0f 0x00 0x00 0x00 0x00 0x00 0x00 0x00
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
    bdaddr A4:84:31:2F:85:C6 mode 2 clkoffset 0x0000
< ACL data: handle 70 flags 0x00 dlen 10
    L2CAP(s): Info req: type 2
< ACL data: handle 70 flags 0x00 dlen 16
    L2CAP(s): Info rsp: type 2 result 0
      Extended feature mask 0x02b8
        Enhanced Retransmission mode
        Streaming mode
        FCS Option
        Fixed Channels
        Unicast Connectless Data Reception
> HCI Event: Command Status (0x0f) plen 4
    Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 70 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 70 packets 1
> ACL data: handle 70 flags 0x02 dlen 16
    L2CAP(s): Info rsp: type 2 result 0
      Extended feature mask 0x00b8
        Enhanced Retransmission mode
        Streaming mode
        FCS Option
        Fixed Channels
< ACL data: handle 70 flags 0x00 dlen 10
    L2CAP(s): Info req: type 3
> ACL data: handle 70 flags 0x02 dlen 10
    L2CAP(s): Info req: type 3
< ACL data: handle 70 flags 0x00 dlen 20
    L2CAP(s): Info rsp: type 3 result 0
      Fixed channel list 0x00000006
        L2CAP Signalling Channel
        L2CAP Connless
> ACL data: handle 70 flags 0x02 dlen 20
    L2CAP(s): Info rsp: type 3 result 0
      Fixed channel list 0x000000d2
        L2CAP Signalling Channel
> ACL data: handle 70 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 1 scid 0x004f
< ACL data: handle 70 flags 0x00 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x004f result 0 status 0
      Connection successful
< ACL data: handle 70 flags 0x00 dlen 27
    L2CAP(s): Config req: dcid 0x004f flags 0x00 clen 15
      MTU 1024 
      RFC 0x00 (Basic) 
> ACL data: handle 70 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
      MTU 672 
< ACL data: handle 70 flags 0x00 dlen 18
    L2CAP(s): Config rsp: scid 0x004f flags 0x00 result 0 clen 4
      MTU 672 
> ACL data: handle 70 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
      Success
> HCI Event: Remote Name Req Complete (0x07) plen 255
    status 0x00 bdaddr A4:84:31:2F:85:C6 name 'MR Galaxy S7'
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 70 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 70 packets 1
> ACL data: handle 70 flags 0x02 dlen 17
    L2CAP(d): cid 0x0040 len 13 [psm 1]
        SDP SS Req: tid 0x0 len 0x8
          pat uuid-16 0x1200 (PNPInfo)
          max 21
          cont 00
< ACL data: handle 70 flags 0x02 dlen 712
    L2CAP(d): cid 0x004f len 708 [psm 1]
        SDP SSA Rsp: tid 0x1 len 0x2bf
          count 700
          record #0
              aid 0x0000 (SrvRecHndl)
                 uint 0x10001
              aid 0x0001 (SrvClassIDList)
                 < uuid-16 0x1124 (HID) >
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) uint 0x11 > <
                 uuid-16 0x0011 (HIDP) > >
              aid 0x0006 (LangBaseAttrIDList)
                 < uint 0x656e uint 0x6a uint 0x100 >
              aid 0x0009 (BTProfileDescList)
                 < < uuid-16 0x1124 (HID) uint 0x100 > >
              aid 0x000d (AdditionalProtocolDescLists)
                 < < < uuid-16 0x0100 (L2CAP) uint 0x13 > < uuid-16 0x0011 (HIDP) > > >
              aid 0x0100 (SrvName)
                 str "Wireless Controller"
              aid 0x0101 (SrvDesc)
                 str "Game Controller"
              aid 0x0102 (ProviderName)
                 str "Sony Computer Entertainment"
              aid 0x0200 (VersionNumList)
                 uint 0x100
              aid 0x0201 (SrvDBState)
                 uint 0x111
              aid 0x0202 (unknown)
                 uint 0x8
              aid 0x0203 (unknown)
                 uint 0x0
              aid 0x0204 (unknown)
                 bool 0x0
              aid 0x0205 (unknown)
                 bool 0x1
              aid 0x0206 (unknown)
                 < < uint 0x22 str 05 01 09 05 a1 01 85 01 09 30 09 31 09 32 09 35 15 00 26 ff 00 75 08 95 04 81 02 09 39 15 00 25 07 75 04 95 01 81 42 05 09 19 01 29 0e 15 00 25 01 75 01 95 0e 81 02 75 06 95 01 81 01 05 01 09 33 09 34 15 00 26 ff 00 75 08 95 02 81 02 06 04 ff 85 02 09 24 95 24 b1 02 85 a3 09 25 95 30 b1 02 85 05 09 26 95 28 b1 02 85 06 09 27 95 34 b1 02 85 07 09 28 95 30 b1 02 85 08 09 29 95 2f b1 02 06 03 ff 85 03 09 21 95 26 b1 02 85 04 09 22 95 2e b1 02 85 f0 09 47 95 3f b1 02 85 f1 09 48 95 3f b1 02 85 f2 09 49 95 0f b1 02 06 00 ff 85 11 09 20 15 00 26 ff 00 75 08 95 4d 81 02 09 21 91 02 85 12 09 22 95 8d 81 02 09 23 91 02 85 13 09 24 95 cd 81 02 09 25 91 02 85 14 09 26 96 0d 01 81 02 09 27 91 02 85 15 09 28 96 4d 01 81 02 09 29 91 02 85 16 09 2a 96 8d 01 81 02 09 2b 91 02 85 17 09 2c 96 cd 01 81 02 09 2d 91 02 85 18 09 2e 96 0d 02 81 02 09 2f 91 02 85 19 09 30 96 22 02 81 02 09 31 91 02 06 80 ff 85 82 09 22 95 3f b1 02 85 83 09 23 b1 02 85 84 09 24 b1 02 85 90 09 30 b1 02 85 91 09 31 b1 02 85 92 09 32 b1 02 85 93 09 33 b1 02 85 a0 09 40 b1 02 85 a4 09 44 b1 02 c0 > >
              aid 0x0207 (unknown)
                 < < uint 0x409 uint 0x100 > >
              aid 0x0208 (unknown)
                 bool 0x0
              aid 0x0209 (unknown)
                 bool 0x1
              aid 0x020a (unknown)
                 bool 0x1
              aid 0x020b (unknown)
                 uint 0x100
              aid 0x020c (unknown)
                 uint 0x1f40
              aid 0x020d (unknown)
                 bool 0x0
              aid 0x020e (unknown)
                 bool 0x0
          record #1
              aid 0x0000 (SrvRecHndl)
                 uint 0x10002
              aid 0x0001 (SrvClassIDList)
                 < uuid-16 0x1200 (PNPInfo) >
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) uint 0x1 > <
                 uuid-16 0x0001 (SDP) > >
              aid 0x0009 (BTProfileDescList)
                 < < uuid-16 0x1200 (PNPInfo) uint 0x103 > >
              aid 0x0200 (VersionNumList)
                 uint 0x103
              aid 0x0201 (SrvDBState)
                 uint 0x54c
              aid 0x0202 (unknown)
                 uint 0x5c4
              aid 0x0203 (unknown)
                 uint 0x100
              aid 0x0204 (unknown)
                 bool 0x1
              aid 0x0205 (unknown)
                 uint 0x2
          cont 00
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 70 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 70 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 70 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 70 packets 1
> ACL data: handle 70 flags 0x02 dlen 12
    L2CAP(s): Disconn req: dcid 0x0040 scid 0x004f
< HCI Command: Authentication Requested (0x01|0x0011) plen 2
    handle 70
> HCI Event: Command Status (0x0f) plen 4
    Authentication Requested (0x01|0x0011) status 0x00 ncmd 1
> HCI Event: Link Key Request (0x17) plen 6
    bdaddr A4:84:31:2F:85:C6
< HCI Command: Link Key Request Negative Reply (0x01|0x000c) plen 6
    bdaddr A4:84:31:2F:85:C6
> HCI Event: Command Complete (0x0e) plen 10
    Link Key Request Negative Reply (0x01|0x000c) ncmd 1
    status 0x00 bdaddr A4:84:31:2F:85:C6
> HCI Event: IO Capability Request (0x31) plen 6
    bdaddr A4:84:31:2F:85:C6
< HCI Command: IO Capability Request Reply (0x01|0x002b) plen 9
    bdaddr A4:84:31:2F:85:C6 capability 0x03 oob 0x00 auth 0x04
    Capability: NoInputNoOutput (OOB data not present)
    Authentication: General Bonding (No MITM Protection)
> HCI Event: Command Complete (0x0e) plen 10
    IO Capability Request Reply (0x01|0x002b) ncmd 1
    status 0x00 bdaddr A4:84:31:2F:85:C6
> HCI Event: IO Capability Response (0x32) plen 9
    bdaddr A4:84:31:2F:85:C6 capability 0x01 oob 0x00 auth 0x05
    Capability: DisplayYesNo (OOB data not present)
    Authentication: General Bonding (MITM Protection)
> HCI Event: User Confirmation Request (0x33) plen 10
    bdaddr A4:84:31:2F:85:C6 passkey 934715
< HCI Command: User Confirmation Request Reply (0x01|0x002c) plen 6
    bdaddr A4:84:31:2F:85:C6
> HCI Event: Command Complete (0x0e) plen 10
    User Confirmation Request Reply (0x01|0x002c) ncmd 1
    status 0x00 bdaddr A4:84:31:2F:85:C6
> HCI Event: Simple Pairing Complete (0x36) plen 7
    status 0x00 bdaddr A4:84:31:2F:85:C6
> HCI Event: Link Key Notification (0x18) plen 23
    bdaddr A4:84:31:2F:85:C6 key 60491E2A12A259BFDC0121A790B5261F type 4
    Type: Unauthenticated Combination Key
> HCI Event: Auth Complete (0x06) plen 3
    status 0x00 handle 70
< HCI Command: Set Connection Encryption (0x01|0x0013) plen 3
    handle 70 encrypt 0x01
> HCI Event: Command Status (0x0f) plen 4
    Set Connection Encryption (0x01|0x0013) status 0x00 ncmd 1
> HCI Event: Encrypt Change (0x08) plen 4
    status 0x00 handle 70 encrypt 0x01
< HCI Command: Read Encryption Key Size (0x05|0x0008) plen 2
> HCI Event: Command Complete (0x0e) plen 7
    Read Encryption Key Size (0x05|0x0008) ncmd 1
> HCI Event: Disconn Complete (0x05) plen 4
    status 0x00 handle 70 reason 0x13
    Reason: Remote User Terminated Connection
> HCI Event: Connect Request (0x04) plen 10
    bdaddr A4:84:31:2F:85:C6 class 0x5a020c type ACL
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
    bdaddr A4:84:31:2F:85:C6 role 0x01
    Role: Slave
> HCI Event: Command Status (0x0f) plen 4
    Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1
> HCI Event: Connect Complete (0x03) plen 11
    status 0x00 handle 69 bdaddr A4:84:31:2F:85:C6 type ACL encrypt 0x00
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
    handle 69
> HCI Event: Page Scan Repetition Mode Change (0x20) plen 7
    bdaddr A4:84:31:2F:85:C6 mode 0
> HCI Event: Max Slots Change (0x1b) plen 3
    handle 69 slots 5
> HCI Event: Command Status (0x0f) plen 4
    Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 0
> ACL data: handle 69 flags 0x02 dlen 10
    L2CAP(s): Info req: type 2
> HCI Event: Command Status (0x0f) plen 4
    Unknown (0x00|0x0000) status 0x00 ncmd 1
> HCI Event: Read Remote Supported Features (0x0b) plen 11
    status 0x00 handle 69
    Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
< HCI Command: Read Remote Extended Features (0x01|0x001c) plen 3
    handle 69 page 1
> HCI Event: Link Supervision Timeout Change (0x38) plen 4
    handle 69 timeout 8000
> HCI Event: Command Status (0x0f) plen 4
    Read Remote Extended Features (0x01|0x001c) status 0x00 ncmd 1
> HCI Event: Read Remote Extended Features (0x23) plen 13
    status 0x00 handle 69 page 1 max 2
    Features: 0x0f 0x00 0x00 0x00 0x00 0x00 0x00 0x00
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
    bdaddr A4:84:31:2F:85:C6 mode 2 clkoffset 0x0000
< ACL data: handle 69 flags 0x00 dlen 10
    L2CAP(s): Info req: type 2
< ACL data: handle 69 flags 0x00 dlen 16
    L2CAP(s): Info rsp: type 2 result 0
      Extended feature mask 0x02b8
        Enhanced Retransmission mode
        Streaming mode
        FCS Option
        Fixed Channels
        Unicast Connectless Data Reception
> HCI Event: Command Status (0x0f) plen 4
    Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 69 packets 1
> ACL data: handle 69 flags 0x02 dlen 16
    L2CAP(s): Info rsp: type 2 result 0
      Extended feature mask 0x00b8
        Enhanced Retransmission mode
        Streaming mode
        FCS Option
        Fixed Channels
< ACL data: handle 69 flags 0x00 dlen 10
    L2CAP(s): Info req: type 3
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 69 packets 1
> ACL data: handle 69 flags 0x02 dlen 10
    L2CAP(s): Info req: type 3
< ACL data: handle 69 flags 0x00 dlen 20
    L2CAP(s): Info rsp: type 3 result 0
      Fixed channel list 0x00000006
        L2CAP Signalling Channel
        L2CAP Connless
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 69 packets 1
> ACL data: handle 69 flags 0x02 dlen 20
    L2CAP(s): Info rsp: type 3 result 0
      Fixed channel list 0x000000d2
        L2CAP Signalling Channel
> ACL data: handle 69 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 1 scid 0x0041
< ACL data: handle 69 flags 0x00 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0041 result 0 status 0
      Connection successful
< ACL data: handle 69 flags 0x00 dlen 27
    L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 15
      MTU 1024 
      RFC 0x00 (Basic) 
> ACL data: handle 69 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
      MTU 672 
< ACL data: handle 69 flags 0x00 dlen 18
    L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
      MTU 672 
> ACL data: handle 69 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
      Success
> ACL data: handle 69 flags 0x02 dlen 17
    L2CAP(d): cid 0x0040 len 13 [psm 1]
        SDP SS Req: tid 0x0 len 0x8
          pat uuid-16 0x1200 (PNPInfo)
          max 21
          cont 00
< ACL data: handle 69 flags 0x02 dlen 712
    L2CAP(d): cid 0x0041 len 708 [psm 1]
        SDP SSA Rsp: tid 0x1 len 0x2bf
          count 700
          record #0
              aid 0x0000 (SrvRecHndl)
                 uint 0x10001
              aid 0x0001 (SrvClassIDList)
                 < uuid-16 0x1124 (HID) >
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) uint 0x11 > <
                 uuid-16 0x0011 (HIDP) > >
              aid 0x0006 (LangBaseAttrIDList)
                 < uint 0x656e uint 0x6a uint 0x100 >
              aid 0x0009 (BTProfileDescList)
                 < < uuid-16 0x1124 (HID) uint 0x100 > >
              aid 0x000d (AdditionalProtocolDescLists)
                 < < < uuid-16 0x0100 (L2CAP) uint 0x13 > < uuid-16 0x0011 (HIDP) > > >
              aid 0x0100 (SrvName)
                 str "Wireless Controller"
              aid 0x0101 (SrvDesc)
                 str "Game Controller"
              aid 0x0102 (ProviderName)
                 str "Sony Computer Entertainment"
              aid 0x0200 (VersionNumList)
                 uint 0x100
              aid 0x0201 (SrvDBState)
                 uint 0x111
              aid 0x0202 (unknown)
                 uint 0x8
              aid 0x0203 (unknown)
                 uint 0x0
              aid 0x0204 (unknown)
                 bool 0x0
              aid 0x0205 (unknown)
                 bool 0x1
              aid 0x0206 (unknown)
                 < < uint 0x22 str 05 01 09 05 a1 01 85 01 09 30 09 31 09 32 09 35 15 00 26 ff 00 75 08 95 04 81 02 09 39 15 00 25 07 75 04 95 01 81 42 05 09 19 01 29 0e 15 00 25 01 75 01 95 0e 81 02 75 06 95 01 81 01 05 01 09 33 09 34 15 00 26 ff 00 75 08 95 02 81 02 06 04 ff 85 02 09 24 95 24 b1 02 85 a3 09 25 95 30 b1 02 85 05 09 26 95 28 b1 02 85 06 09 27 95 34 b1 02 85 07 09 28 95 30 b1 02 85 08 09 29 95 2f b1 02 06 03 ff 85 03 09 21 95 26 b1 02 85 04 09 22 95 2e b1 02 85 f0 09 47 95 3f b1 02 85 f1 09 48 95 3f b1 02 85 f2 09 49 95 0f b1 02 06 00 ff 85 11 09 20 15 00 26 ff 00 75 08 95 4d 81 02 09 21 91 02 85 12 09 22 95 8d 81 02 09 23 91 02 85 13 09 24 95 cd 81 02 09 25 91 02 85 14 09 26 96 0d 01 81 02 09 27 91 02 85 15 09 28 96 4d 01 81 02 09 29 91 02 85 16 09 2a 96 8d 01 81 02 09 2b 91 02 85 17 09 2c 96 cd 01 81 02 09 2d 91 02 85 18 09 2e 96 0d 02 81 02 09 2f 91 02 85 19 09 30 96 22 02 81 02 09 31 91 02 06 80 ff 85 82 09 22 95 3f b1 02 85 83 09 23 b1 02 85 84 09 24 b1 02 85 90 09 30 b1 02 85 91 09 31 b1 02 85 92 09 32 b1 02 85 93 09 33 b1 02 85 a0 09 40 b1 02 85 a4 09 44 b1 02 c0 > >
              aid 0x0207 (unknown)
                 < < uint 0x409 uint 0x100 > >
              aid 0x0208 (unknown)
                 bool 0x0
              aid 0x0209 (unknown)
                 bool 0x1
              aid 0x020a (unknown)
                 bool 0x1
              aid 0x020b (unknown)
                 uint 0x100
              aid 0x020c (unknown)
                 uint 0x1f40
              aid 0x020d (unknown)
                 bool 0x0
              aid 0x020e (unknown)
                 bool 0x0
          record #1
              aid 0x0000 (SrvRecHndl)
                 uint 0x10002
              aid 0x0001 (SrvClassIDList)
                 < uuid-16 0x1200 (PNPInfo) >
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) uint 0x1 > <
                 uuid-16 0x0001 (SDP) > >
              aid 0x0009 (BTProfileDescList)
                 < < uuid-16 0x1200 (PNPInfo) uint 0x103 > >
              aid 0x0200 (VersionNumList)
                 uint 0x103
              aid 0x0201 (SrvDBState)
                 uint 0x54c
              aid 0x0202 (unknown)
                 uint 0x5c4
              aid 0x0203 (unknown)
                 uint 0x100
              aid 0x0204 (unknown)
                 bool 0x1
              aid 0x0205 (unknown)
                 uint 0x2
          cont 00
> HCI Event: Remote Name Req Complete (0x07) plen 255
    status 0x00 bdaddr A4:84:31:2F:85:C6 name 'MR Galaxy S7'
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 69 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 69 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 69 packets 1
> ACL data: handle 69 flags 0x02 dlen 12
    L2CAP(s): Disconn req: dcid 0x0040 scid 0x0041
< ACL data: handle 69 flags 0x00 dlen 12
    L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0041
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 69 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 69 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 69 packets 1
< HCI Command: Disconnect (0x01|0x0006) plen 3
    handle 69 reason 0x13
    Reason: Remote User Terminated Connection
> HCI Event: Command Status (0x0f) plen 4
    Disconnect (0x01|0x0006) status 0x00 ncmd 1
> HCI Event: Disconn Complete (0x05) plen 4
    status 0x00 handle 69 reason 0x16
    Reason: Connection Terminated by Local Host

Code: Select all

ubuntu@ubuntu-ThinkPad-T60:/$ gimx --type DS4 --config X360PadUsb.xml --bdaddr A4:84:31:2F:85:C6 --hci 0 --nograb --status
option -t with value `DS4'
option -c with value `X360PadUsb.xml'
option -b with value `A4:84:31:2F:85:C6'
option -h with value `0'
grab flag is unset
status flag is set
using default refresh period: 10.00ms
Warning: can't open macro directory /home/ubuntu//.gimx//macros/
listening on psm: 0x0001
listening on psm: 0x0011
listening on psm: 0x0013
accepted connection from A4:84:31:2F:85:C6 (psm: 0x0001)
hci_open_dev: No such device
connecting with hci0 = 00:1B:DC:06:69:A9 to A4:84:31:2F:85:C6 psm 0x0011
connecting with hci0 = 00:1B:DC:06:69:A9 to A4:84:31:2F:85:C6 psm 0x0013
connection failed: Connection reset by peer
can't connect to psm 0x0013
accepted connection from A4:84:31:2F:85:C6 (psm: 0x0001)




trcsoftware
Posts: 8
Joined: Wed Apr 13, 2016 9:34 am

Re: Usage of XBOX360 Wireless Controller as Android BT GameP

Post by trcsoftware »

I have found this documentation for psm 0x0013
https://www.bluetooth.org/docman/handle ... id%3D41207

5 Connection Establishment
The connection establishment process between a HID host from a HID peripheral is as
follows:
1. User (or host in some cases) selects HID with which to connect
2. Host establishes a baseband connection with the HID
a. Host performs baseband paging
b. Features are exchanged
c. Authentication performed (mandatory for keyboards)
d. Encryption enabled (mandatory for keyboards, optional for mice)
3. Host opens HID Control L2CAP PSM (0x0011)
4. Host opens HID Interrupt L2CAP PSM (0x0013)
5. Host sends SET_PROTOCOL to select boot-protocol
6. Host waits for keyboard or mouse reports to be sent from HID interrupt channel
To disconnect from a device, a HID Lite Host must first close the HID Interrupt
channel and then close the HID Control channel.
User avatar
Matlo
Posts: 5768
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: Usage of XBOX360 Wireless Controller as Android BT GameP

Post by Matlo »

I can see from the logs that you aren't using the latest GIMX version.
It's generally a good idea to use the latest version.

Did you understand that pairing two devices generates a new link key and revokes the previous one?
GIMX creator
Post Reply