Toggle WiFi in C++? - Windows Mobile Development and Hacking General

Hi,
I need to toggle wifi (turn it on/off) in my program HButton.
I that moment, I use following procedure:
1, find registry HKLM\System\CurrentControlSet\Control\Power\State search for key that starts with {98C5250D-C29A-4985-AE5F-AFE5367E5006} – I read somewhere, that this is way to find out WiFi device name
2, use GetDevicePower / SetDevicePower for that name
But two bugs was reported to me from users
- on some devices WiFi registry key wasn‘t found.
- Sometimes, it doesn’t work after device boot, if it wasn’t at least once turned on using another tool.
Is there another way to turn wifi on/off, or how to find WiFi device name?
On my device (Trinity w6.1) it works fine, so it’s hard to find a bug.
Thanks for help

Read here... http://www.teksoftco.com/articles/article 007/radiodevices.htm

A_C said:
Read here... http://www.teksoftco.com/articles/article 007/radiodevices.htm
Click to expand...
Click to collapse
that‘s look promising. Thanks a lot.

Related

Wi-Fi Shortcut on Today Screen

Hi All
Does anybody know or has utility to create shortcut to turn on/off Wi-fi on Today screen? I really need it 'coz it can save my time when I want to control it.
Thanks
Mr.T
...I guess thats not really what you mean ?!
http://www.htcclub.net/en/toontips.php?ID=13
You can use VJVolubilis if you have software that allows you to put links to programs on your today screen, or else put the wifi toggle command in your list of permenant start programs. The registry hack doesn't seem to do anything other that show the status of the bluetooth and WIFI connections on my universal. You can get VJVolubilis from http://www.vijay555.com/
MNeo said:
...I guess thats not really what you mean ?!
http://www.htcclub.net/en/toontips.php?ID=13
Click to expand...
Click to collapse
Thanks man...I'll try it.
shuflie said:
You can use VJVolubilis if you have software that allows you to put links to programs on your today screen, or else put the wifi toggle command in your list of permenant start programs. The registry hack doesn't seem to do anything other that show the status of the bluetooth and WIFI connections on my universal. You can get VJVolubilis from http://www.vijay555.com/
Click to expand...
Click to collapse
I've tested this software alreay. But, it didn't work on my PPC.
(Dopod 818 Pro with WM5). Anyway, thanks so much for your info. :lol:
@Theerayuth
There was some mentione here, that VJVolubilis actually does work on the prophet, after you have at least once manually turned on/off the Wifi in the Com Manager.
Now I wondering, if we do use the wifi toggle at startup, will this enable VJVolubilis to work afterwards without the need for one turning on/off in Com Manager?
Any thoughts?
Theerayuth said:
shuflie said:
You can use VJVolubilis if you have software that allows you to put links to programs on your today screen, or else put the wifi toggle command in your list of permenant start programs. The registry hack doesn't seem to do anything other that show the status of the bluetooth and WIFI connections on my universal. You can get VJVolubilis from http://www.vijay555.com/
Click to expand...
Click to collapse
I've tested this software alreay. But, it didn't work on my PPC.
(Dopod 818 Pro with WM5). Anyway, thanks so much for your info. :lol:
Click to expand...
Click to collapse
This works on the m600, but clicking it only opens the comm manager, just as fat to click the comm manager button!
This works on the m600, but clicking it only opens the comm manager, just as fat to click the comm manager button![/quote]
I'm afraid that it work on m600 only, but, not apply to Dopod 818 Pro. May be I have to find other softwares to handle it. Anyway, thanks so much for your info.
Mr.T
krale said:
@Theerayuth
There was some mentione here, that VJVolubilis actually does work on the prophet, after you have at least once manually turned on/off the Wifi in the Com Manager.
Now I wondering, if we do use the wifi toggle at startup, will this enable VJVolubilis to work afterwards without the need for one turning on/off in Com Manager?
Any thoughts?
Click to expand...
Click to collapse
In my case (XDA Neo) I've just copied Windows\WiFiInit.lnk to Startup folder and after that wifi switching with VJVolubilis works fine. even after device restart.
http://forum.xda-developers.com/viewtopic.php?p=328348#328348
V

