首 页 | 新 闻 | Symbian | Android| Windows Mobile | J2ME | 下载中心 | 游戏策划招聘与求职 | 购书指南 | 视频教程
您现在的位置: 开发视界 >> Symbian英文资料 >> Network >> 正文
Connecting the Symbian emulator to the Internet
作者:佚名    文章来源:不详    更新时间:2006-5-6 22:47:23

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.

 

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.

 

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:

 

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 :
-  if you are a Palm user, you have to shutdown the Synchronisation software (right click on the Sync icon and exit the Sync application)
-  if you have a Symbian device, 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.dat (Zipped)

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.

相关文章:
Why doesn't Symbian OS support writeable static data?
Display the extended panic code in Emulator or Device
DBMS Panics
Obtain IMEI number of your symbian phone from Your Go-DB application
Getting Started with Metrowerks Codewarrior
How to define the memory configuration of the Symbian WINS emulator
How to speed up the Symbian Emulator
Obtain IMEI number of your symbian phone from Your Go-DB application
 

站点地图 | 加入收藏 | 联系站长 | 广告服务 |
QQ:280529124  Tel:0592-8271361 辽ICP备05021703号