S60 2版模拟器网络设置 (S60 Emulator Ethernet Connectivity Problem)

来源:互联网 发布:医药雨人软件 编辑:程序博客网 时间:2024/06/01 14:12

S60 Emulator Ethernet Connectivity Problem

 

     Earlier versions of the Series 60 (now S60) SDK's, particularly the S60 2nd Edition FP2 SDK, had some temperamental behaviour when it came to connecting to the internet using the default ethernet connectivity drivers.

 

SYMPTOMS

The two problems users face when trying to get ethernet connectivity working with the emulator are the following :

  1. The emulator causes a blue screen on machines with Hyper-Threaded CPU's. This typically happens a short while after the initial connection was established and affects both Windows XP and Windows Server 2003 machines. The faulting driver would be listed as npacket.sys which is the default packet driver used by the emulator. 
  2. On Windows Vista initiating an ethernet connection from the emulator leaves with a KErrServerTerminated error (-15 Server has closed) rendering networking on the emulator on Windows Vista useless.


CAUSE

The npacket.sys is a problematic port of the WinPcap library.

The Windows Packet Capture Library (WinPcap) is an open source library used by the Symbian emulator to gain network access in the Windows environment at the data link-layer level. The Symbian ethernet device driver using WinPcap is implemented in ETHERCARD.LDD and ETHERWINS.PDD according to the LDD-PDD Symbian OS device driver model. It is the ETHERWINS.PDD which has a dependency on the faulty npacket.sys. As by design, the ETHERCARD.LDD remains unaffected by the npacket.sys problem.

RESOLUTION

In broad terms the resolution to this emulator ethernet connectivity problem comprises replacing the WinPCap library used by the Symbian ethernet drivers with the latest available version. This is achieved by installing a new Ethernet device driver (as part of a separate Symbian Ethernet SDK download) that is not dependant on npacket.sys and rather uses the latest version of the WinPcap library via the WPCAP.DLL. Symbian implements device drivers in a two part model separating the Logical Device Driver(LDD) and the Physical Device Driver (PDD). It is hence possible to modify the dependency on npacket.sys by only modifying the .PDD component without interfering with the .LDD.

Whilst the two symptoms above are not necessarily related, both can be resolved by following these steps:

1.      Download and install WinPcap 4.0, which includes support for Vista. [Download page][WinPcap auto-installer.exe]

Disclaimer: Red Five Labs gives NO guarantees to the state and usability of this version of WinPcap, and WILL NOT be liable for any damage and/or loss caused during/after the driver is installed.

 

2.      Download the "Ethernet Connection for the Symbian OS Emulator" package from Symbian Developer Network. [Download page] [ConnectingToEmulator.zip] (注:这个附件的原链接已经存在了,不过现在已经上传到下载频道了:http://download.csdn.net/source/2821275 )

3.      Right click ConnectingToEmulator.zip, select "Extract All..." and navigate to the Symbian S60 SDK install path ( C:/Symbian/8.0a/S60_2nd_FP2 herein referred to as <Symbian_Install_Path> ) as the destination directory to extract to. See the illustration below.

 

4.      Backup the following list of files so that you are able to revert to the default installation if necessary.

epoc32/release/wins/udeb/ETHERWINS.PDD
epoc32/release/wins/udeb/urel/ETHERWINS.PDD
epoc32/tools/configchange.pl
epoc32/tools/netcards.exe
epoc32/wins/c/7.0sDevKit_ethernetced.cfg
epoc32/wins/c/series60_2.1_ethernetced.cfg
epoc32/wins/c/v7.0_ethernetced.cfg
epoc32/winscw/c/7.0sDevKit_ethernetced.cfg
epoc32/winscw/c/series60_2.1_ethernetced.cfg
epoc32/winscw/c/v7.0_ethernetced.cfg

5.      Complete the extraction process. The Extraction Wizard will then confirm that you would like to replace the above list of files, as per the illustration below.

 

 

6.      Rename the file series60_2.1_ethernetced.cfg to ethernetced.cfg located in <Symbian_Install_Path>/epoc32/wins/c.

ethernetced.cfg contains a dumped CommDB with Ethernet preconfigured to use DHCP.

If you are running default CommDB settings the next step is optional. Please skip step 7, and move directly to step 8.

 

7.      [Optional] Import ethernetced.cfg into the CommDB using the ced.exe utility that ships with the Symbian S60 SDK located in <Symbian_Install_Path>/epoc32/release/wins/udeb.

You will need to refer to section 7 of the associated  Symbian documentation [Connecting_the_Symbian_OS_Emulator_to_the_Internet_using_Ethernet.pdf].

 

8.      Move the etherdriver.dat and ethermac.dat to the directory which the older version of the ETHERWINS.PDD device driver expects to find them, i.e. move the following files

etherdriver.dat

ethermac.dat

located in

<Symbian_Install_Path>/epoc32/data

To

<Symbian_Install_Path>/epoc32/wins/c/System/data

These files configure the network card device id and fake MAC address.

 

9.      Determine the device id for the physical Ethernet network adapter installed on your PC.

There are two methods to determine the device id, namely using the netcards.exe application or Ethereal.exe (a network protocol analyser). The easier method is to use netcards as per the steps below, however netcards.exe does not run on Vista, and therefore the reader must jump to step 9.4.

Determining the device id using netcards.exe:

9.1 opening a Command Prompt,

9.2changing directory to  <Symbian_Install_Path>/epoc32/tools , and

9.3 running netcards.exe

The output is shown below.

 

 

            As per the above output, the adapter ID is given as:

/Device/{3171C0AD-76FA-4033-BF56-EAAD18151300}

Determining the device id using ethereal.exe:

9.4 Download Ethereal. [Download page] [ethereal-setup-0.99.0.exe]

9.5 Install Ethereal choosing all the default options.

9.6 Open Ethereal. Click on ‘Capture' à ‘Options'

The pop up window should be displayed as below.

 

9.7 Select the ‘Interface' drop down menu and select the applicable Ethernet Adapter.

9.8 Unfortunately the device id is displayed right most and is not visible. Scroll to the right and copy the device id, starting with ‘NPF_' etc.

 

10.  Insert "NPF_" into the device ID, if not already present, so that it looks similar to the example below:

/Device/NPF_{3171C0AD-76FA-4033-BF56-EAAD18151300}

 

11.  Open the etherdriver.dat file located in <Symbian_Install_Path>/epoc32/wins/c/System/data using ‘Notepad' and insert the above device ID. Ensure there are no end of line characters (enters) or spaces forming part of the string.

 

12.  Configure the fake MAC address to be used by the emulator. Open a Windows command prompt and run ipconfig /all

 

 

The physical address as per the output above is: 00-16-E6-0C-7C-F1. Modify the first byte to be 0x02 to be locally unique. The format for the entry is shown below:

0216E60C7CF1

13.  Insert this entry into the ethermac.dat file located in <Symbian_Install_Path>/epoc32/wins/c/System/data using ‘Notepad'. Ensure there are no end of line characters (enters) or spaces forming part of the string.

After performing these modifications the S60 emulator should be configured to use the new version of the .PDD and the latest WinPcap library. This will allow your S60 emulator to connect to the Internet through your local machine's ethernet connection.

 

MORE INFORMATION

This knowledge base article was compiled referencing the original post. [insert link here]

APPLIES TO

 Windows XP SP2, Windows Server 2003, Windows Vista

KEYWORDS 

ethernet emulator symbian s60 npacket.sys KErrServerTerminated

原创粉丝点击