Webcamera does not work

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.

  • Hi,
    Don't you use DHCP ? Fixed IP ?
    Could you attach a display of serial monitor?
  • 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 Harmony,

    I cannot see IP address on your serial monitor. So it may not finish connecting a network.
    The examples should have codes like below. Could you tell me your code ?

    if (network.connect() != 0) {
    Serial.print("MAC Address is ");
    Serial.print("IP Address is ");
    Serial.print("NetMask is ");
    Serial.print("Gateway Address is ");
    Serial.println("Network Setup OK\r\n");
  • 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 ("") /* IP address */
    #define SUBNET_MASK ("") /* Subnet mask */
    #define DEFAULT_GATEWAY ("") /* Default gateway */
    #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 "" and set the Subnet mask to "", you need to set the IP address of the PC to "192.168.20.xx". (However, "" is excluded)

     Setting of fixed IP address

  •  I have set the IP address to  "", 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.


  • In the first photo, the IP address of Ethernet is "", but is this the picture before changing the Ethernet setting?

    Firstly press the OK button on the screen.

    Next you need to press the OK button on this screen as well.

    Are you connecting the PC and GR-PEACH directly with a LAN cable?
    If you use Fixed IP address, please connect directly with the LAN cable.

    "USE_DHCP" should be set to (0).
    #define USE_DHCP (0)
  • 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.


  • It seems that the IP address of your PC and the IP address of GR-PEACH are set to be the same.
    You are directly connecting the PC and GR-PEACH with a LAN cable, right?
    How about setting the IP address of GR-PEACH to ""?

    #define IP_ADDRESS ("") /* IP address */
  • Harmony,

    Have you resolved your issue?

    Mike Clements
    RenesasRulz Moderator
Reply Children
No Data