x
This website is using cookies. We use cookies to ensure that we give you the best experience on our website. More info. That's Fine
HPC:Factor Logo 
 
Latest Forum Activity

Is there a way to reduce/cut the power to a PCMCIA WiFi card?

1 2
CAuser Page Icon Posted 2008-03-17 1:48 PM
#
Avatar image of CAuser
H/PC Sensei

Posts:
1,278
Location:
Silicon Valley, USA
Status:
As we know, CE.NET 4.2 allows us to disable a PCMCIA WiFi card as we do under regular Windows. However, the card seems to still use significant power as opposed to the case in Windows like 2000. Is there a way to reduce/cut the power? Probably, a registry setting can do the job.

Under HPC2000, Both Linksys and 3Com have an option to turn off the radio. I wish we could have a similar way or a registry hack to conserve energy on our CE.NET devices. This is in line with my pursuit of an INTERNAL/BUILT-IN WiFi on 2 major devices J7xx and MP900C.

Edited by CAuser 2008-03-17 1:57 PM
 Top of the page
isotherm Page Icon Posted 2008-03-17 5:54 PM
#
Avatar image of isotherm
H/PC Elite

Posts:
504
Location:
United States
Status:
Yes, call API DeactivateDevice. The parameter it requires is the device's handle which is stored in the registry under HKLM\Drivers\Active\##\Hnd. This effectively removes the card as far as the OS is concerned. The power can be resumed with ActivateDevice. See the MSDN documentation for these functions for more details.
 Top of the page
CAuser Page Icon Posted 2008-03-17 7:00 PM
#
Avatar image of CAuser
H/PC Sensei

Posts:
1,278
Location:
Silicon Valley, USA
Status:
Thanks for your expert advice. So, just call the API from command line? I'll try it and report the result.

Edited by CAuser 2008-03-17 7:01 PM
 Top of the page
Rich Hawley Page Icon Posted 2008-03-17 7:11 PM
#
Avatar image of Rich Hawley
Global Moderator
H/PC Guru

Posts:
7,188
Location:
USA
Status:
I was thinking the same thing...but more conventional, such as a simple spst switch in series with the pin that supplies power to the pcmcia card....

I've been toying with the idea of mounting a cf wifi card in the pcmcia slot, making the appropriate pin changes to match up with the card. Then mounting a simple slide switch near the opening...something only slightly recessed so that I could physically turn the card on and off.

Maybe even mounting the led next to the switch so that I could see the light. Then feeding a small cable up through the hinge area and attaching it to an antenna, half-wave dipole type on the inside of the lid...

Another project that will probably never see fruition...

Rich
 Top of the page
isotherm Page Icon Posted 2008-03-17 7:15 PM
#
Avatar image of isotherm
H/PC Elite

Posts:
504
Location:
United States
Status:
You would need to create a program which calls the appropriate API's (in coredll). As far as I know, there's no way to enable/disable PCMCIA cards with registry editing only. However, on the positive side, such a program could do this for any PCMCIA/CF device (not just wireless cards).

By the way, I haven't tried this on CE.NET (only CE 3.0). Maybe it wouldn't work. But as far as the OS is concerned, doing this should be just like if you said "No" to the "Use PCMCIA card while running on battery?" warning. It removes it from the System cpanel applet, for example; as far as the OS is concerned, the card is removed. Hopefully that is enough so that it cuts the power.

You can try it easily enough without writing a full-fledged program; just find the appropriate Hnd value in the registry, as I described above, and then run a program with the following principal line:
DeactivateDevice((HANDLE)0x12345678);
where 12345678 is the hexadecimal handle value you retrieved from the registry.

Edited by isotherm 2008-03-17 7:25 PM
 Top of the page
CAuser Page Icon Posted 2008-03-17 7:18 PM
#
Avatar image of CAuser
H/PC Sensei

Posts:
1,278
Location:
Silicon Valley, USA
Status:
You may want to take a look at my project for a hidden antenna with the shortest WiFi card I have ever touched!
http://www.hpcfactor.com/forums/forums/thread-view.asp?tid=11521&posts=4&start=1
 Top of the page
isotherm Page Icon Posted 2008-03-17 7:28 PM
#
Avatar image of isotherm
H/PC Elite

Posts:
504
Location:
United States
Status:
Hm, I see it... I better get selling my 3com xjack cards! But anyway they only work on Jornadas... you have the rest of the device market. See my edit above concerning details of enabling/disabling the card.
 Top of the page
CAuser Page Icon Posted 2008-03-17 7:43 PM
#
Avatar image of CAuser
H/PC Sensei

Posts:
1,278
Location:
Silicon Valley, USA
Status:
I do have VC6 and 8 on my desktop PC, but I have never written a program for CE devices. Can I do it using VC on the desktop PC? Or, do I have to use CE Platform Builder?
 Top of the page
CAuser Page Icon Posted 2008-03-18 8:08 AM
#
Avatar image of CAuser
H/PC Sensei

