Sunday, May 12, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 519  / 1 Year ago, thu, march 2, 2023, 11:23:03

I have an embedded PC running Linux server and a simple web server which is used in agriculture industry, my customers buy these PCs and use them in their fields. ( they install it on a pole 6 or 7 meters above ground level and it is very hard to access)
sometimes they change the range of these PCs IP address from original one to their own desired IP Range.
for example I ship them with 192.168.10.10/24 but they might change it to something like 172.16.12.19/29 or 10.10.200.10/8 or ....


the problem is that after a while they forget the PC IP Address and we want to give them a tool to detect and show them the current IP Address.


I thought maybe using Broadcast IP address and sending a message over local network might help to solve this problem. but after some search I realized I have to know the range at least for example (172.16.12.X or 10.10.200.X) which is not possible for me because the farmers forgot the network range too.
Is there any tool like "NC" in Linux which can help me to write a bash script to find their IP ? I have network access to the PC but I cannot connect a Monitor to the PC so the only way is to find the IP using the local network.


I want something like this :


echo "What is your IP Address ? " | nc -w1 -u 4545

and I put something on the PC which answers to this message whenever they got the exact phrase What is your IP Address ? "


nc -l -u -p 4545

but for the nc I have to specify a network range which is not possible for me.


Edit:


if you have worked with Device Discovery tool (DDT) for IP Cameras you know that they will find the camera IP independent of the PC which has the DDT on it. I want something exactly like those program but with bash commands.


More From » networking

 Answers
6

If you use avahi on your embedded PC you won't have to re-invent/re-implement service-discovery


On embedded PC:s:


apt-get install avahi-daemon
systemctl enable avahi-daemon --now
un-comment #publish-workstation=yes in /etc/avahi/avahi-daemon.conf
systemctl reload avahi-daemon

On machine used to discover embedded PC:s


apt-get install avahi-utils
avahi-browse -atr # will output names and ip:s of devices on network to terminal

[#1361] Friday, March 3, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
eaderitable

Total Points: 368
Total Questions: 117
Total Answers: 111

Location: Tuvalu
Member since Sat, Feb 11, 2023
1 Year ago
eaderitable questions
Tue, May 24, 22, 07:37, 2 Years ago
Mon, Aug 23, 21, 02:31, 3 Years ago
Wed, Apr 6, 22, 13:20, 2 Years ago
Tue, Dec 14, 21, 16:57, 2 Years ago
Sat, Apr 30, 22, 09:06, 2 Years ago
;