Can anyone explain why my code (this is a fragment ) doesnt work .I want to assign an ip address to my mbed. I dont want to use DHCP. I've tried lots of different permutations on calling the EthernetNetIf with and without ip addresses in brackets, with and without preceeding the address with IpAddr, with and without enclosing commas, with and without quotes etc etc etc. In this particular case I get the error ""No instance of constructor "IpAddr::IpAddr" matches the argument list (E289)" in file "/HTTPServerHelloWorld.cpp". Such a simple thing is getting in the way a lot and I'd be grateful for any assistance or guidance.
Greg
#include "mbed.h"
#include "EthernetNetIf.h"
#include "HTTPServer.h"
EthernetNetIf eth(IpAddr(192.168.1.145),IpAddr(255.255.255.0),IpAddr(192.168.1.1),IpAddr(192.168.1.1));
HTTPServer svr;
DigitalOut led1(LED1);
int main() {
printf("Setting up...\n");
EthernetErr ethErr = eth.setup();
if(ethErr)
{
printf("Error %d in setup.\n", ethErr);
return -1;
}
printf("Setup OK\n")
k. I want to assign a particular ip address to my mbed
Can anyone explain why my code (this is a fragment ) doesnt work .I want to assign an ip address to my mbed. I dont want to use DHCP. I've tried lots of different permutations on calling the EthernetNetIf with and without ip addresses in brackets, with and without preceeding the address with IpAddr, with and without enclosing commas, with and without quotes etc etc etc. In this particular case I get the error ""No instance of constructor "IpAddr::IpAddr" matches the argument list (E289)" in file "/HTTPServerHelloWorld.cpp". Such a simple thing is getting in the way a lot and I'd be grateful for any assistance or guidance.
Greg
k. I want to assign a particular ip address to my mbed