Problem with WiFi

If I press wlan button in Comm Manager than WiFi should be ON but it is not. I did use some different roms but still nothing. Somebody know what to do ?
settings-connections-wireless lan - there is only message:
Wireless LAN is OFF.Turn on Wireless LAN.
It does not work. Please help me.
Go back to wm5. If your lucky it might come back. The more I dig through here the more I see people with wifi problems after flashing. You might be out of luck
HOWEVER
I noticed under WM6 the bubble that pops up when you click on the wifi tower ALWAYS says 'turn on wifi'
Good luck!
Same problem with my WI-FI, Not working please help!!!!
Hi All. I am facing the same problem with my WI-FI as Vomithaus is having. Whenever I try to to connect to WIFI from Commmanager, it tries to and then to show disconnected. When i go to settings> Wireless LAN, it asks me to "Configure Network Adaptors", and lists all the adaptors and going into them asks about the ip settings and stuff like that. By the Way I Bricked my phone once and then i flashed with T-Mobile Ship WM6.0 RUU for the WING. And I strongly suspect that the registry setting are not right or the Radio ROM is F***ed up. Can any knowledgeable person help me please? I would greatly appreciated any help.
Same problem with my WI-FI, Not working please help!!!!
This is the addeneum to the last post. The last remaining screenshot for the above post. The last screen shot of the "Wi-Fi Status" in the "Settings > Connection", gives me an option to "Turn on Wi-Fi" but toggeling it results in nothing. Thank You everybody for your time and consideration.
It might help us to figure out how this happened too. I bought the EXEC off of ebay and it was like this from the get go. The previous owner flashed it to wm6 about 1 month ago, but said it was working fine... all he did was hard reset to get rid of the personal information. I want to believe him, but there are a few people on here complaining of flashing the exec and losing wifi. (even the official rom from O2).
Flashing COULD have damaged the transmitter, but it seems more likely that a setting is wrong somewhere (especially since there is a slider bar for WIFI battery vs performance).
This is good news (somewhat), but the bad news is that if there is one, no one knows about it. I have messed around in the registry (there were some promising entries related to POWER), but nothing that even showed a response. I found the entry that connects to the slider bar, but PERFORMANCE = zero, so there is nowhere to go there but WORSE.
This really sucks, is all I can say. I blew $500 on something that is useless (well... not useless, but no WIFI? WHY COULD IT HAVE NOT BEEN BLUETOOTH!)
Another step I have taken is contacting PPC Tech's via email and asking them if they have any idea how to repair it, and how much $$$
I'll keep you informed.
Can you tell me if yours EVER worked, and if so, when it stopped?
I just looked closer at your screenshots.... Do you have a WIFI card? (it say's 'adapter').
No, I dont have a WIFI card but this is way how windows handles all is peripherals (services), as an add-on card. just like you laptop.
Guys, There is a registry fix for this problem.
Please take look here :
http://forum.xda-developers.com/showpost.php?p=1475527&postcount=14
Ron
I am afraid Ron that this is not a case as suggested in Beowulf6's solution. If it is the solution I dont know how to exactly implement it. But I am posting here the exact registry key screenshot for you guys to take a look also. I can't see and TNETWLN1 or TNET12345 key here in my device. I still think it has to something with the registry. Can any one here with a T-Mobile WING verify and post their screen shot? or maybe send me a registry backup to compare with? It would be really grateful it some does that. Thanks everybody for a few seconds to read this.
In my herald i can't see TNETWLN1 or TNETWLN12345 too.
I did use Mobile Registry Editor for that , what you guys are useing?
(sorry for my English, if you dont understand me just tell me please)
Look at the screenshots, there a Reg Folder with the name WLAN, open it, and then open the key with all the numbers and letters. At the end of that line is a code. TNETWLAN1 is what it should be for the Herald.
f_v_man said:
I am afraid Ron that this is not a case as suggested in Beowulf6's solution. If it is the solution I dont know how to exactly implement it. But I am posting here the exact registry key screenshot for you guys to take a look also. I can't see and TNETWLN1 or TNET12345 key here in my device. I still think it has to something with the registry. Can any one here with a T-Mobile WING verify and post their screen shot? or maybe send me a registry backup to compare with? It would be really grateful it some does that. Thanks everybody for a few seconds to read this.
Click to expand...
Click to collapse
It is like Bio88 says.
You are already on the right track... click on WLAN and you will find the key.
Change the value of the key into TNETWLAN1
Done
bio88 said:
Look at the screenshots, there a Reg Folder with the name WLAN, open it, and then open the key with all the numbers and letters. At the end of that line is a code. TNETWLAN1 is what it should be for the Herald.
Click to expand...
Click to collapse
Hi Please look at my screen shot again clearly. I did post what is inside the WLAN folder. There are only two keys :
1) (Default) \Windows\ctlpnl.exe
2) CmdLine cplmain17
I still can't figure where is the key with numbers and letters. Sorry If I am a bit dumb or wrong. Thanks.
it is possible if you use the default Commanager that you dont have this registry key.
I dont know if it helps if you create it on your own.
but for me where i installed a different commanager, the Key was there and i edited it for the wlan button.
My Tmo Wing has "TIACXWLN1" in that registry key.
Do those changes apply to the herald and the Wing interchangeably?

