Turning on the phone on an XDA2

  • Thread starter Thread starter Jon Skeet [C# MVP]
  • Start date Start date
J

Jon Skeet [C# MVP]

I've found that the OpenNetCF ConnectionManager can correctly initiate
a GPRS connection *if* I've already got the phone part of my XDA2
"switched on". I've had a look at the Pocket PC SDK documentation, and
I can't find any way of programmatically switching the phone on though,
which is somewhat disappointing.

I'm assuming it can be done somehow or other - what have I missed?
 
I think it can be done with the lineSetEquipmentState function in TAPI with
the LINEEQUIPSTATE_FULL constant to turn on both send and receive radio.

Peter
 
Peter Foot said:
I think it can be done with the lineSetEquipmentState function in TAPI with
the LINEEQUIPSTATE_FULL constant to turn on both send and receive radio.

Aha - great, thanks very much :)

(Now to wrap all the TAPI calls appropriately... :)
 
Peter Foot said:
I think it can be done with the lineSetEquipmentState function in TAPI with
the LINEEQUIPSTATE_FULL constant to turn on both send and receive radio.

Damn - I've just seen that to use lineSetEquipmentState I would need to
use cellcore.lib. I haven't done much interop, but am I right in saying
I can only use P/Invoke with dynamically linked libraries, not
statically linked ones? If so, does that mean I'd have to write a
separate unmanaged executable to do this?

I think if it does, I'll see if I can push back on doing this at all...
 
Jon Skeet said:
Damn - I've just seen that to use lineSetEquipmentState I would need to
use cellcore.lib. I haven't done much interop, but am I right in saying
I can only use P/Invoke with dynamically linked libraries, not
statically linked ones? If so, does that mean I'd have to write a
separate unmanaged executable to do this?

Ignore me. Brain fart moment.
 
Alex Feinman said:
I have updated my TAPI wrapper to support this function
http://www.alexfeinman.com/download.asp?doc=tapi1.1.zip

Superb - thanks ever so much! I was just starting to despair at working
at how to use TAPI from the Compact Framework, not having done much in
the way of interop and never having touched TAPI before...
The sample app MakeCall has now a checkbox that turns the phone on and off.
YOu need to select "Cellular Line" in the list of devices first

Cheers. I'll look at the code and work out how to do it
programmatically.
 
Back
Top