[UNDER DEVELOPMENT]Windows Mobile 6 Bluetooth and Wiimote

Search This thread

scilor

Senior Member
Jan 5, 2008
1,270
36
@scilor.com
www.scilor.com
I am currently trying to develop some software that allows to use a wiimote or a ps3 controller (ex. for fpsece).

all in vb.net

I currently discovered that I am unable to connect. I have already found a similar project that stopped because of the same problem!

I have read that the problem is the missing HID/S2CAP support of 32feet.net
The other software uses BlueTools so there may be the same problem!.

Does anyone know something that allows me to connect to my wiimote?! Maybe some SDK with HID/S2CAP support?!

You own an HD2 and another WinMob device and want to help? Take a look here: http://forum.xda-developers.com/showpost.php?p=5553883&postcount=10
 
Last edited by a moderator:

carinoxx

Senior Member
Dec 23, 2008
135
2
I am speaking of the other way round :D, but I could also try that ^^.

I am talking about to control your HD with a Wiimote ;)
It would be easy, if there is any idea how succesfull connect to the wiimote

Control your Wii with HD... It would be a great app.. if you can write it...

Thanks my Friend.
 

l3v5y

Retired Senior Moderator
Sep 13, 2007
7,485
42
29
Bristol
I was looking at doing this at one point. The HD2 with its Widcomm bluetooth stack supports BT HID, and the later WM6.5.X builds have Bth_HID in the SYS.

Pairing doesn't get you very far though. I found some C++ code for using the Wiimotes, but I haven't transfered it yet.
 

scilor

Senior Member
Jan 5, 2008
1,270
36
@scilor.com
www.scilor.com
@l3v5y Why you have always the same ideas I do :D

The Bluetooth Stack of the HD2 seems to be a little bit buggy:
If I try to use a Bluetooth chat, it just works from my HD2 to my Kaiser, not the other way round. It is as my HD2 blocks all incoming Bluetooth connections :(
Any idea?
 
Last edited:

scilor

Senior Member
Jan 5, 2008
1,270
36
@scilor.com
www.scilor.com
Ok, I have attached the Bluetooth Chat here.

It would be nice if other HD2 users could test it(You will need the HD2 and another WinMob Phone with a Widcomm Stack). Please always post the Roms of the devices, especailly the HD2's.

If it is only occurs on some ROMS, it would be fine, so I will do a Rom upgrade for further testing :)

My results where:

HD2 - T-Mobile ROM 1.43.11.2 (70315) Ger
Kaiser - Custom Rom WinMob 6.5

Message HD2 to Kaiser: Works fine, but takes a second.
Message Kaiser to HD2: Connection error, no message!
 

Attachments

  • 32feet.net-BluetoothChat.zip
    122.1 KB · Views: 97
Last edited:

ScruffR

Member
Sep 4, 2004
33
2
Salzburg
Hi everybody,

I'm also looking for a solution for that.
As I had similar problems with my Notebook (Widcomm-BT-Stack), I could solve it with a different BT stack. But I don't want to part with the Widcomm on my HD2.
I think the main problem is that the OK softbutton is disabled as long as there is no passcode in the inputbox. It only gets enabled if you enter somthing, which would never match up with the empty passcode of the WiiMote (somthing <> nothing ;-).
If the OK softbutton was enabled even with empty passcode box, the codeless pairing might actually work.

Is there anybody capable of unlocking this OK button?

Please

ScruffR
 

hadleymj

Member
Nov 2, 2009
10
0
There is a way to connect to the Wii Remote with a WM 6 device.

The driver you want to look for should come with WM 5 and 6 devices. It has the prefix "BHI" it is not meant for production use, and it somewhat bare-bones, however you can successfully connect to the Wii Remote with it.

The registry path for this driver is:

HKLM\Software\Microsoft\Bluetooth\Hid\Hid_Class

and

HKLM\Software\Microsoft\Bluetooth\Hid\Instance

If you activate these drivers using the Win32 ActivateDeviceEx command (upon hard reset you don't have to do this), you should be able to open up a file stream to the driver.

Code:
HANDLE read_test = CreateFile(L"BHI0:", 0, 0, NULL, OPEN_EXISTING, 0, NULL);

Code:
unsigned __int64 wii_addr = 0x002659F4EEEDL; // BT_ADDR, 64 bits (8 bytes)
Then, I call the DeviceIoControl function to connect to the Wii Remote:

Code:
bool device_io_success = DeviceIoControl(read_test, 1, &wii_addr, sizeof(wii_addr), NULL, 0, NULL,NULL);
	e = GetLastError();

Just replace the wii_addr with your Wii Remote's Bluetooth address.

The source code for this driver can be found by googling:
"bthhid.cxx source code" it should be the first link.

The set of APIs it provides is minimal, and I was not able to get any other function to work besides HIDConnect.

I'm still working on getting some sort of data from it.

Let me know if this works for you,

Mike
 

hadleymj

Member
Nov 2, 2009
10
0
Unfortunately, I can't post the link due to spam restrictions (I just joined the forums recently). However, I have attached the folder that includes all the source files with this post.

This folder comes with Windows CE Platform Builder. It is located here (if you have Platform Builder installed):

C:\WINCE500\PRIVATE\WINCEOS\COMM\BLUETOOTH\PROFILES\HID

If you navigate to the BASE folder, you will find bthid.cpp. This is the main source that contains the stream driver implementation.

The main section of this file to examine is around line 2500 on down. These are the functions that are exposed when you create a file handle to the driver.

Let me know how it works out,

Mike
 

Attachments

  • HID.zip
    26.3 KB · Views: 31
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone