Connect an emulator to another
| Tue, 2006-05-09 12:37 | |
|
Hi All,
Can anyone help me out with how to make two emulator comunicate with each other (it might be in the same or different PCs). I have done it in the same Emulator(a server and a client through sockets) and it works. But my same applications are not working when i run it in different emulator(both series 60). Am i missing anything? Thanks, max_i |
|






Forum posts: 28
first you check your emulator.
it is configured for ethernet or not?
once you cofigure your emulator you can connect any other emulator or any other server/client.
Forum posts: 278
Actually i am confused hoW to configure the emulator.
You have any link regarding the info.
I found out many link but don't know which one to use.
Actually i won't be using the internet. It's just communication between two emulators. Both maybe in the same PC or different PC.
I am using series 60 2nd edition fp2..
thanks,
max_i
Forum posts: 28
For communicating the two emulator on diffrent machine or same machine you first configure it.
following are the some steps for configuring your emulator with ethernet.
for accessing internet through V8 emulator you must have a static IP diffrent from your machine IP.
Then simly you can go to "Tools" option on your emulator then click on preference->ethernetsetting .. click on check box "Use the following IP address" then enter your information including static IP address and DNS server name.
No need to fill proxy information.. then click on "ADAPTERS" button and select appropriate adapeters. if no option then press 1 and hit enter. then click on OK button.
Now you can access internet , communicate any client/ server application and communicate to emulator .
Forum posts: 278
So you mean i need to configure my emulator to have a static IP..and then go to the emulator preference option and change there also?
and what IP should i assign.
Is there any restricted IPs that i cannot assign for my emulator IP or i can assign any IP(different from my PC's IP) address.
Thanks,
max_i
Forum posts: 28
first you chose a static IP and then this IP fill in emulator preferences option.
for chosing the IP for emulator:
type a command in command prompt "ipconfig -all" then you will get your machine IP and all the the information about DNS server.. then you can selcet any IP address with in your IP address class range( this IP not used by the any other computer on the same network )
you choose IP address in range of your IP class which is assigned to your PC.
Forum posts: 278
So i don't need to configure the emulator programitically rite!
Actually when i click on the preference option i am not getting any window dialog to select the ethernetsetting ..
maybe something is wrong with my series 60 SDK.
max_i
Forum posts: 28
which version of series 60 SDk you are using?
previously i given the steps for cofiguring the emulator of Series 60 second edition feature pack2(8.0a FP2)
If you are using the same then wait until your emulator shows all the icon. .. then click on Tool -> preferences button.
One thing more in your system you must have JRE 1.4 or later version. for this you can simply install the JDK1.4 or later version.
Forum posts: 278
Yeah i am using 60 second edition feature pack2(8.0a FP2)
and about the java i am using jre1.5.0_06
But the thing is i am not able to view the preferences dialog window so instead i am using the network_config.bat under epoc\tools.
and about the IP address i should can i assign like 127.0.0.1, something like that.
Max_i
Forum posts: 28
you are right. when you click on network_config.bat file it will open the same configuration window as i told earlier.
now you are able to see the field like ip address .......
you type a command on command prompt "ipconfig -all"
then you will get all the information. you can put all the information same instead of IP address.
suppose your machine IP address is "192.168.1.23"
then you can enter the "192.168.1.24" but you take care about the IP conflict( no other machine have the same IP address on the network)
Forum posts: 278
Actually in my office there are thousands of computers in the network so i guess finding out the Unused IP address will be a bit difficult
So i was wondering if there's any other IP address i can assign. i've tried with the 127.0.0.1(KInetAddrLoop ) IP address but it's not working (works for when my server and client are running in the same emulator). I guess it won't, So is there any IP address that i can use?
Thanks,
max_i
Forum posts: 28
127.0.0.1 IP will not work. If your computer in a large network then you contact to your network ADMIN he will tell you the same class IP.
Forum posts: 278
actually i got an unused IP address
but when i am trying to bind the IP with the server
its getting stuck .. dunno why..
I have changed the emulator network seetings as you told
before..But still the server is not able to bind to the IP address.
max_i
Forum posts: 100
Binding with specific address just creates problems, as it only works if the interface with that address is fully up and running. Otherwise Bind will fail.
Forum posts: 278
But i didn't properly get what you said.
You mean.. i can use the port address only(using SetLocalPort) for the emulator-emulator communication..??
thanks,
max_i
Forum posts: 71
ill try to summarize the things that is needed for a socket communication b/w two emulators. ur emulator is just like ur PC. so it needs a unique IP address for communicating with another emulator in a LAN n/w. so u cannot use 127.0.0.1(loopback address) for ur emulator( in ur case u need two valid unused IP address for two emulators). then if u r using the same IDE(ie, MSVC) for both server and client, then ur emulators must recide in different machines and each must be configured with a dfferent IP address.( becoz once u configure an IDE's emulator with some preferences, it'll take the same preferences for all other emulators that u r opening from that IDE ).
coming to ur question, u can set any port number that u wish which must be in the permissible range. (other than the ports that is used by ur PC's system applications ). for checking the active ports of ur PC, give "netstat -a" in ur command prompt( so that u can specify a port number other than those ports ). the port that u r binding in ur server must be used in ur client for making connection. other than this u hav to give proper connection preferences for ur emulator( TCommsDbPref) like IAP id, bearerset,.. etc.
i hav already succeeded in communicating b/w two emulators in 2 different machines. if u need further clarifications, i can help u.