Emulator Issues #5248
closedWiimote with built-in motion plus not working on Linux
0%
Description
Hi folks,
I always read about the "bluetooth PID" for Wiimote, which could be 0x0330 or something.
Now, I own a Nintendo RVL-CNT-01, but I guess it´s a special one.
I want to modify the source code, shown as in
http://code.google.com/p/dolphin-emu/issues/detail?id=5011&q=wiimote
But I don´t know how to find out the PID for this device.
(using Ubuntu 11.10 64 bit)
I have attached serveral informations about my bluetooth devices.
Probably you could help me to find out the PID.
Bluetooth USB-dongle¶
D-Link DBT-120
$ lsusb
Bus 002 Device 004: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
$ hciconfig
hci0: Type: BR/EDR Bus: USB
BD Address: 00:11:95:0E:24:50 ACL MTU: 192:8 SCO MTU: 64:8
UP RUNNING PSCAN
RX bytes:33899 acl:1100 sco:0 events:1167 errors:0
TX bytes:19611 acl:915 sco:0 commands:132 errors:0
Wiimote "Motion 2 in 1"¶
$ hcitool inq
Inquiring ...
00:17:AB:39:5A:BE clock offset: 0x3fb7 class: 0x002504
$ hcitool scan
Scanning ...
00:17:AB:39:5A:BE Nintendo RVL-CNT-01
$ sudo hcitool info 00:17:AB:39:5A:BE
Requesting information ...
BD Address: 00:17:AB:39:5A:BE
Device Name: Nintendo RVL-CNT-01
LMP Version: 1.2 (0x2) LMP Subversion: 0x229
Manufacturer: Broadcom Corporation (15)
Features: 0xbc 0x02 0x04 0x38 0x08 0x00 0x00 0x00
<encryption> <slot offset> <timing accuracy> <role switch>
<sniff mode> <RSSI> <power control> <enhanced iscan>
<interlaced iscan> <interlaced pscan> <AFH cap. slave>
$ sdptool records 00:17:AB:39:5A:BE
Service Name: Nintendo RVL-CNT-01
Service Description: Nintendo RVL-CNT-01
Service Provider: Nintendo
Service RecHandle: 0x10000
Service Class ID List:
"Human Interface Device" (0x1124)
Protocol Descriptor List:
"L2CAP" (0x0100)
PSM: 17
"HIDP" (0x0011)
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"Human Interface Device" (0x1124)
Version: 0x0100
Service RecHandle: 0x10001
Service Class ID List:
"PnP Information" (0x1200)
Protocol Descriptor List:
"L2CAP" (0x0100)
PSM: 1
"SDP" (0x0001)
Profile Descriptor List:
"PnP Information" (0x1200)
Version: 0x0100
Service RecHandle: 0xffffffff
Service RecHandle: 0xffffffff
Service RecHandle: 0xffffffff
...
Many thanks for support.
Cheers Nephilim
Delete comment
Comment 1 by nephilim...@hotmail.de, Today (44 minutes ago)
More information:
$ lswm -l
Put Wiimotes in discoverable mode now (press 1+2)...
00:17:AB:39:5A:BE 0x002504 Nintendo RVL-CNT-01
Updated by adlr almost 13 years ago
nephilim1973: If I make a patch, will you be able to test it?
Updated by nephilim1973 almost 13 years ago
a...@gmail.com: For sure...
I am using the latest GIT version and I am able to recompile with your patch.
But for sharing knowledge and reproducing the modifications for newer controllers, it would be nice, if you could explain how to gather all the needed informations and where the modifications in the source code are located.
As I know, there are plenty of issues with newer controllers.
I will help you, if I can.
Cheers
Nephilim
Updated by nephilim1973 almost 13 years ago
Additional informations:
Bluetooth dongle¶
$ hciconfig -a
hci0: Type: BR/EDR Bus: USB
BD Address: 00:11:95:0E:24:50 ACL MTU: 192:8 SCO MTU: 64:8
UP RUNNING PSCAN
RX bytes:1234 acl:0 sco:0 events:32 errors:0
TX bytes:881 acl:0 sco:0 commands:31 errors:0
Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy:
Link mode: SLAVE ACCEPT
Name: 'computer'
Class: 0x4a0100
Service Classes: Networking, Capturing, Telephony
Device Class: Computer, Uncategorized
HCI Version: 1.1 (0x1) Revision: 0x20d
LMP Version: 1.1 (0x1) Subversion: 0x20d
Manufacturer: Cambridge Silicon Radio (10)
Wiimote "Motion 2 in 1" with NunChuk¶
$ sdptool records 00:17:AB:39:5A:BE
Service Name: Nintendo RVL-CNT-01
Service Description: Nintendo RVL-CNT-01
Service Provider: Nintendo
Service RecHandle: 0x10000
Service Class ID List:
"Human Interface Device" (0x1124)
Protocol Descriptor List:
"L2CAP" (0x0100)
PSM: 17
"HIDP" (0x0011)
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"Human Interface Device" (0x1124)
Version: 0x0100
Service RecHandle: 0x10001
Service Class ID List:
"PnP Information" (0x1200)
Protocol Descriptor List:
"L2CAP" (0x0100)
PSM: 1
"SDP" (0x0001)
Profile Descriptor List:
"PnP Information" (0x1200)
Version: 0x0100
Service RecHandle: 0xffffffff
Service RecHandle: 0xffffffff
Updated by adlr almost 13 years ago
- Status changed from New to Accepted
Thanks for the info. In a day or two I'll post w/ a commit you can sync and try.
Updated by nephilim1973 almost 13 years ago
I´ll wait for the patch and post a result of my tests here...
Cheers
Updated by adlr almost 13 years ago
Yeah, sorry for the delay. I've been having build/toolchain issues, unfortunately. I haven't forgotten about this.
Updated by nephilim1973 almost 13 years ago
Just more informations about pairing the new "WiiMotion 2 in 1" with dolphin via "Options / WiiMote pairing" (which unfortunatelly brings a visual success but no working device...)
Output was generated on Ubuntu 11.10 via
$ sudo hcidump -x¶
< HCI Command: Inquiry (0x01|0x0001) plen 5
lap 0x9e8b33 len 1 num 128
HCI Event: Command Status (0x0f) plen 4
Inquiry (0x01|0x0001) status 0x00 ncmd 1
HCI Event: Inquiry Result (0x02) plen 15
bdaddr 00:17:AB:39:5A:BE mode 1 clkoffset 0x1345 class 0x002504
HCI Event: Inquiry Complete (0x01) plen 1
status 0x00
< HCI Command: Create Connection (0x01|0x0005) plen 13
bdaddr 00:17:AB:39:5A:BE ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
HCI Event: Command Status (0x0f) plen 4
Create Connection (0x01|0x0005) status 0x00 ncmd 1
HCI Event: Connect Complete (0x03) plen 11
status 0x00 handle 41 bdaddr 00:17:AB:39:5A:BE type ACL encrypt 0x00
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
handle 41
HCI Event: Command Status (0x0f) plen 4
Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 1
HCI Event: Read Remote Supported Features (0x0b) plen 11
status 0x00 handle 41
Features: 0xbc 0x02 0x04 0x38 0x08 0x00 0x00 0x00
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
bdaddr 00:17:AB:39:5A:BE mode 2 clkoffset 0x0000
< ACL data: handle 41 flags 0x02 dlen 10
L2CAP(s): Info req: type 2
ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Info rsp: type 2 result 1
Not supported
< ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 17 scid 0x0040
HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
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 41 packets 1
ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0050 scid 0x0040 result 0 status 0
Connection successful
< ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x0050 flags 0x00 clen 0
HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
ACL data: handle 41 flags 0x02 dlen 18
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 4
MTU 48
ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
MTU 48
< ACL data: handle 41 flags 0x02 dlen 18
L2CAP(s): Config rsp: scid 0x0050 flags 0x00 result 0 clen 4
MTU 48
< ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 19 scid 0x0041
HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
HCI Event: Remote Name Req Complete (0x07) plen 255
status 0x00 bdaddr 00:17:AB:39:5A:BE name 'Nintendo RVL-CNT-01'
ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0051 scid 0x0041 result 0 status 0
Connection successful
< ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x0051 flags 0x00 clen 0
HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
ACL data: handle 41 flags 0x02 dlen 18
L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
MTU 48
ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 4
MTU 48
< ACL data: handle 41 flags 0x02 dlen 18
L2CAP(s): Config rsp: scid 0x0051 flags 0x00 result 0 clen 4
MTU 48
< ACL data: handle 41 flags 0x02 dlen 8
L2CAP(d): cid 0x0050 len 4 [psm 17]
HIDP: Set report: Output report
12 04 30
< ACL data: handle 41 flags 0x02 dlen 7
L2CAP(d): cid 0x0050 len 3 [psm 17]
HIDP: Set report: Output report
11 10
< ACL data: handle 41 flags 0x02 dlen 7
L2CAP(d): cid 0x0050 len 3 [psm 17]
HIDP: Set report: Output report
10 01
HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
ACL data: handle 41 flags 0x02 dlen 5
L2CAP(d): cid 0x0040 len 1 [psm 17]
HIDP: Handshake: Successful
HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 2
ACL data: handle 41 flags 0x02 dlen 5
L2CAP(d): cid 0x0040 len 1 [psm 17]
HIDP: Handshake: Successful
ACL data: handle 41 flags 0x02 dlen 5
L2CAP(d): cid 0x0040 len 1 [psm 17]
HIDP: Handshake: Successful
HCI Event: QoS Setup Complete (0x0d) plen 21
status 0x00 handle 41 flags 0
Service type: 1
Token rate: 0
Peak bandwith: 0
Latency: 10000
Delay variation: -1
< ACL data: handle 41 flags 0x02 dlen 7
L2CAP(d): cid 0x0050 len 3 [psm 17]
HIDP: Set report: Output report
10 00
< ACL data: handle 41 flags 0x02 dlen 8
L2CAP(d): cid 0x0050 len 4 [psm 17]
HIDP: Data: Input report
12 00 30
HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
ACL data: handle 41 flags 0x02 dlen 5
L2CAP(d): cid 0x0040 len 1 [psm 17]
HIDP: Handshake: Successful
HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
Updated by nephilim1973 almost 13 years ago
Starting a game results in WiiMote-disconnect:
< ACL data: handle 41 flags 0x02 dlen 7
L2CAP(d): cid 0x0050 len 3 [psm 0]
A1 15 00
< ACL data: handle 41 flags 0x02 dlen 12
L2CAP(d): cid 0x0050 len 8 [psm 0]
52 17 00 00 17 70 00 01
HCI Event: Disconn Complete (0x05) plen 4
status 0x00 handle 41 reason 0x08
Reason: Connection Timeout
Updated by adlr almost 13 years ago
Can you try syncing to this commit and testing? http://code.google.com/r/adlr-mplus/source/detail?r=c274d71a3fe427fabead45df10eb021715d9844e&name=wiimotenix The top 3 commits here are new, and hopefully work together to get it all working for you.
(You may want to rebase against upstream master. I'm basing my new commits off an older version while I work around some toolchain issues.)
Updated by nephilim1973 almost 13 years ago
First test result:
18:23:507 /home/xxx/Dokumente/GIT/dolphin-emu/Source/Core/Core/Src/HW/WiimoteReal/IONix.cpp:122 N[Wiimote]: Found wiimote 1, (00:17:AB:39:5A:BE).
18:23:838 /home/xxx/Dokumente/GIT/dolphin-emu/Source/Core/Core/Src/HW/WiimoteReal/IONix.cpp:170 N[Wiimote]: Connected to wiimote 1.
18:32:182 /home/xxx/Dokumente/GIT/dolphin-emu/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp:469 N[Video]: glX-Version 1.4
18:32:182 /home/xxx/Dokumente/GIT/dolphin-emu/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp:491 N[Video]: Got double buffered visual!
18:32:259 /home/xxx/Dokumente/GIT/dolphin-emu/Source/Core/Core/Src/Boot/Boot.cpp:196 N[BOOT]: Booting /home/xxx/ISO/Wii/SUPER MARIO GALAXY 2.iso
18:32:390 /home/xxx/Dokumente/GIT/dolphin-emu/Source/Core/Core/Src/HLE/HLE_OS.cpp:52 N[OSREPORT]: 81200614->81300000|
Apploader Initialized.
18:32:390 /home/xxx/Dokumente/GIT/dolphin-emu/Source/Core/Core/Src/HLE/HLE_OS.cpp:52 N[OSREPORT]: 81200630->81300000| This Apploader built Dec 11 2009 16:01:01 for RVL
18:33:662 /home/xxx/Dokumente/GIT/dolphin-emu/Source/Core/AudioCommon/Src/PulseAudioStream.cpp:166 N[Audio]: Pulse successfully initialized.
18:48:870 /home/xxx/Dokumente/GIT/dolphin-emu/Source/Core/Core/Src/HW/WiimoteReal/IONix.cpp:191 N[Wiimote]: Disconnecting wiimote 1.
terminate called after throwing an instance of 'std::system_error'
what(): Verklemmung beim Zugriff auf eine Ressource vermieden
Abgebrochen
Last log entry means: "Jamming during access to a resource avoided. Terminated"
The game (SB4P01) quits before it even starts.
:-(
I will do a few more testing...
Updated by nephilim1973 almost 13 years ago
Ok, some news...
I paired the new WiiMote with Dolphin --> Options --> WiiMote settings
After successful pairing with "rumbling" WiiMote , I closed the options menu and wait... without loading a game...
Output:¶
34:51:697 /home/xxx/Dokumente/GIT/dolphin-emu/Source/Core/Core/Src/HW/WiimoteReal/IONix.cpp:122 N[Wiimote]: Found wiimote 1, (00:17:AB:39:5A:BE).
34:52:269 /home/xxx/Dokumente/GIT/dolphin-emu/Source/Core/Core/Src/HW/WiimoteReal/IONix.cpp:170 N[Wiimote]: Connected to wiimote 1.
35:17:294 /home/xxx/Dokumente/GIT/dolphin-emu/Source/Core/Core/Src/HW/WiimoteReal/IONix.cpp:191 N[Wiimote]: Disconnecting wiimote 1.
terminate called after throwing an instance of 'std::system_error'
what(): Verklemmung beim Zugriff auf eine Ressource vermieden
Abgebrochen
--> "Jamming during access to a resource avoided. Terminated" after 25 seconds.
These disconnects after 25 seconds are stable. Means: Every 25 seconds dolphin lost connection after several attempts ( > 10 )
Updated by nephilim1973 almost 13 years ago
Ok, here is an additional WiiMote, which does not work (Dolphin could not pair)
"Wiimote 'MotionPlus INSIDE'"¶
$ hcitool inq
Inquiring ...
2C:10:C1:54:A8:85 clock offset: 0x6f1f class: 0x000508
$ hcitool scan
Scanning ...
2C:10:C1:54:A8:85 Nintendo RVL-CNT-01-TR
$ sudo hcitool info 2C:10:C1:54:A8:85
Requesting information ...
BD Address: 2C:10:C1:54:A8:85
Device Name: Nintendo RVL-CNT-01-TR
LMP Version: 2.0 (0x3) LMP Subversion: 0x1d8d
Manufacturer: Cambridge Silicon Radio (10)
Features: 0xbc 0x02 0x04 0x38 0x08 0x00 0x00 0x00
$ sdptool records 2C:10:C1:54:A8:85
Service Name: Nintendo RVL-CNT-01-TR
Service Description: Nintendo RVL-CNT-01-TR
Service Provider: Nintendo
Service RecHandle: 0x10000
Service Class ID List:
"Human Interface Device" (0x1124)
Protocol Descriptor List:
"L2CAP" (0x0100)
PSM: 17
"HIDP" (0x0011)
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"Human Interface Device" (0x1124)
Version: 0x0100
Service Description: Nintendo RVL-CNT-01-TR
Service RecHandle: 0x10001
Service Class ID List:
"PnP Information" (0x1200)
Protocol Descriptor List:
"L2CAP" (0x0100)
PSM: 1
"SDP" (0x0001)
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"PnP Information" (0x1200)
Version: 0x0100
$ lswm -l --> NO OUTPUT !¶
BlueTooth Trace while trying to pair in Dolphin:
$ sudo hcidump -x
HCI sniffer - Bluetooth packet analyzer ver 2.1
device: hci0 snap_len: 1028 filter: 0xffffffffffffffff
< HCI Command: Inquiry (0x01|0x0001) plen 5
lap 0x9e8b33 len 1 num 128
HCI Event: Command Status (0x0f) plen 4
Inquiry (0x01|0x0001) status 0x00 ncmd 1
HCI Event: Inquiry Result (0x02) plen 15
bdaddr 2C:10:C1:54:A8:85 mode 1 clkoffset 0x70d8 class 0x000508
HCI Event: Inquiry Complete (0x01) plen 1
status 0x00
< HCI Command: Inquiry (0x01|0x0001) plen 5
lap 0x9e8b33 len 1 num 128
HCI Event: Command Status (0x0f) plen 4
Inquiry (0x01|0x0001) status 0x00 ncmd 1
HCI Event: Inquiry Result (0x02) plen 15
bdaddr 2C:10:C1:54:A8:85 mode 1 clkoffset 0x70d8 class 0x000508
HCI Event: Inquiry Complete (0x01) plen 1
status 0x00
< HCI Command: Inquiry (0x01|0x0001) plen 5
lap 0x9e8b33 len 1 num 128
HCI Event: Command Status (0x0f) plen 4
Inquiry (0x01|0x0001) status 0x00 ncmd 1
HCI Event: Inquiry Result (0x02) plen 15
bdaddr 2C:10:C1:54:A8:85 mode 1 clkoffset 0x70d8 class 0x000508
HCI Event: Inquiry Complete (0x01) plen 1
status 0x00
< HCI Command: Inquiry (0x01|0x0001) plen 5
lap 0x9e8b33 len 1 num 128
HCI Event: Command Status (0x0f) plen 4
Inquiry (0x01|0x0001) status 0x00 ncmd 1
HCI Event: Inquiry Result (0x02) plen 15
bdaddr 2C:10:C1:54:A8:85 mode 1 clkoffset 0x70d8 class 0x000508
HCI Event: Inquiry Complete (0x01) plen 1
status 0x00
< HCI Command: Inquiry (0x01|0x0001) plen 5
lap 0x9e8b33 len 1 num 128
HCI Event: Command Status (0x0f) plen 4
Inquiry (0x01|0x0001) status 0x00 ncmd 1
HCI Event: Inquiry Result (0x02) plen 15
bdaddr 2C:10:C1:54:A8:85 mode 1 clkoffset 0x70d8 class 0x000508
HCI Event: Inquiry Complete (0x01) plen 1
status 0x00
--> Not detected !¶
Trying to connect with "wmgui"...
< HCI Command: Inquiry (0x01|0x0001) plen 5
lap 0x9e8b33 len 5 num 0
HCI Event: Command Status (0x0f) plen 4
Inquiry (0x01|0x0001) status 0x00 ncmd 1
HCI Event: Inquiry Result (0x02) plen 15
bdaddr 2C:10:C1:54:A8:85 mode 1 clkoffset 0x71aa class 0x000508
HCI Event: Inquiry Complete (0x01) plen 1
status 0x00
---> Not detected !¶
Regards Nephilim
Updated by videogoogle almost 13 years ago
It would be very kind if you could explain shortly, how to determine the MAJOR and MINOR classes of a bluetooth device.
Is there any tool to use ??
Are these gathered informations helpful ?
And if yes, wich part of it ?
Probably, I can change the code by myself and bring this issue to an end.
Updated by shermenxu over 12 years ago
hi all
I am facing similar problems. I just got a wii remote motion 2 in 1, latest dolphin, win7, and buildin bluetooth. The pair seems ok, and the wiiremote.exe can track all the motion and button, but it lost control in most games.
Only two games are partially functional, one Japanese dancing game and wii sports. And the ir sensor doesn't work during the game.
I am not a programmer, but I can help to test.
Cheers
Shermen
Updated by Billiard26 almost 12 years ago
- Status changed from Accepted to Duplicate