From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17432 invoked by alias); 10 Jan 2008 14:15:29 -0000 Received: (qmail 17418 invoked by uid 22791); 10 Jan 2008 14:15:27 -0000 X-Spam-Check-By: sourceware.org Received: from fg-out-1718.google.com (HELO fg-out-1718.google.com) (72.14.220.155) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 10 Jan 2008 14:15:10 +0000 Received: by fg-out-1718.google.com with SMTP id l27so653196fgb.44 for ; Thu, 10 Jan 2008 06:15:07 -0800 (PST) Received: by 10.86.50.8 with SMTP id x8mr1856447fgx.30.1199974507071; Thu, 10 Jan 2008 06:15:07 -0800 (PST) Received: by 10.86.80.9 with HTTP; Thu, 10 Jan 2008 06:15:06 -0800 (PST) Message-ID: <2cbbd8de0801100615t7ddec856h752b60c4c747e401@mail.gmail.com> Date: Thu, 10 Jan 2008 14:15:00 -0000 From: "Antoine Zen-Ruffinen" To: "Gary Thomas" Cc: "eCos Discussion" In-Reply-To: <478623CE.9030406@mlbassoc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <2cbbd8de0801100509x43959b34ka8e8e6f35dd081e5@mail.gmail.com> <47861B06.30303@mlbassoc.com> <2cbbd8de0801100544j62d5b5ecl75969aaec1da5122@mail.gmail.com> <478623CE.9030406@mlbassoc.com> X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] Problem with TCP/IP stack X-SW-Source: 2008-01/txt/msg00045.txt.bz2 Sorry for the preceding message that was not send to the list, little mistake from me (cliqued "reply" and not "reply to all"). Yes my application print about DHCP transaction and it is ok. I have added some prints in every driver function in order to trace what it is doing. The output is interesting : 1) The NIC is making interrupts all the time 2) The network stack never call the send() function. Here is the output : RedBoot> load -m tftp -h 192.168.165.18 debugProg Entry point: 0x00200000, address range: 0x00200000-0x00238840 RedBoot> go [cyg_net_init] Init: mbinit(0x00000000) [cyg_net_init] Init: cyg_net_init_devs(0x00000000) Init device 'eth0' DP83816 at 0x0000e100, interrupt: 2a DP83816 - get ESA from EEPROM DP83816 - ESA: 00:00:24:c8:1d:6c Init device 'eth1' DP83816 at 0x0000e200, interrupt: 2a DP83816 - get ESA from EEPROM DP83816 - ESA: 00:00:24:c8:1d:6d [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(0x00238000) New domain internet at 0x00000000 [cyg_net_init] Init: cyg_net_add_domain(0x002378e0) New domain route at 0x00000000 [cyg_net_init] Init: call_route_init(0x00000000) [cyg_net_init] Done Network testing program V2 Thread started Init network : DP83816 - ISR on eth0 [eth_drv_ioctl] Warning: Driver can't set multi-cast mode [eth_drv_ioctl] Warning: Driver can't set multi-cast mode DP83816 - can_send on eth0 : 16 DP83816 - send on eth0 DP83816 - can_send on eth0 : 15 DP83816 - deliver on eth0 DP83816 - pool on eth0 DP83816 - Tx Event on eth0 DP83816 - Rx event on eth0 DP83816 - recv on eth0 DP83816 - recv on eth0 DP83816 - can_send on eth0 : 16 DP83816 - send on eth0 DDP83816 - ISR on eth0 P83816 - can_send on eth0 : 15 DP83816 - deliver on eth0 DP83816 - pool on eth0 DP83816 - Tx Event on eth0 DP83816 - Rx event on eth0 DP83816 - recv on eth0 BOOTP[eth0] op: REQUEST htype: Ethernet hlen: 6 hops: 0 xid: 0xec511d6c secs: 0 flags: 0x80 hw_addr: 00:00:24:c8:1d:6c client IP: 0.0.0.0 my IP: 192.168.165.254 server IP: 192.168.165.1 gateway IP: 0.0.0.0 file: boots.default options: DHCP message: 3 REQUEST DHCP server id: 192.168.165.1 DHCP time 51: 43200 DHCP time 58: 21600 DHCP time 59: 37800 subnet mask: 255.255.255.0 gateway: 192.168.165.1 domain server: 192.168.165.1 domain name: v165.itslabb.bth.se. 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.165.254 BOOTP[eth1] op: REPLY htype: Ethernet hlen: 6 hops: 0 xid: 0x0 secs: 0 flags: 0x0 hw_addr: 00:00:24:c8:1d:6d client IP: 10.0.0.10 my IP: 10.0.0.10 server IP: 0.0.0.0 gateway IP: 0.0.0.0 options: subnet mask: 255.255.255.0 IP broadcast: 10.0.0.255 gateway: 0.0.0.0 DP83816 - ISR on eth0 [eth_drv_ioctl] Warning: Driver can't set multi-cast mode DP83816 - can_send on eth0 : 16 DP83816 - send on eth0 DP83816 - can_send on eth0 : 15 [eth_drv_ioctl] Warning: Driver can't set multi-cast mode DP83816 - can_send on eth0 : 15 DP83816 - send on eth0 DP83816 - can_send on eth0 : 14 [eth_drv_ioctl] Warning: Driver can't set multi-cast mode DP83816 - can_send on eth1 : 16 DP83816 - send on eth1 DP83816 - can_send on eth1 : 15 [eth_drv_ioctl] Warning: Driver can't set multi-cast mode [eth_drv_ioctl] Warning: Driver can't set multi-cast mode DP83816 - can_send on eth1 : 15 DP83816 - send on eth1 DP83816 - can_send on eth1 : 14 [eth_drv_ioctl] Warning: Driver can't set multi-cast mode Network initalized ! Eth0 is up ! Eth1 is up ! socket() = 3 It seem that everthing is OK. start sending packets. A - 0> sendto() = 3 B - 0> Waiting for a packet DP83816 - deliver on eth0 DP83816 - pool on eth0 DP83816 - Tx Event on eth0 DP83816 - ISR on eth0 DP83816 - deliver on eth0 DP83816 - pool on eth0 DP83816 - ISR on eth0 A - 1> sendto() = 3 DP83816 - deliver on eth0 DP83816 - pool on eth0 DP83816 - ISR on eth0 DP83816 - deliver on eth0 DP83816 - pool on eth0 DP83816 - ISR on eth0 DP83816 - deliver on eth0 DP83816 - pool on eth0 DP83816 - ISR on eth0 A - 2> sendto() = 3 DP83816 - deliver on eth0 DP83816 - pool on eth0 DP83816 - ISR on eth0 DP83816 - deliver on eth0 DP83816 - pool on eth0 DP83816 - ISR on eth0 2008/1/10, Gary Thomas : > Please keep your replies on the eCos list! > > **EVERYONE** please get this straight. Replies made by me on the > eCos discussion list must be followed up on the eCos discussion list > unless I invite private replies. This way everyone benefits, not > just the interested party. Private email support consultation and > support is available, but only with a contract. > > Antoine Zen-Ruffinen wrote: > > The target platform is an embed PC with NS dp83816 NIC. I've port the > > eCos driver my self for the PC platform. > > > > I configure eCos with the configtool, just using the template I made > > and the "net" package. > > > > No, I didn't run a standard eCos network test program. But I build an > > redboot with this configuration. If I type ping -n 1000 -r 1 -h > > 192.168.165.18 (is my host PC) everything went fine ! > > This is only partly relevant - RedBoot uses a completely different > network stack than normal eCos applications. Also, RedBoot does > not use interrupts, which the eCos stacks rely on. > > > > > I know that nothing was send : 1 becose network activity led doesn't > > blink, 2 I monitor network with Wireshark (Ethereal). the monitoring > > trace show the TFTP exchange and the DHCP init but nothing more. It > > look like this : > > No. Time Source Destination Protocol Info > > 69504 25.515675 192.168.165.18 192.168.165.253 TFTP > > Data Packet, Block: 452 > > 69505 25.516279 192.168.165.253 192.168.165.18 TFTP > > Acknowledgement, Block: 452 > > 69506 25.516289 192.168.165.18 192.168.165.253 TFTP > > Data Packet, Block: 453 > > 69507 25.516662 192.168.165.253 192.168.165.18 TFTP > > Error Code, Code: Not defined, Message: redboot > > tftp_stream_terminate > > 69508 25.826093 0.0.0.0 255.255.255.255 DHCP > > DHCP Discover - Transaction ID 0x6c1dfce9 > > 69511 26.074789 0.0.0.0 255.255.255.255 DHCP > > DHCP Discover - Transaction ID 0x6c1dfce9 > > 69512 26.304739 0.0.0.0 255.255.255.255 DHCP > > DHCP Discover - Transaction ID 0x6c1dfce9 > > 69514 26.451407 0.0.0.0 255.255.255.255 DHCP > > DHCP Request - Transaction ID 0x6c1dfde9 > > 69516 26.839890 Olicom_c8:1d:6c Broadcast ARP > > Who has 192.168.165.254? Gratuitous ARP > > > > Did your eCos application print anything about the DHCP transaction? > I'm betting that it did not (which would imply you are having trouble > with receive interrupts from your driver) > > > > > 2008/1/10, Gary Thomas : > >> Antoine Zen-Ruffinen wrote: > >>> Hi List folks, > >>> > >>> I've a problem with the TCP/IP stack: > >>> - I use TFTP to load my program in redboot. That work fine. > >>> - My application start, call init_all_network_interfaces(), it do the > >>> DHCP stuff. That work fine. > >>> - Then I open a socket and try to send / receive data. No packet is even send. > >>> > >>> Does someone has already seen such problem ? > >>> Any idea ? > >> We'll need more data than this in order to help. > >> * What's the target platform? > >> * How did you configure eCos for your failing application? > >> * Have you run any of the standard eCos network test programs? > >> * How do you know nothing was sent? What sort of debugging > >> have you tried so far? > > > -- > ------------------------------------------------------------ > Gary Thomas | Consulting for the > MLB Associates | Embedded world > ------------------------------------------------------------ > -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss