Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



How to configure comms settings

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.


Configuring the emulator for a serial modem

  1. 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).

  2. 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.

  3. 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).

  4. You can verify the setup by configuring an Internet connection in the Emulator's Control Panel, and opening a page in Web.

[Top]


Configuring the emulator for IrDA connection to a mobile phone

The default communications settings for a Emulator are to use an infra-red capable mobile phone through the COM2 port.

  1. 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.

  2. 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.

  3. Again, you can verify the setup by configuring an Internet connection in the Emulator's Control Panel, and opening a page in Web.

[Top]


Configuring the emulator to use NT RAS

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:

Unfortunately, this step alone is not sufficient. There are two other problems:

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.

[Top]


See also

Comms settings syntax — setupcomms.bat.