9 years, 7 months ago.

ip relay using mbed

Hi all, I have made a ip relay application on raspberry pi. As it is a mini computer, it easily let me to develop basic webpage where i can control the relay, by clicking on/ff button on webpage i can turn on/off the led by calling python script from php page,

Now I want to do this app on frdm-k64f, which is a freescale microcontroller with ehternet internet connectivity.

any suggestion ?? how should I start ? and i need help for software architecture as well.

any help would be appreciated !!

thanks in advance.

1 Answer

9 years, 7 months ago.

Hi Zain.

First off, I believe that the mbed ethernet library has not been fully tested, and I think it will still be some time before a full web server stack is made available for the K64f. Here is the link for the official Ethernet library for reference:

http://mbed.org/users/mbed_official/code/EthernetInterface/

The board is capable of replicating the behaviour that you want though. Take a look at this tutorial for more information on getting a web server running on the K64f:

https://freescale.hosted.jivesoftware.com/docs/DOC-101388.

The tutorial takes you step by step on enabling a shell access through the serial terminal, and it also provides web server access with a series of options to simulate an Heating Air Conditioning Ventilation System which I believe works as reference for what you want to do.

Regards,

Alfred

thanks for your help, Can you tell me the difference between online compiler and code warrior. I mean can codewarrior let me to develop the stand alone application, where my frdm-k64f will act as a stand-alone server?? I checked those links, but lil confuse

posted by zain aftab 28 Aug 2014

Sure. The online compiler and code warrior will essentially create the same binary files for your microcontroller to run. They work because the core of all the microcontrollers here are made by ARM and all the code is compliant with their specifications. You can use the mbed online platform to avoid installation of any programs on your pc, and take advantage of the mercurial based software versioning and revision control.

In terms of compiling, both the online and offline compiler are more less the same. However, since Code Warrior is made by Freescale (the same company that makes the K64f board) they release sample projects for their board that showcase how it can be used in several ways. The Heating Air Conditioning example that I linked is an example. Since mbed is made by a third party and is designed to work for all platforms, the libraries from mbed will usually be a bit behind from what you can get directly from the manufacturer.

The project I linked will indeed work as a stand alone server, though it is a complicated task. It is simple in a Raspberry to get it running since all the Ethernet, TCP/IP and server stacks are already coded, and you just program high level python scripts from inside the php page. If you want to get the K64f board to do the same you have to compile a project that will run the server stack with a little real time operating system (MQX RTOS), and a bunch of libraries. The only way right now to do that is with Code Warrior, since they supply all the code already in a package.

I hope this helps a bit in answering your question.

posted by Alfredo Espinoza Rhoton 28 Aug 2014