HTC P4350 Wi-Fi Problem

I bought a second hand HTC P4350 off eBay. As soon as I received it, I registered it with HTC eClub and downloaded the Windows Mobile 6 upgrade. The upgrade process was flawless.
The problem is that Wi-Fi is not working. I press the button on the right, the comm. Manager appears, and there’s an “X” over the Wi-Fi icon. I click on it, the round color circle appears for a few seconds, and then it goes away, and there’s still an “X” on the Wi-Fi icon.
So I tried it differently. I went to “Start >Settings>Wireless Lan> Turn on Wireless LAN” but nothing happens.
What could be the problem here?
Thanks.
Ok, try this: http://forum.xda-developers.com/showthread.php?t=326655
Step 2: (Fixing WLAN button malfunction, somehow it doesn’t work by default on Wing): **Thanks for beowulf6’s post for this fix.
Change "HKEY_LOCAL_MACHINE \SOFTWARE \HTC \CommManager \WLAN= "Windows WLanMgr.exe " "DeviceName" = "{98C5250D-C29A-4985-AE5F-AFE5367E5006} TNETW12345"
the end of this long String is the WLAN-Adaptername of the Device.
just change in this Example "TNETW12345" into "TNETWLN1"
-Step 3: (Fixing Wi-Fi setting launch issue) **Thanks for phatman81’s post for this fix.
Change "HKEY_LOCAL_MACHINE\SOFTWARE\HTC\CommManager\WLAN\ Default:"
\Windows\WlanMgr.exe --> \Windows\ctlpnl.exe
Good luck
Tried it, not working
Any more suggestions?
-Step 3: (Fixing Wi-Fi setting launch issue) **Thanks for phatman81’s post for this fix.
Change "HKEY_LOCAL_MACHINE\SOFTWARE\HTC\CommManager\W LAN\ Default:"
\Windows\WlanMgr.exe --> \Windows\ctlpnl.exe
On the last line instead of ctlpnl.exe put WLANSettings
That should do the trick. You will need to click on left soft button on Menu to access your Network Configuration screen! Good luck!
Ok, now I can see the WIFI settings, but as for changing "TNETW12345" into "TNETWLN1", my P4350 says "TIACXWLN1". SHould I change anything there?
Thanks
Hi,
It seems like I have this problem to.
When I go to Connmanager and tap my Wifi button, it starts to scan but eventually it wil not start. The Wifi icon still has a red cross in it.
I have tried every way but my Wifi wont start.
I have searched for the registry strings above, but cant find them.
So my question is if someone knows which string enables you Wifi adapter....
I have the P4350 With WM6. No extras installed. I use the HERALD-USPL-beta3full
Pleas anybody help me otherwise ill have to send it back....
The problem is that i cant find the specified keys above... In HKEY_LOCAL_MACHINE \SOFTWARE \HTC \CommManager
is no Wlan folder, and no defined strings......
i changes all that on mine and it still does not work
I'm having this same problem with my wi-fi.
It has started when I tried to change my official version of p4350's WM to the one with the TOUCH's Cube and touchflo posted in this tread: http://forum.xda-developers.com/showthread.php?t=345347&highlight=cube+p4350
I heard that Touch duo don't have wi-fi, and I'm affraid that this could have removed my "Sdio Wlan" driver from my p4350.
I've made a hard reset, and installed the official WM for my phone, but it still not working the wi-fi.
Please, someone can help us? Cause it's really sad to loose that funcionality on the device.
Could it be just a reenstalation of the SDIO WLAN driver? If yes, how to do this?
Can anybody pleas tel me where the registry keys for WIFI are..?
If I know where to look than ill try to find the answer my self. But i cant find the correct keys and values.
If i find out, then ill post the solution right away.!
I have the same problem with the wifi, I press the button on the right, the comm. Manager appears, and there’s an “X” over the Wi-Fi icon. I click on it, the round color circle appears for a few seconds, and then it goes away, and there’s still an “X” on the Wi-Fi icon.I tried to solve the problem with the registry keys, but nothing happens. what can i do? are there drivers for wifi to install on the pocket pc...thanks in advanced.
Hi,
I have exactly the same problem.
When i go into the registry path:
HKEY_LOCAL_MACHINE \SOFTWARE \HTC \CommManager
I do not have a WLAN folder.
So i cannot change any registry settings related to WLAN.
I did a fresh install of WM6 from the HTC website and do not have any programs or apps loaded on it besides my registry edit application.
When i go to Configure Network Adaptors, i can see teh SDIO WLAN Wireless adapter and i can change the ip address settings, just to check and see if it works.
Please help me!!!
Wifi doesn't start
I got the same Trouble with my HTC and it is nor possible to fix it OR ?
Daniel.
same problem
i have the same problme
after flashing the Rom with the touch FLO and after tht wifi is not working
can somebody help me out
i will donate him for sure!!!
Wifi Drivers
Good Question About Reinstalling The Drivers For Herald/tmobile Wing.
If There Is Where Can I Dl It
WIFI not working
Maxmatta did you get this problem sorted I had gone and done the same. Will you please assist me in solving this problem.
maxmatta said:
I'm having this same problem with my wi-fi.
It has started when I tried to change my official version of p4350's WM to the one with the TOUCH's Cube and touchflo posted in this tread: http://forum.xda-developers.com/showthread.php?t=345347&highlight=cube+p4350
I heard that Touch duo don't have wi-fi, and I'm affraid that this could have removed my "Sdio Wlan" driver from my p4350.
I've made a hard reset, and installed the official WM for my phone, but it still not working the wi-fi.
Please, someone can help us? Cause it's really sad to loose that funcionality on the device.
Could it be just a reenstalation of the SDIO WLAN driver? If yes, how to do this?
Click to expand...
Click to collapse
Decon did you get the wifi sorted on your devise am sitting with the same problem please assist
HELP!
I know, this is an old thread, but its really important for me...
Is there no way to enable wi-fi again on the phone?
It is really impossible to re-install the wi-fi driver for the phone...
can nobody help me out?
daffies said:
Hi,
I have exactly the same problem.
When i go into the registry path:
HKEY_LOCAL_MACHINE \SOFTWARE \HTC \CommManager
I do not have a WLAN folder.
So i cannot change any registry settings related to WLAN.
I did a fresh install of WM6 from the HTC website and do not have any programs or apps loaded on it besides my registry edit application.
When i go to Configure Network Adaptors, i can see teh SDIO WLAN Wireless adapter and i can change the ip address settings, just to check and see if it works.
Please help me!!!
Click to expand...
Click to collapse
I know I'm digging up a old folder, but I have the same no wlan folder issue.

