I imported the the newset version of the EthernetInterface but it dont works...
"cannot open source input file "rtos.h": No such file or directory" in file "EthernetInterface/LwIPNetworking/coreIOStream.h", Line: 25, Col: 17
I got past this point. Look up and add mbed_rtos. I'm stuck at the next step. During a compile, I get a lot of LwIP warnings, like 40 or so. The code compiles, but the linker fails.
Hi Jan-Hendrik, Kevin,
You are right, you need to import the mbed-rtos library as well.
There was a bug in the latest version of the libraries that made these warnings appear and that is now fixed, can you try updating the library?
Also, did you check the following programs? They can provide you with a good starting point to build your own code:
TCP Socket Hello World with Ethernet
Last commit 01 Mar 2013 by mbed official
UDP Socket Hello World with Ethernet
I think I found what made your code fail to compile.
You must have got this error:
"struct "os_thread_def" has no field "stack_pointer"" in file "EthernetInterface/LwIPNetworking/mbed-lwip/lwip-sys/arch//sys_arch.c", Line: 447, Col: 11
A change in the latest mbed-rtos update generated this error within the RTOS abstraction layer in the networking stack (in the lwip-sys library to be specific).
I just updated the lwip-sys library (and the EthernetInterface library which uses it) so that it is compatible with the new mbed-rtos revision.
Hope that this helps.
The update made all things better. So, a couple of questions:
1. Is there a way to get a link status at any time?
2. How can I test for a valid DHCP address after a connect() is issued?
3. How would I implement a NTP client?
This is great news.
To answer your questions:
//bool isConnected(); //Is the interface connected?
if( eth.isConnected() )
//char* getIPAddress(); //Get IP Address as a string ('a.b.c.d')
printf("IP Address is %s\n", eth.getIPAddress());
hey the newesr version works (with mbed-rtos lib)
but now the HTTPClientLibBeta dont works....
"cannot open source input file "api/socket.h": No such file or directory" in file "HTTPClientLibBetaHTTPClient.h", Line: 31, Col: 23
Thanks for the update. An important note: when attempting a eth.connect(), the mbed hangs forever if the Ethernet cable is disconnected. Is there a timeout value that can change?
Sorry about this regression. We have tried lately to make the Socket APIs consistent but we had to introduce a few architecture changes lately.
Can you try out this program (in beta) instead?
A HTTP Client for the mbed networking libraries
Last commit 30 Aug 2012 by Donatien Garnier
Yes, for now there is no timeout implemented in the eth.connect() function. This should definitely be added in a later revision.
thank you, now the program complies...
I still have some issues:
"cannot open source input file "TCPSocket.h": No such file or directory" in file "HTTPClientHTTPClient.h"
"cannot open source input file "core/fwk.h": No such file or directory" in file "HTTPClientHTTPClient.cpp"
Any ideas to solve it?
Please log in to post a reply.
mbed, the fastest way to prototype with ARM based microcontrollers.
^ back to top