lineSetEquipmentState and "No Service"

  • Thread starter Thread starter crino
  • Start date Start date
C

crino

I've to turn on the phone is it's off
so i use:
LONG WINAPI lineSetEquipmentState(
HLINE hLine,
DWORD dwState
);

but when i call lineSetEquipmentState with 5 as dwState the phone
switch on but it can't find the service!?
if i enable PIN in option all works correctly!?

Any clues??
 
You could unlock the SIM programmatically with SimUnlockPhone. Alternatively
turn off the SIM lock on the device.

Peter
 
ya bu t i can don't know the PIN :(
i would turn on/oof the phoen....why it didn't recognizes the service??!?!
:((
 
Every time you re-activate the phone hardware it will got through the usual
PIN check before registering on the network. If the device has a PIN setup -
you can check for this with SimGetPhoneLockedState, the you could prompt the
user to enter the pin and then call the SimUnlockPhone method with the PIN
they entered - there is probably a way to display the standard PIN prompt
but I can't think of it at the moment.

Peter
 
ya.....i do others tests.
i disabled the PIN request for use phone....but still "No Service" :((
i'm going crazy!!!
 
Looks like there is an additional step - to call lineRegister

I suggest using Alex Feinman's TAPI wrapper to do this:-
http://www.alexfeinman.com/download.asp?doc=tapi1.1.zip
See the CellTSP class e.g.

NativeTapi.lineSetEquipmentState(line.hLine, LINEEQUIPSTATE.FULL)

CellTSP.lineSetEquipmentState(line.hLine, CInt(LINEEQUIPSTATE.FULL))

CellTSP.lineRegister(line.hLine, CInt(LINEREGMODE.AUTOMATIC), Nothing, 0)



Peter
 
Back
Top