Hi, I am testing the example code Webcamera. I have import the Webcamera to mbed Compiler, and changed the IP address to mine, but I cannot open web browser "192.168.x.x/web_top.htm". Do you know which step I might did wrong? Thanks in advance.
Thanks for reply. I have fixed the IP address to mine, and tried to set "#define USE_DHCP (0)" and " define USE_DHCP (1)" respectively. After compile the code, when I press reset button, the teraterm shows program start. But when I using web brower, it shows unable to connect.
Hi Okamiya,
Thanks for reply. I have similar code from example, they are:
if (network.connect() != 0) {
printf("Network Connect Error \r\n");
return -1;
}
printf("MAC Address is %s\r\n", network.get_mac_address());
printf("IP Address is %s\r\n", network.get_ip_address());
printf("NetMask is %s\r\n", network.get_netmask());
printf("Gateway Address is %s\r\n", network.get_gateway());
printf("Network Setup OK\r\n");
I have download a program called " Advanced IP scanner", but it cannot find out the IP address for GR Peach. I used command to check IP address.
Below is the only code I have modified from the example code (I have tried used wireless IP address and Ethernet IP address,but non of them work):
/**** User Selection *********//** Network setting **/#define USE_DHCP (1) /* Select 0(static configuration) or 1(use DHCP) */#if (USE_DHCP == 0) #define IP_ADDRESS ("192.168.20.5") /* IP address */ #define SUBNET_MASK ("255.255.255.0") /* Subnet mask */ #define DEFAULT_GATEWAY ("192.168.20.1") /* Default gateway */#endif#define NETWORK_TYPE (0) /* Select 0(EthernetInterface) or 1(GR_PEACH_WlanBP3595) */
Thanks for your help!
If you use Fixed IP address, USE_DHCP should be set to (0).Since you have set the IP address of GR-PEACH to "192.168.20.5" and set the Subnet mask to "255.255.255.0", you need to set the IP address of the PC to "192.168.20.xx". (However, "192.168.20.5" is excluded)
Setting of fixed IP address developer.mbed.org/.../Homepage
I have set the IP address to "192.168.20.1", which is also default gateway address. But still, I cannot connect to web browser and the serial monitor shows network connect error. Here are some screen shots about my setting.
Thank you very much. I have fixed the settings, and blocked this sentence //printf("MAC Address is %s\r\n", network.get_mac_address()); After these steps, Tera Term shows Network Setup OK, but I still cannot open web browser.