Hi,
I'm developing a c++ application for symbian on the series 60 sdk. I'm trying to enable RAS for the emulator in order to be able to use my LAN connection. Basically I got the RAS settings to work on my pc, however when I try to connect to the internet from the emulator I get a "access denied error"
I read in the sdk documentation that the emulator takes control of COM2 for monitoring infrared communication and that if I want to use COM2 I must disable the monitoring. So I'm guessing that this is my problem, But I don't know how to do that , does anybody have an idea, i'm really stuck here
thanks a lot
RAS on series 60 emulator (disabling COM2 monitoring)
If you haven't done it already you need to set up your commdb database (holds details of all the communication methods available).
you can do this with:
[code:1]\epoc32\release\winstarget\build\ced.exe[/code:1]
or
[code:1]\epoc32\tools\setupcomms.bat[/code:1]
If you now run ceddump.exe, it'll produce cedout.cfg in the emulators c: drive.
Now you can edit this file and save it as ced.cfg on the emulated c: drive.
If you run ced.exe again it'll use this ced.cfg to rebuild commdb (you can check it's worked from the log file ced.log)
One thing to note - ced numbers ports from 0 - so the relevant data com COM2 will actually be under COM1 in the cfg file.
what i did actually was replace the Cdbv2.dat file with the Cdbv2_ras.dat file that comes with the SDK.
Isn't that enough to set the commdb ?
or should I also do as you suggested?
thanks for your reply
The cdbv2.dat is the SMS and email database. I'm guessing the RAS on has certain extra information for RAS, though I'm not too sure
Give it a go - if it works - great!
If not, try setting up commdb 😊
hi again,
I looked in my symbian directory but couldn't find ced.exe nor ceddump.exe that you mentioned. Could they be under a different name?? Or do I have to get them seperately ?
Sorry!
I was on about UIQ settings 😮ops:
if you look in the SDK help under:
[code:1]Symbian OS v6.1 Edition for C++ � Developer's Guide � Emulator � Emulator Guide � How to configure comms settings[/code:1]
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:
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
You're after FAQ-0746 (the site works off sessions so I can't give you a direct link)
I read the FAQ you suggested, and did as they described but still, whenever I try to connect I get an error. It's a different one now -3608.
What I did before was follow the instructions in the SDK documentation under "Enabling RAS for the emulator"
Emulator configuration
If your emulator software is installed at the root level (i.e. \epoc32...) then start at step 2.
Substitute a drive for your epoc root then change to this drive i.e.
subst w: D:\Symbian\6.1\Series60
w:
Execute the command:
commsdb_ras
This will create two access points in the communications database (NTRAS and LINUXRAS) with a username and password of 'RasUser'.
The emulator can only use COM1 and COM2 for this so disable/delete any devices/applications using these ports.
Connect a NULL MODEM cable between COM1 and COM2.
In that case when i tried to connect it would ask me to choose between a NT RAS and Linux RAS and when i select NT RAS it then fails with error -21
(actually the weird thing is that it would ask me twice)
thanks for all your help
Probably the reply is too late. . But I thot it might be useful. Go through the complete procedure for accessing Internet from Emulator.
Procedure for accessing Internet from Symbian Emulator
------------------------------------------------------------------
For any Windows application to access Internet, it has to use Windows TCP/IP stack. But unfortunately, Symbian Emulator by default bypasses the TCP/IP stack and directly writes onto the COM port. So we have two solutions to solve the problem:
1. Write a TCP/IP Socket Program so that Emulator uses it to access Internet.
2. Read data from COMM port and use mROUTERlite to access Internet.
Let's take the second approach which is very simple and easy to understand.
Overall Procedure:
1. Firstly configure the Symbian Emulator to one of the COMM ports, by default it would
be configured to COM1
> If you want to change to COM2, you should modify the CommsDB structure, which
can be accessed using T_EDITDB.EXE or from setupcomms.bat
> From a DOS prompt type setupcomms.bat and select Modem settings.
> Here change COMM to 0 (COM1) or 1 (COM2)
2. The second step is to connect COM1 and COM2 in loopback. This could be achieved
in two ways.
> Use a Null Modem (Loop Back Connector) to connect the two COM ports.
> Alternatively there is a software named VSPD, which connects the specified COM
ports in loopback.
( Not just that, it is also capable of adding upto 255 Virtual COM ports on your
system, and connects any two specified ports in loopback)
3. The third step is to read the data from COM2 and pass it to Windows TCP/IP stack,
which in turn forwards it to a WAP Gateway.
> This job is done by mROUTERLITE.exe (provided by Symbian). You can find this
file in installed symbian folder.
> Run this file and configure it to for COM2, with a speed of 115200 bytes.
4. Uptil here its fine, now you need to have a WAP Gateway installed in your system.
(You can find one from forum.nokia.com.)
> Nokia has a WAP Gateway simulator which after installation runs on your system
and reads any data send to your system's IP address and forwards it to the
configured Proxy(dwarpal or whatever you use. . .), which is routed to the LAN..
5. Once you launch the Emulator(debug), click on Services and configure a DIRECT PPP
connection. Here you will have to specify the Gateway address (which is your local
machine IP address) and lots of other things which are self explanatory.
6. Before activating the connection, run mrouterlite.exe, and start the WAP Gatewy
Simulator. Once you press ACTIVATE in your Emulator, you should be able to see the
traffic in mrouterlite, and a message Connected has to come.
> This means that you have successfully established a connection from
EMULATOR => COM1 => COM2 => MROUTERLITE.EXE
7. The last step is enter a WAP enabled webpage like www.google.com on your
emulator. Once you do this, you can make out the traffic in WAP gateway simulator,
and the page would be loaded appropriately.
(Also remember to make DNS settings)
( One more caution, just disable "Autoload Images" on your Emulator so that it would
take less time to load the page)
NOTE:
1. NT RAS could be alternatively used to verify that the data sent by EMULATOR is reaching mrouterlite.exe.
(Procedure to set up NT RAS can be found from SDK)
CAUTION: Just make sure that after testing with NT RAS, the entire setup is deleted, else things wont work. .😊
2. Alternatively you could also use PORTMONITOR software to check whether data is going across COMM ports.
FINAL CHECKLIST of software required:
1. Symbian Emulator.
2. VSPD (if you are not having a NULL Modem)
3. mROUTERLITE.exe
4. Nokia WAP Gateway Simulator
5. Java Run Time Environment (JRE 1.4) required for Nokia GATEWAY simulator.