This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problems with sockets on Olimex LPC-E2214 eCos port




On Sun, 27 Aug 2006, Dmitry Varakin wrote:

Hi, everyone!

Some time ago we've got eCos port for Olimex LPC-E2294 board (great
thanks to Sergei Gavrikov).  I've modifed it so it now can run on
Olimex LPC-E2214 board. It's just i simple FLASH driver changes.
I've sucessfully built RedBoot, "kernel" and "net" configurations.
I've recofigured RedBoot to work without DHCP and BOOTP (usinfg
"fconfig -i", I've set static IP/NetMask and left fields "Gateway" and
"Server" empty). All works fine, the board recieves and transmits
pings.
Next I've build a smaple application (socket server test), which is
included into eCos distribution. I've uploaded it into the board using
TFTP (ethernet works!!!). First time I run it, the function [as I
remember the name] init_all_network_devices() worked very long time
and sayd "No ... DHCP/BOOTP found". Why eCos kernel is not reading
RedBoot ethernet configuration? Is it possible to set it only once?
I've rebuilt "net" configuration with static adresses (the same as for
RedBoot) and recompiled the sample program. Now the function
init_all_network_devices() works fast and prints "Unable to reach
network".
After that my debug information is:
socket() - OK (3)
bind() - FAILED (-1)
listen() - FAILED (-1)

The value of "eht0_up" is zero.

Wat was happened with ethernet?

PS: Sorry for bad language.

--
Dmitry.

With one only physical inetwork interface on a board to set up same IP address for RedBoot (or GDB session) and your net application is no good idea. In this case it is better to set up a static IP address for RedBoot and _other_ free IP address from a network address space for a tested application (static or get from DHCP server).

Try to build more complex net eCos example, for example, there is
net/httpd/current/tests/httpd1.c in test eCos suite and play with
this test.

See also http://ecos.sourceware.org/ecos/docs-latest/redboot/configuring-the-redboot-environment.html

Sergei

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]