Connecting the Symbian emulator to the Internet
8 mai 2003 - 22:41
Keywords :

Warning: This article is now a bit out-dated. It basically concerns the SDK S60 v1 (Symbian OS 6.1). On later SDK, it is much easier - almost straightforward - to connect (I hope I can provide a page soon on this)


 

A typical issue, when developping a Symbian application, is to try to connect the Symbian emulator to the Internet. It is mandatory to achieve this if you intend to debug an online application. But it is not as simple as we may expect (just checks all the thread related to this subject on the Symbian DevNet newsgroup or Forum Nokia boards). Here is the solution that worked for me (taken from several posts from Forum Nokia).

My configuration:
-  a basic PC with Windows 2000 and two serial ports
-  Nokia Series 60 SDK v1.0
-  Palm Desktop software (with Palm synchronisation activated)
-  several other piece of software you don't need to know ;-)

The issue with the emulator is that:
-  it needs Windows TCP/IP stack to access the Internet
-  it bypass this stack and access directly to COM1

The solution consists in redirecting the data coming from COM1 to another COMx port, retrieving the content from this COMx port and send it to the Internet using Windows TCP stack.

Redirecting the content of COM1 to COMx

There is two solution to achieve this:
-  using a NULL-modem cable plugged linking COM1 and COMx. Most desktop PC comes with two serial ports, so this solution could be considered and generally COMx would be COM2 in that case.

-  using a Virtual Serial Port manager. This kind of software will add several virtual COM ports to a PC and would allow them to be linked together. There is not that many solution on the market today. The most known one (at least on Symbian forums!) is VSPD-XP3 from Eltima software. Unfortunately, a single user license costs US$99...

In my case, I could not use the NULL-modem cable because of my Palm device: it use a craddle connected to my COM2 port for synchronisation and file transfer. I had to buy VSPD-XP3. You can see below how I configured COM1 port to be redirected to COM3.vspd-xp3.png

If you don't want the Symbian emulator to use COM1 port, you need to use modify the CommDB database and select another COM port. This is explained in Changing the COM port to access the Internet

Re-routing the data from COMx to the Internet

Up to that point, you have only done half of the work. Happily enough, it was also the most expensive part. The solution of the second part is hidden in a subdirectory of the Symbian SDK. You now have to run the mRouterLite executable that is found in the C:/Symbian/6.1/Series 60/Epoc32/Release/Winc/urel directory. screenshot002.png Note that the COM3 port is selected since it was the port linked to COM1 by VSPD-XP3. Once you press the connect button, the display should become: screenshot001.png

If you get this... everything should be OK and your emulator is now connected to the Internet. It is important that the line "Negotiating with hardware..." is displayed. If you have a Palm, a Symbian phone, an Infrared interface or a Pocket PC PDA (which is probably the case if you are reading this - at least for the second proposal), your synchronisation software may interfere with the process.

Typically :
-  <u>if you are a Palm user</u>, you have to shutdown the Synchronisation software (right click on the Sync icon and exit the Sync application)
-  <u>if you have a Symbian device</u>, you need to shutdown the mRouter software that is bundled with the software suite : open the task manager (CTRL-ALT-DEL) and terminates mRouterRuntime.exe

