Since EPOC Release 5, CommDb has been provided as the repository for comms-related configuration information. In Version 6.1, CommDb holds information about Internet Access Providers (IAPs), Internet Service Providers (ISPs), modems, locations, charge-cards, proxies, and WAP settings.
On EPOC R5 devices, and in EPOC R5 emulators, control panel dialogs provided an interface to CommDb, allowing these settings to be configured. Because Version 6.1 devices are smartphones, users are no longer required to manually configure services which work 'out of the box'.
However, this presents a problem for developers working with Version 6.1 emulators. Emulators running on Windows PCs must be configured to use PC hardware to mimic services which would be seamless on real devices.
Version 6.1 SDKs include a utility, setupcomms.bat
, which can be run
from a command prompt to provide an interface to the CommDb
database. This allows modems, ports, and ISP settings on the emulator
to be configured to match the hardware and settings available on the
PC.
Typically, developers interested in working with Web, WAP, Email, and Fax services can do so by configuring the emulator to work with a PC serial modem.
Developers interested in working with SMS services will need to connect to a data-enabled mobile phone.
Note that configuration for individual socket protocol modules is
changed from EPOC R5. The EPOC R5 esock.ini
is replaced in Version 6.1
by a separate .esk
file associated with each module. The .esk
file is
read by the sockets server to tell it how to load and configure the
module which delivers a requested protocol. The .esk
files use the
same syntax internally as the Release 5 esock.ini
file.
By default, the Emulator takes control of the PC's COM2 port to simulate a device 'always on' IrDA. Therefore, if a PC modem is connected to COM2:
either the PC modem must be set up to use an alternative COM port
or the emulator must be set up to use an alternative COM
port. To do this, change the irPhysicalComPort setting in
Epoc32\Wins\c\System\Data\irda_wins.esk
from 1 (which maps to the PC's
COM2 port) to 0 (which maps to COM1).
CommDb should then be used to configure the appropriate telephony and
comms services. Run setupcomms.bat
and choose item 1, Modem Information:
Set PortName to COMM::<port-number>, e.g. COMM::0 for COM1.
Set TSYName
to HAYES
Set CSYName
to ECUART
If you enter these names incorrectly, the Emulator can crash.
Other fields can be left with their default settings (though it may be useful to change the SpeakerPref setting so that you can hear the modem dial).
You can verify the setup by configuring an Internet connection in the Emulator's Control Panel, and opening a page in Web.
The default communications settings for a Emulator are to use an infra-red capable mobile phone through the COM2 port.
Assuming that you haven't changed the defaults through setupcomms.bat, the
simplest way to get a connection is to connect an infra-red pod to the
COM2 port, and point it at your mobile phone's IR port. To change to
use COM1, change the irPhysicalComPort setting in
Epoc32\Wins\c\System\Data\irda_wins.esk
from 1 to 0.
If you have changed the defaults, you can restore the settings by
running setupcomms.bat
and make the following Modem Information
settings:
Set PortName to IRCOMM::<port-number>
, e.g. IRCOMM::0
for COM1.
Set modem type to GSMBSC
Set comms type to IRCOMM
Other fields can be left with their default settings.
Again, you can verify the setup by configuring an Internet connection in the Emulator's Control Panel, and opening a page in Web.
Some developers may want to configure the emulator to use their PC's networking connection, instead of a modem. This can be achieved using NT RAS with a null modem connection between two COM ports on the PC. The Emulator 'dials' out on one COM port, and the PC listens for a connection on the other. This RAS setup is not supported, but is possible.
CommDb should be configured to dial-out as for a serial modem. Run
setupcomms.bat
and choose item 1, Modem Information:
Set PortName to COMM::<port-number>
, e.g. COMM::0 for COM1
.
Set TSYName
to HAYES
Set CSYName
to ECUART
Unfortunately, this step alone is not sufficient. There are two other problems:
As a RAS setup will use both COM1 and COM2 ports, it is necessary to prevent monitoring either of these ports for IR connections.
As well as the physical connection, an initialisation script is
required by NT RAS. CommDb as shipped with SDKs includes a default
initialisation script. However, this script is not acceptable to
RAS. On Release 5 devices, the control panel dialogs allowed an
appropriate RAS script to be entered into CommDb. setupcomms.bat does
not provide an interface to this field in the CommDb database, and
therefore developers are given no easy way to configure RAS
initialisation. The required initialisation script sends the string
CLIENT
in clear to the RAS server, and waits for the response
SERVER
. This completes initialisation.
Developers will therefore need to disable the monitoring functionality, and replace the default CommDb with one purpose built to support RAS. Source code, build files, and further information are available for free download from the Symbian Developer Network, from the Networking topic in the C++ Knowledge Base at http://www.symbiandevnet.com.