Author Topic: Simulator and Win7  (Read 9309 times)

Offline Oellness

  • Newbie
  • *
  • Posts: 7
    • View Profile
Simulator and Win7
« on: January 18, 2010, 09:07:25 AM »
Hello,

i'm new with the µTasker Project so i tried the Demo Tutorial for the SAM7X.

I can compile the Simulator with VS2008 and the problem i've got is that i don't get a response if i ping to the simulator.

The IP Address from my PC is 192.168.166.21 with 255.255.255.0
My Fritzbox 7210 IP Address is 192.168.166.1

I change the IP Address in aplication.c in 192.168.166.166 with 255.255.255.0 and the Gateway and DNS Address to 192.168.166.1
I also change the MAC Address to 00 16 27 12 31 23

Now i start the Simulator and choose the NIC from my PC (NIC from NVIDIA Nforce 4 Board) but i don't get a response if i try to ping 192.168.166.166.

Please help me!
Thanks!
Best Reards
Oellness

Offline mhoneywill

  • Full Member
  • ***
  • Posts: 173
    • View Profile
Re: Simulator and Win7
« Reply #1 on: January 18, 2010, 11:09:24 AM »
Hello Oellness,

Here are a few things I would try. I would try each in turn.

1. Ensure that you have Wireshark installed which will mean that winpcap is installed. uTasker uses winpcap to create a bridge to its virtual network. This is probably installed otherwise I think uTasker would not run correctly.

2. When Running the simulator ensure that you go to the menu bar and under the "LAN" option choose "Select working NIC", then using the drop down box choose the network adapter that is on the 192.168.166.xxx subnet. If this shows "No Device used for simulation" or the wrong network adapter, then you will need to stop the simulator and restart it. Because uTasker only checks this value on program startup.

3. Ensure that the Lan adapter that you are connecting to in uTasker (The one on your 192.168.166.xxx subnet), is actually plugged into something and shows a link light, winpcap seems to need this.
 
4. You may have some firewalls running that block communications, try disabling them.

For simulation work, I have installed the Microsft Loopback adapter and created my own virtual network for testing, you could do this and create a virtual subnet on 192.168.1.xxx for instance and change the uTasker address to be say 192.168.1.166. I use windowsXP and have not tried installing the Loopback adapter in windows7 see http://support.microsoft.com/default.aspx/kb/839013 for info on installing it in XP. It looks like you can do this in Windows7 too see http://www.windowsreference.com/windows-7/how-to-install-a-loopback-adapter-in-windows-7/

Lastly for simple testing you do not need to set the Gateway and DNS in utasker, this is only needed if uTasker needs to resolve NAMES etc. Its not needed for simple Ping tests.

Good Luck

Martin

Offline Oellness

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Simulator and Win7
« Reply #2 on: January 18, 2010, 07:43:40 PM »
Hi,

to the points:

1: Wireshark/Winpcap is installed
2: I choose the "NVIDIA nForce MCP Networking Adapter Driver" as the working NIC. I also can choose Microsoft but this don't work, too.
3: The Lan Adapter is connected to my Fritzbox via Patch Cable.
4: I disabled the Firewall
5; I installed the Microsoft Loopback Adapter but i don't know to install a virtual subnet.

I can't ping to the simulator...

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3234
    • View Profile
    • uTasker
Re: Simulator and Win7
« Reply #3 on: January 18, 2010, 08:41:19 PM »
Hi

Also check the following:
http://www.utasker.com/forum/index.php?topic=180.0

TCP or IP checksum offloading can cause problems - they can then be disabled in the NIC settings. This case is also recognised by the fact that the target's (that is, the simulator's, IP/MAC is seen in the PC's arp table (command "arp -a" from a DOS window) even though the ping fails. This is because ARP work without IP but when the ping itself is attempted its IP checksum fails. This would also be seen using Wireshark since the ARP request and ARP response are normal but the ping's ICMP (based on IP protocol) fails. (Check the IP's checksum of the ping and it turns out to be 0x0000 because the NIC is expecting external HW to insert the real checksum).

To debug to see whether any Ethernet reception is working you can set a break point in the routine ReadDevice() in  WinPcap.cpp. Every Ethernet reception should pass through the call             while (main(RX_ETHERNET, ptr) == WAIT_WHILE_BUSY) {

- If the break is never hit there is a problem with binding the NIC to WinPCap.
- If the break point is hit, reception is basically good and stepping through the code from there will allow any configuration mismatches (or the offloading problem) to be identified.

Regards

Mark


Offline Oellness

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Simulator and Win7
« Reply #4 on: January 18, 2010, 09:51:16 PM »
Hi,

i've got it!

I'd forget to reboot.
After a reboot i could choose the loopback adapter and this works fine!
Now i can continue with the tutorial.

Thanks for the help...the next qustion will come soon...;-)

Volker