Qtopia provides a Modem Simulator (called phonesim) to allow testing of telephony applications without the need for access to an actual modem. The simulator provides an AT command channel with responses defined by an XML description. The Modem Simulator is not designed as a total replacement for a functioning phone/modem but is a flexible and useful simulation tool.
Much of the Modem Simulator's behavior is configurable by modifying the troll.xml and peers.xml files.
Simulated SIM card
The Modem Simulator provides access to a variety of simulated SIM card functionality, including:
response to initialization commands allowing Qtopia to determine whether a PIN is required to initially unlock the phone on startup
connecting to the (simulated) GSM phone network.
report various SIM configuration parameters
Call handling
The Modem Simulator simulates basic sending and receiving of phone calls without audio. Dialing 199 causes the simulator to hangup and then call back. Dialing 177 causes the simulator to hangup and then call back and hangup 5 seconds later. Dialing 166 causes the simulator to answer then hangup 5 second later. Dialing any other number causes the simulator to answer the call and remain connected until the user hangs up.
Simulate signal strength and battery level
The Modem Simulator reports simulated signal strength and battery level indications.
SIM addressbook
The Modem Simulator presents a number of SIM-stored contacts, as configured in troll.xml.
Modem Simulator GUI
The Modem Simulator provides a graphical interface for changing a subset of the configuration items on-the-fly.
Peer connect mode
Two Modem Simulators running on two different workstations can be connected by dialing the phone number configured for the second machine in the peers.xml file.
Config
$QTOPIA_DEPOT_PATH/src/tools/phonesim/troll.xml - config file of simulator behavior
$QTOPIA_DEPOT_PATH/src/tools/phonesim/peers.xml - addressbook for peer connect mode