Posts:
1,278
Location:
Silicon Valley, USA
Status:
Well, I just realized there's a simple way. The built-in card detection on battery is perfect for cutting off the power to the card. After a soft reset, we'll be asked whether we want to use the card on battery or not. Of course, this feature has been disabled in the custom ROM. So, I'm going to ask Cmonex to enable it as it is very important for MP900C users to have the option to use a card on battery and cut off the power to it at will.
 Top of the page
CAuser Page Icon Posted 2008-03-20 11:41 AM
#
Avatar image of CAuser
H/PC Sensei

Posts:
1,278
Location:
Silicon Valley, USA
Status:
Cmonex told me Smalltweak in the Custom ROM could re-enable the feature. So, cutting off the power to the card is as easy as running the program once.
 Top of the page
cmonex Page Icon Posted 2008-03-21 12:51 AM
#
Avatar image of cmonex
H/PC Oracle

Posts:
16,175
Location:
Budapest, Hungary
Status:
Quote
isotherm - 2008-03-18 1:15 AM

You would need to create a program which calls the appropriate API's (in coredll). As far as I know, there's no way to enable/disable PCMCIA cards with registry editing only. However, on the positive side, such a program could do this for any PCMCIA/CF device (not just wireless cards).

By the way, I haven't tried this on CE.NET (only CE 3.0). Maybe it wouldn't work. But as far as the OS is concerned, doing this should be just like if you said "No" to the "Use PCMCIA card while running on battery?" warning. It removes it from the System cpanel applet, for example; as far as the OS is concerned, the card is removed. Hopefully that is enough so that it cuts the power.

You can try it easily enough without writing a full-fledged program; just find the appropriate Hnd value in the registry, as I described above, and then run a program with the following principal line:
DeactivateDevice((HANDLE)0x12345678);
where 12345678 is the hexadecimal handle value you retrieved from the registry.




well i wrote a program that does this, but it only turns the PCMCIA slot off, but the OS still thinks the driver is loaded... the PRISM1 is still in network connections, Storage Card folder is still there,

and i can't reload the driver by reinserting a card... you have to soft reset or run another program that activates it... which i did. but due to the fact the OS didn't fully realize i unloaded the driver previously it then asks me for the wifi card driver name and names the CF card Storage Card2 and Storage Card (which is invalid) is still there too.

so what did i do wrong, also, this turns CF off too, maybe not the perfect way to deal with this



EDIT: sorry, i realize now i was accessing the lowlevel pcmcia driver
but the wifi and the CF have their separate drivers too, so this sounds like a perfect solution!

yes, i can now turn the wifi off nicely, while CF is still working.

i'll soon release an app that can turn wifi off / on and maybe CF and full pcmcia too though i don't see a point in those

app already works for me but i want to clean it up etc.
for example, it'll need a way to find your wifi card's pnpid in the registry, because that varies for each wifi card model, until then it won't know what to turn off... what would be the most user friendly way to do that?

for example on first load it could require you to turn the wifi on, then it can look at all active drivers and find something that seems like a pcmcia card's pnpid... maybe. then save that for future use. or the user can input it in an .ini file? any better ideas?

Edited by cmonex 2008-03-21 1:12 AM
 Top of the page
cmonex Page Icon Posted 2008-03-22 7:57 PM
#
Avatar image of cmonex
H/PC Oracle

Posts:
16,175
Location:
Budapest, Hungary
Status:
anyone interested? would this be a nice feature of v3 rom?

if no one answers i'll keep the program to myself, because then i can't be bothered to write one that doesn't hardcode the pnpid of my own wifi card (i.e. could be usable to anyone, not just me).

Edited by cmonex 2008-03-22 7:58 PM
 Top of the page
sfangc Page Icon Posted 2008-03-22 11:22 PM
#
Avatar image of sfangc
H/PC Newbie

Posts:
23
Status:
Quote
cmonex - 2008-03-23 8:57 AM

anyone interested? would this be a nice feature of v3 rom?


Yes, I am interested.
 Top of the page
cmonex Page Icon Posted 2008-03-23 12:34 AM
#
Avatar image of cmonex
H/PC Oracle

Posts:
16,175
Location:
Budapest, Hungary
Status:
ok i'll go and write the rest of the program tomorrow so it can be generally usable
 Top of the page
Dan Page Icon Posted 2008-03-23 5:11 AM
#
Avatar image of Dan
H/PC Elite

Posts:
672
Location:
(lost in) Italy
Status:
Quote
sfangc - 2008-03-23 5:22 AM

Quote
cmonex - 2008-03-23 8:57 AM

anyone interested? would this be a nice feature of v3 rom?


Yes, I am interested.



Highly interested too
That would be a nice feature indeed !

Edited by Dan 2008-03-23 5:15 AM
 Top of the page
1 2
Jump to forum:
Seconds to generate: 0.218 - Cached queries : 69 - Executed queries : 12