Hi Angus,
Do you mean static IP just with the Ethernet class?
I'm afraid, thats not easy, the mbed Ethernet class speaks just plain Ethernet. So you can place a packet on the wire and receive a packet from the wire. This is enough for things like ARP requests. Wakeup over LAN or some simple UDP hacks.
For anything more like what requires a full IP stack its better to use an IP stack like lwip. We have a Cookbook project which deals with lwip.
If you want to have a look at it and using the HTTPClient/Server implementations priovided by it it looks like it's fairly simple to use just have a look here:
http://mbed.org/projects/cookbook/api/EMAC/lwip/trunk/HTTPClient/HTTPClient#HTTPClient.HTTPClient
something like
HTTPClient http("wolf", // Brings up the device with static IP address and domain name.
IPv4(192,168,0,44), // IPv4 is a helper function which allows to rtype ipaddresses direct
IPv4(255,255,255,0), // as numbers in C++.
IPv4(192,168,0,1), // the device address is set to 192.168.0.44, netmask 255.255.255.0
IPv4(192,168,0,1)); // default gateway is 192.168.0.1 and dns to 192.168.0.1 as well.
might work for you
Cheers
Rolf
This question raised to support. I have posted here so that there is a searchable record that will help mbed users inthe future.
Glad you like the project!
NXP have documented the microcontroller itself in detail, but the thing that is hard to do is document projects and examples that are useful. There are so many possible designs and it is still early days - it will improve over time!
Some good work and example projects have started using Ethernet, they are documented is
The IP stack used does use DHCP :
It is possible to use static IP with a few tricks, though I'm not sure about the multiple TCP listeners. Rolf (who did these projects) will probably post with some definitie answers when he sees the thread.
Cheers,
Chris