Exit now the mRouterLite software and restart it: you should now have everything correct! (if not... try to reboot, start VSPD-XP3, kill mRouterRuntime, restart mRouterLite. If this is still not working, I won't be able to help you but post how you solved the issue, you are probably not alone!).

Running your application

It is now time to run your application. When you start it, select the NT RAS for the connection and you should see some logging in the mRouterLite window (and the number of socket(s) opened in the Sockets tab).

It is also very important that you did not edit the NT RAS configuration in the emulator (don't even try to enter in the configuration menu: you won't be able to exit without mdifying it!). If this is the case, you will need to reinstall the SDK (or - simpler and quicker - just replace the cdbv2.dat file in C:\Symbian\6.1\Series60\Epoc32\Wins\c\system\data which contains these setting by an original one like the one below).cdbv2.zip
cdbv2.zip

Alternate Solutions

User of Symbian v7.0 can take benefit of the Winsock library posted by Symbian (check here, however this solution is not available for Symbian OS v6.1. Peroon has also made available PrnESock, a replacement for the original Symbian ESock DLL that allows a direct connection from the emulator to the Internet (without using a NULL-Modem cable nor the VSXPD solution). A functional (but restricted) version is available for download on their web site.

Tutorial posted mai 8th, 2003 by Anonymous

Soumis par Anonymous le lun, 2003-05-19 10:15.

Hi I'm new to symbian and was wondering if someone could help me out.

I'm trying to connect the series 60 emulator to the internet using a null modem. To test it I tried running the sockets application that comes with the sdk. but each time i try to connect i get an error 21 (access denied). What could be the problem??

thanks


Soumis par BenK (non vérifié) le mer, 2003-05-21 13:43.

I forgot to mention that you may have to deactivate the COM1 port in your Control Panel :

Control Panel : System : Hardware : Device Manager :  Ports

For french users: Panneau de configuration : Système : Matériel : Gestionnaire de Périphériques... : Ports

and then disable COM1


Soumis par xuyang le mar, 2003-06-10 21:10.

I read Benk's article about "Connecting the Symbian emulator to the Internet". It's very simple and clear. However, I still could not make it work.

My environment is as this: A PC with Windows 2000 Professional and two serial ports, Nokia Series 60 SDK v1.0 and LAN. I use a NULL modem cable connecting COM1 and COM2 ports. I verified the setting by successfully running rasphone app.

When I run mRouterLite as in his article, I see error message saying "Disabled at 115200 on COM2". No further negotiation steps started.

I tried to diable COM1 from control panel as in his following posting, but failed with the same error message.

Did I miss anything here? Do I need to do anything with COM2 as it is by default configured for IrDA? How?

Thanks a lot,

Yang Xu


Soumis par BenK (non vérifié) le mer, 2003-06-11 10:00.

I am not sure you need to disable COM1. This issue is on COM2.

However there is a big mess with other software using COM port: Did you kill mRouterRuntime that is started by either Nokia PC Suite or the Sony Ericsson equivalent (using the task manager)
-  Do you have an IrDA dongle connected to your PC ?

What do you mean by "COM2 as it is by default configured for IrDA" ? Where do you see that ?


Soumis par xuyang le mer, 2003-06-11 17:34.

Thanks for the reply. I don't have dongle on COM2 port, however I do have one dongle on printer port. I don't think my dongle on printer port affects anything here.

After restoring original CDBV2.dat file, I could connect TCP/IP from emulator to the hosting PC (windows 2000), but not Internet or LAN.

Before I saw your posting, I did follow some steps in Nokia document "Setup Connection Between Nokia 9210 Emulator & NT RAS Server" to configure COM1 and COM2 ports, as well as RAS. From my connection list in Settings -> Network and Dial-up Connections, I can see "Direct Connection" and "Incoming Connections" created by those steps. Do I need to remove them to connect to Internet? Do you see something like those in your connection list?

BTW, I still see error message when running mRouterLite. Does it conflict with my connections created by Nokia suggested steps?

Thanks a lot,

 yang


Soumis par xuyang le mer, 2003-06-11 19:13.

After I deleted the extra connections (Direct Connecttion and Incoming Connections, see my previous posting), mRouterLite started working and my emulator finally can connect to internet.

So everything works as exactly as in Benk's posting. That's the simplest working solution I have seen so far. I wish I could read it before wasting 3 days on obsolete posting everywhere else.

In summary, to connect to the Internet from Series 60 SDK 1.0v emualtor, do exactly as Benk's posting and nothing extra.

 yang


Soumis par zsj (non vérifié) le mer, 2003-06-18 17:39.

hi ,yang i also use null-moden cable. i only get messages Initialized Waiting for connection.... in mrouterlite

and can't connect to internet why??

zsj


Soumis par Anonymous le mar, 2003-07-01 01:36.

zsj,

Sometime, mRouterLite just shows "waiting for connection..." without going into "negotiating with hardware" phase. It may or may not be a problem. Just try to run SDK example Sockets. It may trigger mRouterLite when you run through the example.

If it still doesn't work, first make sure that "Routing and Remote Access" service is started. Secondly check your "Network and Dial-up Connections" from Control Panel. You should remove "Incoming Connection" item if it is there. Then run through the Sockets example.

My environment is Windows 2000 professional with sp3.

 yang


Soumis par Tim (non vérifié) le mar, 2003-07-01 23:52.

Hi Benk, Yang and Others,

After following all this encouraging advice (thank you!) I still can't make it work. I am running Windows 2000 Prof. and I am using a null modem cable to connect com1 and com2. I know my connection is ok because I can connect terminal programs to each and see the characters echo from one to the other. When I run m-router lite, I get to the "Waiting for connection..." stage. Basically, the emulator just isn't sending anything out of com1. I know it is grabbing com1, because com1 becomes unavailable (to other programs) after attempting a connection (with the sockets ex). I have restored (several times) the cdbv2.dat file that Benk graciously posted. I have deleted the RAS stuff that I created when I was following other directions. I have tried it with the Routing and Remote Access service started and stopped. Every time, the same thing: the emulator prompts me to choose NT RAS, and then eventually times out.

This seems like it must be an emulator configuration problem. Everything else is set. It just won't talk to the serial port.

Any ideas?

Thanks, Tim


Soumis par LearningCurve (non vérifié) le sam, 2003-09-13 00:15.

hi all,

well..rather than connecting to the internet using the virtual serial port i connect to a remote machine running a TCP server application and it works quite fine. ie., i have disabled com1 and i have a com1 and com3 pair now..and i get the wait for connection , negotiating hardware..and then once connected i get some random from ip and port whereas it shows me the correct to ip and port that i am connected to...

now i am just wondering like how i was able to manage to connect to the remote machine , is it possible to allow incoming connections using the virtual serial port..??

I am having problems while having the listener up on the emulator and am trying to connect from remote machine...it just doesn't work...

ppl do write in...

thanx in advance, LearningCurve.


Soumis par Reshma (non vérifié) le jeu, 2003-09-18 12:24.

Hi,

I am aslo trying to connect to the internet using the emulator. I tried using RAS and also Virtual Device drivers. Both ways I am able to connect initially. But the connection times out after 10 seconds. And I can connect only if I specify the Ip Address i.e say 17.0.0.1 and port 80. But I am not able to specify the domain name like www.google.com. The DNS look up times out. Can somebody tell me where am I going wrong. I have been trying this for quite sometime now without any success. Your help would be appreciated.

Thanks in advance, Reshma


Soumis par Winter (non vérifié) le jeu, 2003-09-25 10:16.

I've tried a lot of manipulations but no one work...

i'm under XP with the borland mobile sdk (including nokia sdk 0.9), i haven't go a null modem cable so i use VSPD and i wondered why in the sockets example, the emulator never asks me if i want to connect using NTRAS. I've created a loopback between COM1 and COM4, activated RAS in windows and at this time only mrouterlite negociates hardware...

If somebody can solve my problem.....


Soumis par nahar (non vérifié) le mer, 2003-10-15 18:56.

Hi I am also trying to test a socket app on SDK 60.When I compile echoclient as mentioned in SDK it compiles but when I launck the emulator there is no icon to run this app.Pls help me whats wrong here.Even the helloworld app is behaving same. Then I shifted to to UIQ SDK 2.0 tried to configure the NT RAS thing . But when I launch the echoclient app the app always says either call was not answered or IN USE.Pls help me on this whats the problem here. Finally I started using the WINSOCK utility & the echoclient app is able to connect to a linux machine running echoserver on my LAN. PLs let me know here which is the standard way to test any sockets apps using emulator.IS it NTRAS NULL MODEM which doesn't bypasses the symbian networking module as compared to WINSOK config.Pls send ur advice on this.

Soumis par hah_ (non vérifié) le ven, 2003-10-24 09:39.

>...to test a socket app on SDK 60.... there is no icon to run this app...

I solved the same problem. Try the series60 network-example called SocketExample. You should get the icon. SocketExample uses echo-service and prompts for ip and port.

If you get and -34-error, try installing prnesock.lib (from this site) which overrides emulator-modem-connections and uses windows-tcp/tp-stack directly.


Soumis par judy (non vérifié) le jeu, 2004-01-29 05:16.

Why i can't find the execuatable mRouterLit.exe file? I'm using Nokia6600 SDK for Symbian OS (7.0).

any clue?



copyright 2003-2009 NewLC SARL