×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    Regular Contributor
    Join Date
    Sep 2006
    Location
    Australia, NSW
    Posts
    200

    Configuring proper networking in S60 3rd Ed emulator (NOT Winsock!)

    Cross-posting from NewLC:
    The emulator works by default with Winsock in this SDK, but much of the functionality is lacking (UDP, multicasting!). Since then, I have been looking for the way to configure the emulator to use the proper stack instead of braindead Winsock.

    I have found that there is a document on Symbian's site [symbian.com], pointing out that Winsock is only one of the methods of configuring networking in the emulator (and the easiest and the most basic one).

    So, I have attempted configuring network connection with Ethernet, however netcards.exe fails to run without npacket.dll, which is nowhere to be found in my system. WinPcap has packet.dll, but they are apparently not related. I suspect it is the part of "Ethernet Network Driver" for the emulator, but it is not installed together with the emulator then (?). Google gives no clue for neither what npacket.dll might be, nor how does Ethernet Network Driver get installed or where it comes from (unless I'm not looking hard enough).

    Also, it is worth mentioning that there are some references [archivesat.com] to TCP/IP stack implementation (wsock.prt) and configuration (*.esk) files and issues associated with them on the Internet:
    1. The stack is always there, but it gets bypassed if your CommDb is
    specified to use the winsock driver. Any of the other main transports will
    use the tcpip stack - ie ethernet/NTRAS etc.

    2. You say
    "Whoever decided to put the WSOCK.PRT into SDK for emulator should have
    at least put a BIG WARNING SIGN on the SDK readme/release notes, and
    also provided clear instructions to re-enable the real stack."

    Couldn't agree more - I have already raise this with Nokia to no avail.
    Please complain to Forum Nokia - its their SDK. I believe this decision was
    ill-considered. Currently they do not intend to do anything about this, but
    the intention is that they will update to Symbian's WinTap solution in a
    release or two.

    3. The beta SDK is gone from Forum Nokia.
    I don't know how to configure the current SDK to use a valid transport. My
    suggestion would be to use WinTap (because its less problematic than
    ethernet). I have not tried this personally.
    http://www.symbian.com/developer/dow...ls.html#wintap

    Regards
    H


    "Markku Savela" <msa@moth.iki.fi> wrote in message
    news:87psgj44ge.fsf@moth.iki.fi...
    > Marko Saukko <firstname.lastname@tut.fi> writes:
    >
    > > I dont really know how to check if I'm linking to replacement library
    or
    > > not. Anyway this is what I found out with those filenames you gave
    me.
    > >
    > > wsock.ptr and tcpip6.ptr are in here Epoc32\release\winscw\udeb\
    >
    > > ip.tcpip.esk in Epoc32\winscw\c\private\101f7989\esock points to
    > > wsock.prt and ip.tcpip.esk in Epoc32\Data\z\private\101f7989\esock
    > > points to tcpip6.prt.
    >
    > > I tried to replace ip.tcpip.esk in c with one in z (this is in the
    > > phones ROM so it is the orginal version?) but that didn't help.
    >
    > That should have worked, assuming you removed totally the ESK file
    > referring to the WSOCK.PRT (or just rename the extension to something
    > else than ESK).
    >
    > > So how can I get real stack reinstalled?
    >
    > Stack is apparently installed, its just not activated due to different
    > ESK file configurations.
    >
    > Whoever decided to put the WSOCK.PRT into SDK for emulator should have
    > at least put a BIG WARNING SIGN on the SDK readme/release notes, and
    > also provided clear instructions to re-enable the real stack.
    >
    > This WSOCK.PRT apparently only support very minimal subset of the internet
    > socket api of the real stack (support only IPv4 TCP! No UDP! ...)
    >
    >
    • Did anyone attempt to do that?
    • Is there any working solution to this problem?
    • Could that be a problem with my configuration?
    • Am I missing something obvious?


    I'm not expecting to see the solution anytime soon, but at least some pointers/suggestions/opinions/speculation are welcome.

  2. #2
    Regular Contributor
    Join Date
    Sep 2006
    Location
    Australia, NSW
    Posts
    200

    Re: Configuring proper networking in S60 3rd Ed emulator (NOT Winsock!)

    Reposting the solution to my own problem (hopefully someone will find it of use).

    Step-by-step Solution
    Following this, I was able to configure fully functional networking in one instance of the emulator (including unicast and multicast UDP!).

    • Install WinPcap 3 or later (I have 3.1)
    • Dump the comms database into a plain text file: run ceddump from eshell, the output file is .\Epoc32\winscw\c\cedout.cfg.
    • Edit the file as described in Symbian's document on Ethernet configuration. Though, I've got a bit different settings for LanBearer and LanSerivce to get a working configuration, in particular:
      [LANBearer]
      ...

      ADD_SECTION
      # COMMDB_ID = 1
      Name=Ethernet
      IfName=ethint
      LDDFilename=enet
      LDDName=Ethernet
      PDDFilename=ethernet
      PDDName=Ethernet.Wins
      PacketDriverName=EtherPkt.drv
      LastSocketActivityTimeout=-1
      LastSessionClosedTimeout=-1
      LastSocketClosedTimeout=-1
      Agent=nullagt.agt
      FIELD_COUNT=11
      END_ADD

      ...

      [LANService]
      ADD_SECTION
      # COMMDB_ID = 1
      Name=Ethernet
      IfNetworks=ip
      IpNetMask=0.0.0.0
      IpGateway=0.0.0.0
      IpAddrFromServer=TRUE
      IpAddr=0.0.0.0
      IpDNSAddrFromServer=TRUE
      IpNameServer1=0.0.0.0
      IpNameServer2=0.0.0.0
      ConfigDaemonManagerName=NetCfgExtnDhcp
      ConfigDaemonName=DhcpServ
      FIELD_COUNT=11
      END_ADD

      ...
    • Additionally, make sure there are no dodgy entries like proxies that you don't need (I wasted several hours before figuring out that all HTTP connections attemt to connect via eprx00.nokia.com, God knows how it got there), and finally kill all Winsock entries.
    • Rename cedout.cfg into ced.cfg
    • Compile the database back (run ced from eshell). A ced.log file should appear in the same directory and the last line should say "SUCCESS".


    Now comes the manipulation with ESOCK config files, without it nothihg works, as new commdb LanBearer entry points to ethernet driver, but *.esk files still have Winsock-related entries.
    • Locate 2 ip.tcpip.esk files in your SDK installation: one in (1) \Epoc32\winscw\c\private\101f7989\esock (the one that refers to winsock.prt in its every entry), another in (2) \Epoc32\Data\z\private\101f7989\esock (the proper one, references tcpip6.prt).
    • Replace: (1) with (2).
    • Edit copied ip.tcpip.esk file. Under [interfaces] section, put another line "ethint= ethint.nif" (according to IfName in LanBearer table section of our Ethernet entry). Note: space after "=" is important!
    • Put configuration info for ehternet driver into \Epoc32\Data\epoc.ini:
      ETHER_NIF=\Device\NPF_{90230DF5-B692-411E-9868-038105B45530}
      ETHER_MAC=026761EDF0CB
      ETHER_SPEED=100Mbps
      Normally, configchange.pl from Epoc32\tools does it for you, but since netcards.exe in this SDK is terribly broken, you could do it manually, by running net config rdr (that's what uiqenv.pl script in UIQ3 does). It will give both MAC and NIF for all cards. Replace first "00" in MAC to "02".


    References

  3. #3
    Regular Contributor
    Join Date
    Sep 2006
    Location
    Bangalore
    Posts
    51

    Smile Re: Configuring proper networking in S60 3rd Ed emulator (NOT Winsock!)

    Hello,

    I need to do UDP Multicasting in my project.. So i need to do the above mentioned configuration for emulator.

    One more thing is that i am using client/server kind of architecture then if we can do this configuration for only one emulator then how two emulators communicate with each other.

    Can u please help me regarding this.

  4. #4
    Regular Contributor
    Join Date
    Sep 2006
    Location
    Australia, NSW
    Posts
    200

    Re: Configuring proper networking in S60 3rd Ed emulator (NOT Winsock!)

    I haven't tried this, but my guess is that you have 3 options:
    • (This will be terribly slow) Install and configure a second instance of the emulator of the emulator in the same manner (because you can't run the same emulator twice at the same time). S60 3rd SDK has an option "Support for multiple emulators", I don't remember it in S60 3rd MR or S60 3rd FP1, I think you'd have to install SDK twice in two separate places (correct me if I'm wrong).
    • (Blackbox approach) Write in parallel test implementations of your client and server on host platform, e.g. a Java application, your program wouldn't know what it communicates with.
    • Put client and server in one application when you develop application engine.


    I would combine 2 and 3.

  5. #5
    Regular Contributor
    Join Date
    Sep 2006
    Location
    Bangalore
    Posts
    51

    Question Re: Configuring proper networking in S60 3rd Ed emulator (NOT Winsock!)

    I already have two Multiple emulator support while installing SDK i selected the option.

    I tryed to do the configuration on one emulator but the normal communication also did not worked for me.

    I may be doing some mistake in editing file cedout.cfg.

    Can u help me in this file editing what u told before..

    Quote:
    [LANBearer]
    ...

    ADD_SECTION
    # COMMDB_ID = 1
    Name=Ethernet
    IfName=ethint
    LDDFilename=enet
    LDDName=Ethernet
    PDDFilename=ethernet
    PDDName=Ethernet.Wins
    PacketDriverName=EtherPkt.drv
    LastSocketActivityTimeout=-1
    LastSessionClosedTimeout=-1
    LastSocketClosedTimeout=-1
    Agent=nullagt.agt
    FIELD_COUNT=11
    END_ADD

    ...

    [LANService]
    ADD_SECTION
    # COMMDB_ID = 1
    Name=Ethernet
    IfNetworks=ip
    IpNetMask=0.0.0.0
    IpGateway=0.0.0.0
    IpAddrFromServer=TRUE
    IpAddr=0.0.0.0
    IpDNSAddrFromServer=TRUE
    IpNameServer1=0.0.0.0
    IpNameServer2=0.0.0.0
    ConfigDaemonManagerName=NetCfgExtnDhcp
    ConfigDaemonName=DhcpServ
    FIELD_COUNT=11
    END_ADD

    Is the same configuration thing i need to replace in this cedout.cfg file. This cedout.cfg is the output file from ceddump.exe.

    for info:

    My system is getting IP address from DHCP server only.

  6. #6
    Regular Contributor
    Join Date
    Sep 2006
    Location
    Australia, NSW
    Posts
    200

    Re: Configuring proper networking in S60 3rd Ed emulator (NOT Winsock!)

    I'll post my exact ced.cfg on Monday when I get a hold of it. However meanwhile you might want to look that you configured your [IAP] entry to correctly reference LanBearer and LanService:

    Code:
    [IAP]
    ADD_SECTION
    # COMMDB_ID = 1
    	Name=Ethernet, DHCP # This name will be displayed in the IAP selection pop-up
    	IAPServiceType=LANService
    	IAPService=1               # LANService with COMMDB_ID 1
    	IAPBearerType=LANBearer
    	IAPBearer=1                 # LANBearer with COMMDB_ID 1
    	IAPNetwork=1
    	IAPNetworkWeighting=0
    	Location=2
    	FIELD_COUNT=8
    END_ADD
    COMMDB_ID gets assigned in the order of records in the section.

  7. #7
    Regular Contributor
    Join Date
    Sep 2006
    Location
    Bangalore
    Posts
    51

    Re: Configuring proper networking in S60 3rd Ed emulator (NOT Winsock!)

    I tryed with this IAP setting and respective mapping of sections also but it did not working for me.

    Can u please share me the ced.cfg file.
    Last edited by muralidharvvk; 2007-02-02 at 13:37. Reason: spelling mistakes

  8. #8
    Regular Contributor
    Join Date
    Sep 2006
    Location
    Australia, NSW
    Posts
    200

    Re: Configuring proper networking in S60 3rd Ed emulator (NOT Winsock!)

    ced.cfg
    tcp.ip.esk (at %EPOCROOT%\Epoc32\winscw\c\private\101f7989\esock)

    Do not forget to test the connection first with httpexampleclient from eshell.



    Hope that helps.

  9. #9
    Regular Contributor
    Join Date
    Sep 2006
    Location
    Bangalore
    Posts
    51

    Smile Re: Configuring proper networking in S60 3rd Ed emulator (NOT Winsock!)

    I have configured the procedure whatever u have told me to do by comparing with ur ced.cfg file also and done the necessary changes and updated the COMMDB database and made changes to epoc.ini.

    When i tryed to test whether it is connecting through ethernet or not by running httpexampleclient.exe i am getting -1 error and not able to figure out the problem. Please help me out regarding.

    This is my changes done in ced.cfg file

    ## Network
    ##
    [Network]
    ADD_SECTION
    # COMMDB_ID = 1
    Name=Intranet
    FIELD_COUNT=1
    END_ADD

    ADD_SECTION
    # COMMDB_ID = 3
    Name=Winsock
    FIELD_COUNT=1
    END_ADD

    .......

    [LANBearer]
    ADD_SECTION
    # COMMDB_ID = 1
    Name=EKA1 Target Ethernet
    IfName=ethint
    LDDFilename=ethercard
    LDDName=EtherCard
    PDDFilename=EtherSmc
    PDDName=EtherCard.Smc
    PacketDriverName=EtherPkt.drv
    LastSocketActivityTimeout=-1
    LastSessionClosedTimeout=-1
    LastSocketClosedTimeout=-1
    Agent=nullagt.agt
    FIELD_COUNT=11
    END_ADD

    ADD_SECTION
    # COMMDB_ID = 2
    Name=EKA2 Target Ethernet
    IfName=ethint
    LDDFilename=enet
    LDDName=Ethernet
    PDDFilename=ethernet
    PDDName=Ethernet.Assabet
    PacketDriverName=EtherPkt.drv
    LastSocketActivityTimeout=-1
    LastSessionClosedTimeout=-1
    LastSocketClosedTimeout=-1
    Agent=nullagt.agt
    FIELD_COUNT=11
    END_ADD

    ADD_SECTION
    # COMMDB_ID = 3
    Name=EKA1 Emulator Ethernet
    IfName=ethint
    LDDFilename=ethercard
    LDDName=Ethercard
    PDDFilename=etherwins
    PDDName=Ethercard.wins
    PacketDriverName=EtherPkt.drv
    LastSocketActivityTimeout=-1
    LastSessionClosedTimeout=-1
    LastSocketClosedTimeout=-1
    Agent=nullagt.agt
    FIELD_COUNT=11
    END_ADD

    ADD_SECTION
    # COMMDB_ID = 4
    Name=EKA2 Emulator Ethernet
    IfName=ethint
    LDDFilename=enet
    LDDName==Ethernet
    PDDFilename=ethernet
    PDDName=Ethernet.Wins
    PacketDriverName=EtherPkt.drv
    LastSocketActivityTimeout=-1
    LastSessionClosedTimeout=-1
    LastSocketClosedTimeout=-1
    Agent=nullagt.agt
    FIELD_COUNT=11
    END_ADD

    ADD_SECTION
    # COMMDB_ID = 5
    Name=Winsock
    IfName=wsocki
    LDDName=foo
    PDDName=foo
    LastSocketActivityTimeout=-1
    LastSessionClosedTimeout=-1
    LastSocketClosedTimeout=-1
    Agent=wsocka.agt
    FIELD_COUNT=8
    END_ADD

    ........

    [LANService]
    ADD_SECTION
    # COMMDB_ID = 1
    Name=Ethernet
    IfNetworks=ip
    IpNetMask=0.0.0.0
    IpGateway=0.0.0.0
    IpAddrFromServer=TRUE
    IpAddr=0.0.0.0
    IpDNSAddrFromServer=TRUE
    IpNameServer1=0.0.0.0
    IpNameServer2=0.0.0.0
    IpAddrLeaseValidFrom=\xA342\x01DF\x0001\x0000@\x0000\xDB5A\x88A5\x062C\x00E1\x000C\x3000 \x0000\x0800\x0000\x0000\x0000\x01EF\xC0A8\xCCCC\xCCCC\xCCCC\xCCCC\xCCCC\xCCCC\xCCCC\xCCCC\xCCCC\xCCCC\x5180\x0001
    ConfigDaemonManagerName=NetCfgExtnDhcp
    ConfigDaemonName=DhcpServ
    FIELD_COUNT=12
    END_ADD
    ADD_SECTION
    # COMMDB_ID = 2
    Name=Ethernet Static IP
    IfNetworks=ip
    IpNetMask=255.255.255.0
    IpGateway=192.168.1.1
    IpAddrFromServer=FALSE
    IpAddr=192.168.1.250
    IpDNSAddrFromServer=FALSE
    IpNameServer1=192.168.1.116
    IpNameServer2=192.168.1.116
    ConfigDaemonManagerName=NetCfgExtnDhcp
    ConfigDaemonName=!DhcpServ
    FIELD_COUNT=11
    END_ADD

    ADD_SECTION
    # COMMDB_ID = 3
    Name=Ethernet Bad Daemon
    IfNetworks=ip
    IpNetMask=255.255.255.0
    IpGateway=10.32.194.254
    IpAddrFromServer=FALSE
    IpAddr=10.32.194.251
    IpDNSAddrFromServer=TRUE
    IpNameServer1=194.72.6.51
    IpNameServer2=194.72.6.52
    ConfigDaemonManagerName=NonExistingServ
    ConfigDaemonName=NonExistingServ
    FIELD_COUNT=11
    END_ADD

    ADD_SECTION
    # COMMDB_ID = 4
    Name=Ethernet No Daemon
    IfNetworks=ip
    IpNetMask=255.255.255.0
    IpGateway=192.168.1.1
    IpAddrFromServer=FALSE
    IpAddr=192.168.1.250
    IpDNSAddrFromServer=FALSE
    IpNameServer1=192.168.1.116
    IpNameServer2=192.168.1.116
    FIELD_COUNT=9
    END_ADD

    ############################################################
    ## IAP
    ##
    [IAP]
    ADD_SECTION
    # COMMDB_ID = 1
    Name=Ethernet
    IAPServiceType=LANService
    IAPService=1
    IAPBearerType=LANBearer
    IAPBearer=3
    IAPNetwork=1
    IAPNetworkWeighting=0
    Location=2
    FIELD_COUNT=8
    END_ADD
    ADD_SECTION
    # COMMDB_ID = 3
    Name=Winsock
    IAPServiceType=OutgoingGPRS
    IAPService=2
    IAPBearerType=LANBearer
    IAPBearer=2
    IAPNetwork=3
    IAPNetworkWeighting=0
    Location=4
    FIELD_COUNT=8
    END_ADD
    I deleted the [Proxies] entry from ced.cfg file also.

    This my change in epoc.ini
    textshell

    ETHER_NIF=\Device\NPF_{A560F957-7027-48EF-980D-7E51EC1B5511}
    ETHER_MAC=0215C2B9CFAA
    ETHER_SPEED=100Mbps

    configuration epoc_352x416.ini
    configuration epoc_416x352.ini
    configuration epoc_176x208.ini
    configuration epoc_208x176.ini
    configuration epoc_240x320.ini
    configuration epoc_320x240.ini

    # NOTICE! Below lines are read only for the first resolution (ini file) above.
    PlatSecDiagnostics ON
    PlatSecEnforceSysBin ON
    PlatSecProcessIsolation ON
    PlatSecEnforcement OFF
    PlatSecDisabledCaps NONE
    LogToFile 1
    LogToDebugger 1
    JUSTINTIME 0
    _EPOC_DRIVE_D \epoc32\winscw\d
    _EPOC_LocDrv_1 E:
    MegabytesOfFreeMemory 32
    I havwe added the line "ethint= ethint.nif" what u told in the copied copy of ip.tcpip.esk.

    Pls help me out.. If u figure out any problem..
    Last edited by muralidharvvk; 2007-02-06 at 12:25.

  10. #10
    Regular Contributor
    Join Date
    Sep 2006
    Location
    Australia, NSW
    Posts
    200

    Re: Configuring proper networking in S60 3rd Ed emulator (NOT Winsock!)

    "IAPBearer = 3" and it points to "EKA1 Emulator Ethernet", you need to change it to "IAPBearer = 4" ("EKA2 Emulator Ethernet") and regenerate CommDB. That's the only thing I could spot. If this doesn't help, I am not sure what's going on.
    Last edited by sysctl; 2007-02-06 at 16:24.

  11. #11
    Regular Contributor
    Join Date
    Sep 2006
    Location
    Bangalore
    Posts
    51

    Re: Configuring proper networking in S60 3rd Ed emulator (NOT Winsock!)

    Now i am able to see the Ethernet interface and selecting it also.
    When i running in console mode and trying to run httpexampleclient.exe again -1 error is returning.

    ADD_SECTION
    # COMMDB_ID = 4
    Name=EKA2 Emulator Ethernet
    IfName=ethint
    LDDFilename=enet
    LDDName==Ethernet
    PDDFilename=ethernet
    PDDName=Ethernet.Wins
    PacketDriverName=EtherPkt.drv
    LastSocketActivityTimeout=-1
    LastSessionClosedTimeout=-1
    LastSocketClosedTimeout=-1
    Agent=nullagt.agt
    FIELD_COUNT=11
    END_ADD
    can u share me where i can find these EtherPkt.drv, Ethernet.Wins, ethernet.PDD
    files.. I need to download them them from some where else.
    Last edited by muralidharvvk; 2007-02-07 at 14:32.

  12. #12
    Regular Contributor
    Join Date
    Sep 2006
    Location
    Bangalore
    Posts
    51

    Re: Configuring proper networking in S60 3rd Ed emulator (NOT Winsock!)

    I configured everything now..
    But still Multicast UDP packets is not happening.
    My doubt is whether i have bypassed the default winsock or not.
    How to know which Interface it is using..
    I am selecting the the interface(Adapter) given by us when it is asking to select

    Please can u share me how to know it is using correct interface or not.
    Last edited by muralidharvvk; 2007-02-07 at 14:43.

  13. #13
    Regular Contributor
    Join Date
    Sep 2006
    Location
    Australia, NSW
    Posts
    200

    Re: Configuring proper networking in S60 3rd Ed emulator (NOT Winsock!)

    This console app should tell you which network interfaces are available (prints their MAC, IP, name and index). I use it on the phone, but I see no reason why it shouldn't work on emulator.
    Code:
    //  Include Files  
    
    #include "IPInfo.h"
    #include <e32base.h>
    #include <e32std.h>
    #include <e32cons.h> // Console
    #include <es_sock.h>
    #include <in_sock.h>
    
    
    //  Constants
    
    _LIT(KTextConsoleTitle, "Console");
    _LIT(KTextFailed, " failed, leave code = %d");
    _LIT(KTextPressRightSoftKey, "\n\n[press right softkey]\n");
    
    
    //  Global Variables
    
    LOCAL_D CConsoleBase* console;  // write all messages to this
    
    
    //  Local Functions
    
    #define IP(ip) \
    	((ip)&(0xff000000))>>24,\
    	((ip)&(0x00ff0000))>>16,\
    	((ip)&(0x0000ff00))>> 8,\
    	((ip)&(0x000000ff))
    
    LOCAL_C void MainL()
    	{
    	RSocketServ serv;
    	User::LeaveIfError ( serv.Connect() );
    	
    	RSocket sock;
    	User::LeaveIfError( sock.Open(serv, KAfInet, KSockDatagram, KProtocolInetUdp) );
    	
    	TPckgBuf<TSoInetInterfaceInfo> iface;
    	User::LeaveIfError( sock.SetOpt(KSoInetEnumInterfaces, KSolInetIfCtrl) );
    	
    	_LIT( KInterfaces, "INTERFACES\n\n" );
    	console->Printf( KInterfaces );
    	while(sock.GetOpt(KSoInetNextInterface, KSolInetIfCtrl, iface) == KErrNone)
    		{
    		_LIT( KIface, "----------------------\nName   %S\n");
    		_LIT( KIP,    "IP     %d.%d.%d.%d\n" );
    		_LIT( KIndex, "Index  %d\n" );
    		console->Printf( KIface, &iface().iName );
    		console->Printf( KIP, IP((iface().iAddress.Address())) );
    		
    		_LIT( KMAC,   "MAC    ");
    		_LIT( KHexEnd, "%02x\n" );
    		_LIT( KHexColon, "%02x:" );
    		console->Printf( KMAC );
    		TSockAddr mac = iface().iHwAddr;
    		for (TInt i = (TInt)sizeof(SSockAddr); i < (TInt)sizeof(SSockAddr) + 5; ++i)
    		{
    			console->Printf( KHexColon, mac[i] );
    		}
    		console->Printf( KHexEnd, mac[sizeof(SSockAddr) + 5] );
    		
    		TPckgBuf<TSoInetIfQuery> ifq;
    		ifq().iName = iface().iName;
    		sock.GetOpt(KSoInetIfQueryByName, KSolInetIfQuery, ifq);
    		console->Printf( KIndex, ifq().iIndex );
    		}
    	sock.Close();
    	}
    
    
    LOCAL_C void DoStartL()
        {
        // Create active scheduler (to run active objects)
        CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
        CleanupStack::PushL(scheduler);
        CActiveScheduler::Install(scheduler);
    
        MainL();
    
        // Delete active scheduler
        CleanupStack::PopAndDestroy(scheduler);
        }
    
    
    //  Global Functions
    
    GLDEF_C TInt E32Main()
        {
        // Create cleanup stack
        __UHEAP_MARK;
        CTrapCleanup* cleanup = CTrapCleanup::New();
    
        // Create output console
        TRAPD(createError, console = Console::NewL(KTextConsoleTitle, TSize(KConsFullScreen,KConsFullScreen)));
        if (createError)
            return createError;
    
        // Run application code inside TRAP harness, wait keypress when terminated
        TRAPD(mainError, DoStartL());
        if (mainError)
            console->Printf(KTextFailed, mainError);
        console->Printf(KTextPressRightSoftKey);
    	
    	TKeyCode key = EKeyNull;
    	do { key = console->Getch(); } while (key != 0xF843);
        
        delete console;
        delete cleanup;
        __UHEAP_MARKEND;
        return KErrNone;
        }
    When you specify multicast interface index, setting it to zero means you let the OS choose the appropriate one for you (works most of the time).
    Also, try normal UDP first, I had some trouble with multicast regardless of whether I configured my networking properly.
    Last edited by sysctl; 2007-02-09 at 03:43.

  14. #14
    Regular Contributor
    Join Date
    Sep 2006
    Location
    Bangalore
    Posts
    51

    Re: Configuring proper networking in S60 3rd Ed emulator (NOT Winsock!)

    Thanks a lot....

    With the example what u have given i am able to see my interface what i am using..

    The output of that is as folows...

    The ip address 0.0.0.0
    The MAC address 00:00:00:00:00:00
    .................

    The catch occured here is...

    Before configuring(means when using default Winsock) i am able to run UDP and TCP simple client server application and able to communicate with each other successfully..

    After configuring(means when using Symbian TCP/IP stack) I am not able communicate the simple client/server applications also..

    Is there any mistake with configuration i did or I need to do something else to do..

    Pls help me if u got any idea regarding the above issues..
    Last edited by muralidharvvk; 2007-02-14 at 12:20.

  15. #15
    Registered User
    Join Date
    Mar 2007
    Posts
    14

    Re: Configuring proper networking in S60 3rd Ed emulator (NOT Winsock!)

    Hi sysctl,

    I followed your instruction step by step, but I can't manage to get it work. When I test the "httpexampleclient", it always gives me error "unrecognized event: -7361". I can't figure out what on earth the problem is. Below is my ced.cfg configuration:

    ......
    ############################################################
    ## LANBearer
    ##
    [LANBearer]
    ADD_SECTION
    Name=EKA2 Emulator Ethernet
    Agent=nullagt.agt
    IfName=ethint
    LDDFilename=enet
    LDDName==Ethernet
    PDDFilename=ethernet
    PDDName=Ethernet.Wins
    PacketDriverName=EtherPkt.drv
    LastSocketActivityTimeout=-1
    LastSessionClosedTimeout=-1
    LastSocketClosedTimeout=-1
    FIELD_COUNT=11
    END_ADD

    ADD_SECTION
    # COMMDB_ID = 1
    Name=Assabet on-board Ethernet
    IfName=ethint
    LDDName=not used
    PDDName=not used
    LastSocketActivityTimeout=30
    LastSessionClosedTimeout=30
    LastSocketClosedTimeout=30
    Agent=nullagent.agt
    FIELD_COUNT=8
    END_ADD

    ADD_SECTION
    # COMMDB_ID = 2
    Name=Winsock
    IfName=wsocki
    LDDName=foo
    PDDName=foo
    LastSocketActivityTimeout=-1
    LastSessionClosedTimeout=-1
    LastSocketClosedTimeout=-1
    Agent=wsocka.agt
    FIELD_COUNT=8
    END_ADD
    .....
    ############################################################
    ## LANService
    ##
    [LANService]
    ADD_SECTION
    Name=Ethernet using DCHP
    IfNetworks=ip
    IpNetMask=
    IpGateway=
    IpAddrFromServer=TRUE
    IpAddr=
    IpDNSAddrFromServer=TRUE
    IpNameServer1=
    IpNameServer2=
    ConfigDaemonManagerName=NetCfgExtnDhcp
    ConfigDaemonName=DhcpServ
    FIELD_COUNT=11
    END_ADD

    ADD_SECTION
    # COMMDB_ID = 1
    Name=Ethernet
    IfNetworks=ip,ip6
    IpNetMask=255.255.255.0
    IpGateway=0.0.0.0
    IpAddrFromServer=TRUE
    IpAddr=0.0.0.0
    IpDNSAddrFromServer=TRUE
    IpNameServer1=0.0.0.0
    IpNameServer2=0.0.0.0
    FIELD_COUNT=9
    END_ADD


    ############################################################
    ## IAP
    ##
    [IAP]
    ADD_SECTION
    # COMMDB_ID = 3
    Name=Emulator Lan IAP
    IAPServiceType=LANService
    IAPService=1
    IAPBearerType=LANBearer
    IAPBearer=1
    IAPNetwork=1
    IAPNetworkWeighting=0
    Location=1
    FIELD_COUNT=8
    END_ADD


    ############################################################
    ## ConnectionPreferences
    ##
    [ConnectionPreferences]
    ADD_SECTION
    # COMMDB_ID = 1
    Ranking=1
    Direction=OUTGOING
    BearerSet=LAN
    DialogPref=PROMPT
    IAP=1
    FIELD_COUNT=5
    END_ADD


    These are the only changes I made. Did I miss out anything. Please do help me to figure it out. Thanks.

Similar Threads

  1. SyncML API and S60 3rd edition?
    By harri_salminen in forum Symbian Tools & SDKs
    Replies: 4
    Last Post: 2008-03-20, 14:50
  2. Carbide c++ and S60 3rd Edition Feature Pack 1 Working
    By jimgilmour1 in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2006-10-18, 20:39
  3. Mail Sync for S60 / S60 3rd Devices
    By bmenke in forum PC Suite API and PC Connectivity SDK
    Replies: 4
    Last Post: 2006-09-17, 06:24
  4. What is going on with Vibration on S60?
    By amd_rikus in forum Mobile Java General
    Replies: 3
    Last Post: 2006-06-16, 00:29

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×