Activate WiFi, update Manila weather, Disable Wifi [Looking for solution]

Hi,
I'd like to create a script or application to enable Wifi, update manila weaher (or do any other operation e.g. download mails, etc) and finally disable Wifi.
If a can product a mortscript or a command line app for this, I could use it with Wifilocations to define rules for home gsm cell, workplace gsm cell (where wifi available).
Are there any ideas or solutions for this?
Yes, I used search button, but didn't find anything.
Thanks!
I'm pretty sure mortscript can do this. You might want to read up on it.
Hi
Search at pocketpc[dot]ch for "zeitgesteuertes-wetterupdate".
There is a complete MortScript solution.
But I'm still searching for the command-file.
Any solution? c# code, mortscript, shortcut with params?
a246783 said:
Any solution? c# code, mortscript, shortcut with params?
Click to expand...
Click to collapse
I can try to program a little app for you, but I need to know what version of manilla you have. (do you mean you want a tool to activate wifi, update the weather tab and then desactivate wifi, yes ?)
seb3773 said:
I can try to program a little app for you, but I need to know what version of manilla you have. (do you mean you want a tool to activate wifi, update the weather tab and then desactivate wifi, yes ?)
Click to expand...
Click to collapse
Could you share code (snippet or link) how to force weather update, please?
I'm using scheduler, where I can switch wifi on/off and execute apps. I'm windows-desktop developer and I would like to try write simple c# weather-update-app on my own.
anyone, please?
yes it would be nice.
turn on wifi, update active sync, update weather and upadte Quick GPS and then turn off wifi. I have a htc touch HD with WM6.5. I don't know where I can see the manila version, could you help me with that also? =)
Thanks
kolomparrudi said:
Hi,
I'd like to create a script or application to enable Wifi, update manila weaher (or do any other operation e.g. download mails, etc) and finally disable Wifi.
If a can product a mortscript or a command line app for this, I could use it with Wifilocations to define rules for home gsm cell, workplace gsm cell (where wifi available).
Are there any ideas or solutions for this?
Yes, I used search button, but didn't find anything.
Thanks!
Click to expand...
Click to collapse
Well i hope this is a solution to your problem wifi on demand
http://forum.xda-developers.com/showthread.php?t=579965
Good luck
wapvirus said:
Well i hope this is a solution to your problem wifi on demand
http://forum.xda-developers.com/showthread.php?t=579965
Good luck
Click to expand...
Click to collapse
It only acivates wifi (that's not difficult to achieve). The problem is how to force weather update...

tg01 + sense + wifi

hi,
I have aRaGoN's ROM with sense and I can't turn on the wifi. Can someone please step by step how to do it? It is strange, it is turned on, but arrows moving and then suddenly disappear. If someone could make a short tutorial video I would be thankful.
I have searched on youtube, but without luck
yaro666 said:
hi,
I have aRaGoN's ROM with sense and I can't turn on the wifi. Can someone please step by step how to do it? It is strange, it is turned on, but arrows moving and then suddenly disappear. If someone could make a short tutorial video I would be thankful.
I have searched on youtube, but without luck
Click to expand...
Click to collapse
You need to use the toshiba settings not the HTC one in comm manager, or try this:
Go to key in registy "HKLM\Software\Drivers\WLAN" and copy the value from 'AdapterName" string. Now go to key in registry "HKLM\Software\HTC\CommManager\WLAN" and edit "DeviceName" string. You see there value like this: "{98C5250D-C29A-4985-AE5F-AFE5367E5006}\TNETW12511". Delete the last part of this value ("TNETW12511") and past the value "AdapterName" which you copy at end. Make soft reset and that is all. Now Wifi button on your device should work properly.
You should search this site as you will find the answer to most questions here. YouTube won't be much help for something this specialist.

Categories

Resources