- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
However on a windows machine it is not working, is it possible to get it working on a windows machine this way?
Cheers,
Gerard