HOWTO: programmatically determine BT device type - Windows Mobile Development and Hacking General

hi all,
When I use comm manager in my PDA to scan for bluetooth devices it can detect the BT device type and shows different icons for PDAs, phones or workstations.
I want to implement this capability in my BT program, anyone knows how to do this or have some tips or links or anything useful????? I use eVC++ 4.0, 2003se sdk.
Thaaaaaaaaaaaaaaaaaaaaaanks alot
Mohammad

look for WSALookupServiceBegin
tons of lines of code

Related

Enable/Disable WLAN programatically ???

Hi,
Can anyone help me with this information that how can I Turn ON/OFF Wireless LAN programatically? (I want to implement this capability to an application i'm developing) based on my BA device (running WM5 patched rom).
I usually do it from from a GUI based application named WLAN_MAN. (control pannel applet) but how can I write an application like that for my purpose.
Is there any Service required to start ? or any run time registry modification is nedded ? or anything else to On/OFF WLan on a BA device running WM5 .
Mamich/ Buzz / Vijay and all other Geeks ! please help me
:roll:

bluetooth stack + api, sdk

i'm looking for a sdk or api for the bluetooth stack on the magician. I'm planning on writing a tool that will enable some much needed stuff on wireless headsets (caller id and other stuff)
but i do need that api to do stuff, as i can't really find any info on the handling of the protocols and profiles
Justice Strike said:
i'm looking for a sdk or api for the bluetooth stack on the magician. I'm planning on writing a tool that will enable some much needed stuff on wireless headsets (caller id and other stuff)
but i do need that api to do stuff, as i can't really find any info on the handling of the protocols and profiles
Click to expand...
Click to collapse
I do not know if it can help you but this is a free compact framework library with many Bluetooth oriented classes
http://32feet.net/library/
i've seen it, it's seriously underdocumented. their is only the name of a specific function, but no explanation about it.
Hey,
the bluetooth stack on the magician is from microsoft. There are several commercial and non-commercial bluetooth API`s around. Commercial for example: www.franson.com. Non- Commercial: search for Peter Foot on Google.
Later,
sojakim

Control Radio Devices [Bluetooth, Phone, WiFi] Programatically

Hi all,
It is possible to have a multi-platform solution for controlling the Radio Devices Hardware.
For this we can use some exports in the ossvcs.dll file.
I have prepared an article descriebing this procedure, and a c++ sample.
The link is:
http://www.teksoftco.com/forum/viewtopic.php?t=194
Ciao
Very interesting. Any progress?
Navigating to Bluetooth settings on a HTC HD2 with WM6.5 programatically
Hi,
Just to expand on this, does any body know how to directly navigate to the Bluetooth settings on a HTC HD2 WM6.5 device programmatically. I have tried the following, but it does not seem to work:
System.Diagnostics.Process.Start(@"\Windows\ctlpnl.exe", "cplmain.cpl,23");
System.Diagnostics.Process.Start(@"\Windows\ctlpnl.exe", "cplmain.cpl,23,0");
System.Diagnostics.Process.Start(@"\Windows\ctlpnl.exe", "cplmain.cpl,23,1");
I have tried other combinations to access, say the GPS settings and it does work. So what am I doing wrong?
Any help would be most appeciated.
Thanks

Remote PDA Management Software

Hi all,
I joined the forum because I'm looking to design a PC application using Visual Studio 2005 that will connect to most phones and allow you to send/receive SMS, manage contacts, perhaps even use any onboard camera as a webcam.
I'm an experienced programmer, but know little about the architecture on the Andes, which is my testbed.
Basically, all I need to get started on the basics is how to communicate with the device using a serial connection (Not in debug mode though!), or the best way to accomplish this if not bluetooth.
Any/all help appreciated. I'm not looking for code just a procedure to establish a serial link that'll allow me to issue commands to the device whilst its in its usual turned on and usable state, or docked. However if you think it'll help please feel free.
Many thanks in advance!
opennetcf.org has examples and a free library which you can download
Eelco
Many thanks! However from what I can see, I'd need the latest version, which is not free :S Any attempt to install the previous SDK's fail as I'm running VS2005...
Ok, to clarify, I'm looking for a framework for a windows application that will enable me to connect to a smartphone, and control it. From what I can tell from the above site, the Opennetcf libraries are for a device application... I've installed the free version of the libraries and they work find under the emulator, but that's not really what I'm after...

[UNDER DEVELOPMENT]Windows Mobile 6 Bluetooth and Wiimote

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
Sorry, i cant help you but i will love control a wii with my HD...
I am speaking of the other way round , 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
I have found something here: http://www.eggheadcafe.com/software/aspnet/31158420/big5bxf276hrqkrnsut.aspx
I will see if it helps
Mhh, to bad, I cannot find the source files I would need
They maybe in the "Windows CE 5 platform builder" But the Online Setup I was able to get doesn't work anymore
scilor said:
I am speaking of the other way round , 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
Click to expand...
Click to collapse
Control your Wii with HD... It would be a great app.. if you can write it...
Thanks my Friend.
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.
@l3v5y Why you have always the same ideas I do
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?
please setup a team , winmo need you
cheer
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!
I found following in the thread of WiiMöb: http://wiimob.codeplex.com/Thread/View.aspx?ThreadId=10953
"But it seems likely that any purely bluetooth work was a red herring, and we just need to tackle BTHHID.DLL and devise a P/Invoke library that will get us a Filehandle to the device through the HID stack."
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
The problem is that the WM Devices misses a special HID driver . You may connect it with out a passcode with some tricks but this won't help because you cannot connect to the device
Look at this Symbian project http://www.symbianresources.com/projects/wiirider.php - maybe that will help. I got the same problem like everybody - can't pair device :s
We cannot connect the WiMote low-level easily, that is the big problem. If we could it would be easy.
...I'm assuming this has been abandoned? :/
Until someone finds a way to get a stream, the development is stopped
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
Could you send me a link to the source? I am finding any
I will take a look later, maybe we get it running
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

Categories

Resources