[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Connect my computer (client) to my board, (server/Lwip)

From: Simon Koudijs
Subject: Re: [lwip-users] Connect my computer (client) to my board, (server/Lwip) using the hostname
Date: Thu, 19 Mar 2015 17:31:12 +0100
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0


Windows is actually using the netbios protocol to resolve these local names most of the times. There is an application in contrib-1.4.1.zip that's is created for this: netbios. Include it in your application and call netbios_init(). Works like a charm for me. It will use the hostname that you configured in the netif.

Best regards,
Simon Koudijs

On 19-3-2015 17:00, address@hidden wrote:
Message: 2
Date: Wed, 18 Mar 2015 15:50:28 -0700 (MST)
From: Tizana <address@hidden>
To: address@hidden
Subject: [lwip-users] Connect my computer (client) to my board
	(server/Lwip) using the hostname
Message-ID: <address@hidden>
Content-Type: text/plain; charset=UTF-8

Hi everybody, 

Here?s my problem: 

I have an STM32F4 board which contain an STM32F4 microcontrollers. And i use
the LWIP (open source TCP/IP stack designed for embedded). this board is the

In the other side the client will be my computer. I?ll create an application
using VB studio. 
Inside windows application I want to create a function to connect the
computer to the server (Board). This function aims to connect to the board
(server) without knowing the IP addresses but only using the hostname board.
I use for that the function Dns.GetHostEntry(hostname) 

I put the hostname and the function return me the IP of the device. I can
use the IP to connect to the (server). This function
Dns.GetHostEntry(hostname) works for the computer hostname but won?t work
for my board. It gives me an error. For example when I put the hostname of
my laptop the function give me her IP address. But when I use the board
hostname it won?t work and give me an error (like the hostname doesn?t exist
in the network) 

Here?s the function: 


The IP addresses of the server (board) is assigned by the DHCP. By default
the board is connect to the network without a hostname as shown in picutre1 


After doing some research in google I found how can i assign a host name to
my board. I have to define the LWIP_NETIF_HOSTNAME inside the lwipopts.h 
 #define LWIP_NETIF_HOSTNAME     1 

Then inside the ethernetif.c I can change the hostname: 

  /* Initialize interface hostname */ 
  netif->hostname = "lwipBoard"; 


As you can see in the picture I have 3 devices connected in my network : 
-my laptotp computer (, 
-my desktop computer which I work with ( 
-my board called lwipBoard ( 

I want to know if it?s possible to make the Dns.GetHostEntry(hostname) work
also for my board ?? I want to tell you that I don?t know well about the
network stuff, I?m only an electronics engineering. 

View this message in context: http://lwip.100.n7.nabble.com/Connect-my-computer-client-to-my-board-server-Lwip-using-the-hostname-tp24185.html
Sent from the lwip-users mailing list archive at Nabble.com.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]