LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

SERVER IP

Hello,

i just create an application that uses datasocket. Now i'm lookink for a way
to get the IP of the Computer (Server) where datasocket is installed. Thats
what i want to do: First I create a distribution kit, that allows the
customer to install the datasocket application on his server. Then I want to
create a distribution kit, that installs an application (subscriber and/or
publisher) on any client, with a connection to the datasocket on the server.
Therefore i need to know the IP of the Server and copy it automtically in an
ini-File during the installation of a client application. So i guess i know
how to find out the ip-adress of the server, but i dont know how i can
transfer this information by setup.

Thanks for any help

Norbert Rieper
Bremerhaven, Germany


0 Kudos
Message 1 of 9
(4,050 Views)
you can add ini-files in your distribution kit with
create dist. kit -> edit file group -> add .ini file
is that what you're looking for ?
--
Once the game is over, the king and the pawn go back into the same box.
0 Kudos
Message 2 of 9
(4,044 Views)
Hello josswern,

no, thats not really what i'm looking for. My problem is, that i don't know
the server-ip of the customer when i create the distribution text. One part
of my application runs on the server and another part runs on a client
computer. At first the customer installs the server application on his
server. Than he has two install another application on any client. But i
don't want the customer to enter the server-ip at start of the
client-application. My idea is to have the setup routines for the client
installed in a directory on the server (together with the server setup).
Then, to install the client application the setup is called from the server,
catches somehow the ip of the server and transfer it somehow to the client
application during the installation. I dont want to start a poup panel at
the first start of the client application, that asks the user to enter the
server ip. Do you see what i want to do?



"josswern" <x@no.email> schrieb im Newsbeitrag
news:193045@exchange.ni.com...
> you can add ini-files in your distribution kit with<br>create dist. kit ->
> edit file group -> add .ini file<br>is that what you're looking for ?


0 Kudos
Message 3 of 9
(4,040 Views)
> I dont want to start a poup panel at the first start of the client application, that asks the user to enter the
> server ip. Do you see what i want to do?

ok,
now it is clear.
for this case, you will need a so-called 'broadcast' function in your server, so that any
client can detect this broadcast at startup and determine the server-ip.
unfortunately, I don't know how to realize such a function with cvi datasocket.
but maybe at least this idea can give you a hint on which way to go.
--
Once the game is over, the king and the pawn go back into the same box.
0 Kudos
Message 4 of 9
(4,038 Views)
Create the popup as you stated earlier, but have it collect the IP from the server instead of asking for it. Then instead of putting this inside your application create a new group in the distribution kit and add it there. Then have this run at the end of the installation. It is part of the "Advanced Distribution Kit options" to run something at the end of installation. Therefore it is part of the setup as you requested and will not bother the user after installation.

There is one flaw that I have seen to an collect serve in the installation approach. What if the server machine has to get a new IP address. How will the customer change the IP in the client if it is only in the setup process. There are 2 way I have seen to solve this problem.

1. Have the functionality to find the IP address in the application itself and runnable in quite mode by command line. This way the setup will run the command at install time and the user will not be confronted. But, if there is an issue with the server there is still a way for the client to correct itself.

2. Use a Dynamic IP DNS server (dyndns.org). This way the server registers itself with a name that will not change no matter how many times the IP changes. Then the client uses the name in the datasocket calls instead of the IP address. This seems to work well for those who are exposed to the internet.

Hope I have helped in some way.
Jeff
NI
0 Kudos
Message 5 of 9
(4,035 Views)
Thanks jlaney,

to use the name instead of the ip is a good idea. I thougt to put the IP in
an ini-file on the client automatically on installation without asking the
user for it. So theres still a possibility to change the saved ip when the
server is changed. So using the name seems to reduce the chance that the
user ever has to change the ip "by hand".
I know that executables could be started at the end of an installation, but
i dont't know if this really helps. Lets say the user starts the client
installation with the setup-files located on the server, i can write a small
code that starts on the server at the end of the installation and catches
the server-ip. But how do i get it then to the ini-file on the client. In
this case i don't know the client ip and not for sure the installation
directory on the client?


