2 Replies Latest reply on Jun 26, 2015 2:02 AM by clutech

    wiced hostname

    clutech

      Hello,

       

      Is it possible to configure my device with a hostname through wiced?

      So I can reach it with for example "http://wiced-device" instead of "http://192.168.1.1" ?

       

      I found the following snippet in LWIP source code twice in wwd_network.c and ethernetif.c

      #if LWIP_NETIF_HOSTNAME

        /* Initialize interface hostname */

        netif->hostname = "lwip";

      #endif /* LWIP_NETIF_HOSTNAME */

       

      I've changed LWIP_NETIF_HOSTNAME to 1 in opt.h

      While compiling it complaind in the wwd_network.c I couldn't assign a const.

      So I changed to:

      char acHostname[5] = { 'l','w','i','p','\0' };

      netif->hostname = acHostname;

       

      It then compiles but it doesn't seem to set it properly, I get unknown host back.

      Anyone a pointer on how to accomplish this?

       

      Cheers,

      Gerard

        • 1. Re: wiced hostname
          vikr

          Hi Gerard,

           

          We have our Gedday implementation in which we provide an option for hostname. You can find this in gedday.h.

          Let us know if this helps you

           

          thnx

          vik86

          • 2. Re: wiced hostname
            clutech

            Hi Vik86,

             

            Thanks for your suggestion.

            I added the following piece of code:

             

                gedday_init( WICED_AP_INTERFACE, "wiceddevice" );

                gedday_add_service( "Wiced Home Webpage", "_http._tcp.local", 80, 300, "" );

             

            On an Apple or Linux device it works and can surf to:

            http://wiceddevice.local

             

            However on a windows machine it is not working, is it possible to get it working on a windows machine this way?

             

            Cheers,

            Gerard