
Chapter 19: Wireless Wide-Area Networking
Initializing the WWAN Driver
Psion Mobile Devices Developers Guide
202
19.5.3 Initializing the WWAN Driver
The driver is initialized as follows:
1. Call Initialize. During initialization of the WWAN driver and the authentication of the PIN (see PIN
Authentication), none of the WWAN driver status flags is set.
2. When the WWAN driver initialization is complete, the Initialized flag is set. This occurs even if no
network is available.
3. The WWAN driver can now accept any requests except SMS and phone book requests.
4. After a few more seconds, the SMS initialization completes, and the SMS store ready flag is set as
well as the Initialized flag.
5. Phone book initialization can take another minute or more to complete. The Phone book ready
flag is set alongside any other flags that are already set.
If the SIM card has not been activated on the WWAN network, the Bad SIM WWAN driver status error flag
may be set, depending on the startup timing.
The SIM card and the modem must wait to be informed by the network of their activation state on the
WWAN network. This depends on the network coverage and the timing of messages on the network.
PIN Authentication
To determine if a password is needed, the type of password, and to obtain the password, proceed as follows:
• Call OnPinState or GetPinState to determine the password type, if the PUK attempts have not
been exhausted.
Once the PUK attempts are exhausted, the SIM card can no longer be used. The Bad SIM WWAN driver
status flag is set.
If there is no SIM card, either the No SIM, or the Bad SIM, WWAN driver status flag is set.
Sample Code For Initializing WWAN
This example provides a safe and reliable way to ensure that the WWAN interface is initialized correctly.
This example is written in C++; however, the same process can be followed for a .NET application.
Note: Each Initialize call must be paired with a Shutdown call. See Section 19.6 Closing WWAN on
page 205 for details.
Warning: If you call Initialize several times WITHOUT calling the Shutdown method, eventually a
call to Initialize will fail. Before WWAN can be initialized again, the computer must be
reset; a warm reset is recommended.
Problem WWAN Driver Initialization Status Flag
PUK attempts exhausted. Bad SIM
No SIM card. One of the following (depending on the modem type):
•No SIM
•Bad SIM
The WWAN driver cannot communicate with the modem. Failure
An initialization command failed. Failure
// Use this class in the function, InitializeWWANAndWait
class WWANReadyStateListener : public PsionTeklogix::WWAN::IndicationsListener
{
public:
WWANReadyStateListener()
{
// Create an event to wait on, this object signals it when WWAN is ready.
WwanReadyEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
}
Kommentare zu diesen Handbüchern