This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: How to test ethernet connection?
Gary Thomas wrote:
David Luca wrote:
Hello,
I included the Cirrus Logic 8900 ethernet driver, everything compiled and
starting the platform
shows me the following messages:
[cyg_net_init] Init: mbinit(0x00000000)
[cyg_net_init] Init: cyg_net_init_devs(0x00000000)
Init device 'cs8900a_eth0'
[cyg_net_init] Init: loopattach(0x00000000)
[cyg_net_init] Init: ifinit(0x00000000)
[cyg_net_init] Init: domaininit(0x00000000)
[cyg_net_init] Init: cyg_net_add_domain(0x082aab1c)
New domain internet at 0x00000000
[cyg_net_init] Init: cyg_net_add_domain(0x082a9614)
New domain route at 0x00000000
[cyg_net_init] Init: call_route_init(0x00000000)
[cyg_net_init] Done
SYSTEM INITIALIZATION in progress
NETWORK:
BOOTP[eth0] op: REPLY
htype: Ethernet
hlen: 6
hops: 0
xid: 0x0
secs: 0
flags: 0x0
hw_addr: 00:23:31:36:00:01
client IP: 172.168.1.103
my IP: 172.168.1.103
server IP: 172.168.1.86
gateway IP: 172.168.1.1
options:
subnet mask: 255.255.255.0
IP broadcast: 172.168.1.255
gateway: 172.168.1.1
data index = 4
I assume it was initialized correctly, my question is, how can I test the
ethernet connection
between host pc and target pc? I tried to use ping 172.168.1.103, but no
response (I must mention
that I download the eCos application to the target via FTP, using
MicroMonitor, so I know ethernet
is working).Thank you in advance, David Luca.
What program gave you this output?
You could try to build & run one of the network tests, e.g.
'ping_test' to verify your hardware. Here's how I do it:
% ecosconfig new <platform> net
% ecosconfig tree
% make -s
% make -C net/common/current tests TESTS=tests/ping_test
This will build just the one test which you can then download and run.
Following Gary's scripting, I get such results for my target with CL
CS8900A (see below). My DHCP server runs on 192.168.0.33. RedBoot pings
in/out okay too (RedBoot use a static IP).
from /etc/dhcpd.conf:
subnet 192.168.0.0 netmask 255.255.255.0 {
option routers 192.168.0.33;
# eCos clients get this pool.
pool {
max-lease-time 300;
range 192.168.0.97 192.168.0.100;
allow unknown-clients;
}
}
from /ets/hosts:
127.0.0.1 localhost
192.168.0.33 darkstar.example.org darkstar
from /tftpboot/ping_test:
RedBoot> load ping_test
RedBoot> Using default protocol (TFTP)
Entry point: 0x81010040, address range: 0x81010000-0x81051cc8
RedBoot> [cyg_net_init] Init: mbinit(0x00000000)
[cyg_net_init] Init: cyg_net_init_devs(0x00000000)
Init device 'cs8900a_eth0'
[cyg_net_init] Init: loopattach(0x00000000)
[cyg_net_init] Init: ifinit(0x00000000)
[cyg_net_init] Init: domaininit(0x00000000)
[cyg_net_init] Init: cyg_net_add_domain(0x810516e0)
New domain internet at 0x00000000
[cyg_net_init] Init: cyg_net_add_domain(0x81051108)
New domain route at 0x00000000
[cyg_net_init] Init: call_route_init(0x00000000)
[cyg_net_init] Done
Start PING test
BOOTP[eth0] op: REQUEST
htype: Ethernet
hlen: 6
hops: 0
xid: 0xb5e5678
secs: 0
flags: 0x80
hw_addr: 40:00:12:34:56:78
client IP: 0.0.0.0
my IP: 192.168.0.99
server IP: 192.168.0.33
gateway IP: 0.0.0.0
options:
DHCP message: 3 REQUEST
DHCP server id: 192.168.0.33
DHCP time 51: 300
DHCP time 58: 150
DHCP time 59: 262
subnet mask: 255.255.255.0
gateway: 192.168.0.33
domain name: example.org
DHCP option: 37/55.9: 54 51 58 59 1 3 6 15 28
DHCP option: 39/57.2: 576
DHCP requested ip: 192.168.0.99
PING server 192.168.0.33
64 bytes from 192.168.0.33: icmp_seq=0, time=0ms
310 bytes from 192.168.0.33: icmp_seq=1, time=0ms
556 bytes from 192.168.0.33: icmp_seq=2, time=0ms
802 bytes from 192.168.0.33: icmp_seq=3, time=0ms
1048 bytes from 192.168.0.33: icmp_seq=4, time=0ms
1294 bytes from 192.168.0.33: icmp_seq=5, time=0ms
1540 bytes from 192.168.0.33: icmp_seq=6, time=0ms
1786 bytes from 192.168.0.33: icmp_seq=7, time=0ms
2032 bytes from 192.168.0.33: icmp_seq=8, time=0ms
2278 bytes from 192.168.0.33: icmp_seq=9, time=10ms
2524 bytes from 192.168.0.33: icmp_seq=10, time=10ms
2770 bytes from 192.168.0.33: icmp_seq=11, time=10ms
3016 bytes from 192.168.0.33: icmp_seq=12, time=10ms
3262 bytes from 192.168.0.33: icmp_seq=13, time=10ms
3508 bytes from 192.168.0.33: icmp_seq=14, time=10ms
3754 bytes from 192.168.0.33: icmp_seq=15, time=10ms
Sent 16 packets, received 16 OK, 0 bad
PING server 192.168.0.65
recvfrom: Operation timed out
recvfrom: Operation timed out
recvfrom: Operation timed out
recvfrom: Operation timed out
recvfrom: Operation timed out
recvfrom: Operation timed out
sendto: Host is down
sendto: Host is down
sendto: Host is down
sendto: Host is down
sendto: Host is down
sendto: Host is down
sendto: Host is down
sendto: Host is down
sendto: Host is down
sendto: Host is down
Sent 16 packets, received 0 OK, 0 bad
PASS:<Ping test OK>
EXIT:<done>
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss