Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 5 months ago.
FRDM-K64F- Ethernet / Webserver
Hi,
has anyone got some code running for the FRDM-K64F using Ethernet/ TCP-IP or a web server. I tries several available in mbed, but non compiled correctly.
Klemens
3 Answers
8 years, 6 months ago.
Here is my step-by-step tutorial: http://e.pavlin.si/2016/05/09/simple-web-server-hosted-on-nxpfreescale-frdm-k64f-demo-board/
10 years, 1 month ago.
Did you ever get anywhere in getting a working Ethernet library on the K64F?
10 years, 1 month ago.
I managed to create a webserver on K64F, and it is working fine, here are some of the steps you need to take: 1)import EthernetInterface library, and update it to latest version (it has the K64F compatibility) 2)import mbed-rtos library as well 3)import mbed-src library. 4) delete mbed library from your program.
then try the following piece of code
EthernetInterface eth; eth.init(); eth.connect(); printf(" IP address: %s \r\n",eth.getIPAddress());;
in order to make a webserver you need to bind a tcp port as well like
TCPSocketServer server; server.bind(port); //where port is 80 if(server.listen() != 0); int32_t status = server.accept(client); if (status>=0) {// webpage here }
Can you share which one you have tried? Which did not even compile? That should be reported.
posted by Martin Kojtal 19 Jun 2014I tried for example: WebsocketEthernet_HelloWorld;
Compile error:
Error: Cannot open source input file "cmsis_os.h": No such file or directory in "EthernetInterface/lwip/lwipopts.h", Line: 28, Col: 22
Not clear which librayr to add.
Klemens
posted by Klemens Waldhör 19 Jun 2014I tried also HTTPServer_echoback running with the FRDM-K64F board. It does not compile because of Error: #error directive: The Ethernet Interface library is supported only on the mbed NXP LPC1768 in "EthernetInterface/EthernetInterface.h", Line: 24, Col: 2
posted by Klemens Waldhör 19 Jun 2014