Date: Wed, 18 Mar 2015 15:50:28 -0700 (MST)
From: Tizana <address@hidden>
Subject: [lwip-users] Connect my computer (client) to my board
(server/Lwip) using the hostname
Content-Type: text/plain; charset=UTF-8
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";
#endif /* LWIP_NETIF_HOSTNAME */
As you can see in the picture I have 3 devices connected in my network :
-my laptotp computer (192.168.1.2),
-my desktop computer which I work with (192.168.1.3)
-my board called lwipBoard (192.168.1.4).
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.