Below is a code snipet of how I got PhnLibSetModulePower to work for me.
Maybe it will help you. Note, I used HsGetPhoneLibrary to get a reference
to the library.
Also note that I am turning on the phone to allow the app to connect to the
Internet (hense the call to my function SndProcessConnection())
Cheers,
Joe
...
// Check if phone is on.
if (!PhnLibModulePowered (PhoneLibRefNum))
{
// If phone is off, turn it on
PhnLibSetModulePower (PhoneLibRefNum, true);
}
while (!PhnLibGPRSAttached (PhoneLibRefNum))
{
if (powerOnCounter > MAX_POWER_COUNT)
{
ErrThrow (FsaErrNoNetworkCoverage);
}
powerOnCounter ++;
}
err = SndProcessConnection ();
...
"Martin Bruner" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> That's what PhnLibSetModulePower is suppose to do, but I haven't got it
> running completely.
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Keyur
> Patwa
> Sent: Tuesday, August 10, 2004 2:08 PM
> To: Palm Developer Forum
> Subject: RE: Treo 600 auto turn on wireless mode
>
>
> Hey Marty,
>
> Thanks, it works!
>
> But as u know it pops up a message box asking if the user wants to turn
the
> w/l mode on! Is there any way to turn it on without any user interaction,
I
> mean without asking for the user confirmation?
>
> Let me know if it is possible!
>
> Thanks again,
> Keyur
>
> --------------------------------
>
> -----Original Message-----
> From: Martin Bruner [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 10, 2004 1:28 PM
> To: Palm Developer Forum
> Subject: RE: Treo 600 auto turn on wireless mode
>
> I noticed that when I use PhnLibSetModulePower and attempt to open the
> serial port, I get a hsErrRadioNotRegistered error. So I have been using
> HsTurnRadioOn();
>
> Marty
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Keyur
> Patwa
> Sent: Tuesday, August 10, 2004 9:50 AM
> To: Palm Developer Forum
> Subject: RE: Treo 600 auto turn on wireless mode
>
>
> Hi guys,
>
> I was going through all of your emails regarding this matter as I am also
> willing to turn the wireless mode automatically, programmatically and
> without any user interaction.
>
> I find all the functions u were mentioning but don't find any
documentation
> about which function does what and that confuse me a lot.
>
> Can u tell me WHAT sequence of WHICH function calls should I follow to get
> this thing done?
>
> Right now I am just calling PhnLibSetModulePower (refNum, true); but it
> doesn't turn the w/l mode on. I am opening and getting the reference
number
> of the library correctly as I am already using it to get the IMEI number
> programmatically.
>
> Please reply and help,
> Keyur.
>
>
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/support/forums/
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/support/forums/
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/support/forums/
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/