"jlaney" <x@no.email> schrieb im Newsbeitrag news:193160@exchange.ni.com...
Create the popup as you stated earlier, but have it collect the IP from the
server instead of asking for it. Then instead of putting this inside your
application create a new group in the distribution kit and add it there.
Then have this run at the end of the installation. It is part of the
"Advanced Distribution Kit options" to run something at the end of
installation. Therefore it is part of the setup as you requested and will
not bother the user after installation.<br><br>There is one flaw that I have
seen to an collect serve in the installation approach. What if the server
machine has to get a new IP address. How will the customer change the IP in
the client if it is only in the setup process. There are 2 way I have seen
to solve this problem. <br><br>1. Have the functionality to find the IP
address in the application itself and runnable in quite mode by command
line. This way the setup will run the command at install time and the user
will not be confronted. But, if there is an issue with the server there is
still a way for the client to correct itself.<br><br>2. Use a Dynamic IP DNS
server (dyndns.org). This way the server registers itself with a name that
will not change no matter how many times the IP changes. Then the client
uses the name in the datasocket calls instead of the IP address. This seems
to work well for those who are exposed to the internet.<br><br>Hope I have
helped in some way.<br>Jeff<br>NI
"jlaney" <x@no.email> schrieb im Newsbeitrag news:193160@exchange.ni.com...
Create the popup as you stated earlier, but have it collect the IP from the
server instead of asking for it. Then instead of putting this inside your
application create a new group in the distribution kit and add it there.
Then have this run at the end of the installation. It is part of the
"Advanced Distribution Kit options" to run something at the end of
installation. Therefore it is part of the setup as you requested and will
not bother the user after installation.<br><br>There is one flaw that I have
seen to an collect serve in the installation approach. What if the server
machine has to get a new IP address. How will the customer change the IP in
the client if it is only in the setup process. There are 2 way I have seen
to solve this problem. <br><br>1. Have the functionality to find the IP
address in the application itself and runnable in quite mode by command
line. This way the setup will run the command at install time and the user
will not be confronted. But, if there is an issue with the server there is
still a way for the client to correct itself.<br><br>2. Use a Dynamic IP DNS
server (dyndns.org). This way the server registers itself with a name that
will not change no matter how many times the IP changes. Then the client
uses the name in the datasocket calls instead of the IP address. This seems
to work well for those who are exposed to the internet.<br><br>Hope I have
helped in some way.<br>Jeff<br>NI


0 Kudos
Message 6 of 9
(4,032 Views)
Hello,

i also think you should try the broadcast function.

In the clientinstallation you can search for an Datasocket-Server. If you find someone you can write the ip adress in the ini File.
But i don't know, which way is the best to do it with LabVIEW or LabWindows/CVI.



Good Luck!

Markus Weigl
NI
0 Kudos
Message 7 of 9
(3,984 Views)
Thanks Markus,

yes, i think i need some kind of broadcast function. There don't seem to be
such a function in CVI. May be someone has a good idea how to realize it. I
don't want to test-ping all the possible network-ip's to find the Server!

Norbert


"MarkusW" <x@no.email> schrieb im Newsbeitrag news:194233@exchange.ni.com...
> Hello,<br><br>i also think you should try the broadcast function.
> <br><br>In the clientinstallation you can search for an Datasocket-Server.
> If you find someone you can write the ip adress in the ini File. <br>But i
> don't know, which way is the best to do it with LabVIEW or
> LabWindows/CVI.<br><br><br><br>Good Luck!<br><br>Markus Weigl<br>NI


0 Kudos
Message 8 of 9
(3,979 Views)
Hello,

The point of using the DNS server is that you do not have to know the IP.

First, go to a free DNS place such as niop or DynDNS. Create an account for the server and get the name that you want.

As part of the server install you have the name registered with whatever IP the server application was installed on.

Then the client already knows the servers "Name" and uses that to communicate.

This works great for sigle server install type applications. It falls appart when you want multiple servers.

Note: A way to get the IP from a server is to use a known FTP server. Teh server gets it's IP and writes to a file with a specified name to a known FTP server. The client then reads the value from the FTP server file. It is a little klunky, but will cut out having to scan every IP in a subnet.

Jeff
NI
0 Kudos
Message 9 of 9
(3,969 Views)