Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: ethernet interface not working
PostPosted: Thu Oct 27, 2011 7:21 pm 
Offline

Joined: Thu Oct 27, 2011 7:12 pm
Posts: 25
I'm using a 9g20 demo board with linux-2.6.30-at91-exp.3-at91sam9g20ek.bin and Angstrom-console-at91sam9-image-glibc-ipk-2009.X-stable-at91sam9g20ek.rootfs.jffs2. I have the network interface connect to a PC and I am running Wireshark on that PC. Even with the ping command on the board I can not see any traffic. Any ideas? I did this:

eth0: link up (100/Full)
root@at91sam9g20ek:~# ifup eth0
ifup: interface eth0 already configured

The ping command tells me "ping: sendto: Network is unreachable"

This is ifconfig:

eth0 Link encap:Ethernet HWaddr 02:43:1F:B7:68:3E
inet addr:192.168.1.102 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1118 errors:2 dropped:0 overruns:0 frame:0
TX packets:13 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:90472 (88.3 KiB) TX bytes:2429 (2.3 KiB)
Interrupt:21 Base address:0x4000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1168 (1.1 KiB) TX bytes:1168 (1.1 KiB)


Top
 Profile  
 
 Post subject: Re: ethernet interface not working
PostPosted: Thu Oct 27, 2011 8:04 pm 
Offline

Joined: Sat Oct 30, 2010 6:04 pm
Posts: 574
It's connected via a hub/switch or crossover cable?


Top
 Profile  
 
 Post subject: Re: ethernet interface not working
PostPosted: Fri Oct 28, 2011 3:18 pm 
Offline

Joined: Thu Oct 27, 2011 7:12 pm
Posts: 25
It is directly connected to the PC with a crossover cable. I've set/unset some of the Network Properties in the PC, with same result. (I always have TCP/IP enabled, but then I tried with the other properties all on and all off.)

Why does the 9g20 board detect the connection (the LEDs come on) and give the message "eth0: link up (100/Full)" if it can't actually use the network? It must be a setting in software?


Top
 Profile  
 
 Post subject: Re: ethernet interface not working
PostPosted: Fri Oct 28, 2011 5:12 pm 
Offline

Joined: Thu Oct 27, 2011 7:12 pm
Posts: 25
It was more than just the need for ifconfig. I also had to use 'route' to set the default gateway. I used the default gateway that the windows machine was using to get on the internet (seen via ipconfig) and then I did this:

I saw via 'route -n' that Genmask was 255.255.255.0 and so I used 'ifconfig' to give the board an IP address where the first 3 nibbles matched the first 3 nibbles of the default gateway. So if windows said the default gateway was "1.2.3.1" I gave the board and IP address of "1.2.3.2" (ifconfig eth0 1.2.3.2). Then I did 'route add default gw 1.2.3.1' and then I could reach outside network addresses!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: