Forums Register Login

multicasting java program with nodes on different static or dynamic networks!

+Pie Number of slices to send: Send
I am working on java program which runs on server. Java program monitor lots of electronics custom made device which connected to the server.
When at first time both server & that device starts, server send broadcast message which receive to that device, it send its details to server so basis of that details i can show different print statements on screen & we can understand that device no x condition, whether it connected, disconnected or working on plan a, plan b etc

Always i enter ip address in that device manually(Not every time only first time), so we can say every device ip address i know. Or i can change it. Device currently not smart to automatically get network Server network setting is not accessible to java user or developer but may be by program we can fetch server network configuration & print it in console!

Now problem is when i connect device on different network, & we dont know what is network ip...eg i can connect very easily if server connect on 192.168.0.0 network & some device on same network then on those devices i can keep ip like 192.168.0.3 or 192.168.0.254.

It not always happens that we can know the network ip or details by wire comes on table for internet which we can just plug on laptop or electronics device...in simple scenario like normal offices or home we can easily plug that wire to laptop & see network configuration by tracert or ping but some more secure place where laptop not allow & no one tells what ip for particular wire comes on table...some where far router placed restricted area there i face problem.

So that situation my java program fail to send broadcast packet using UDP.
I am try to find out way to communicate those electronic devices & server when both connect on different networks considering we can fetch network details on server or on electronics device!

I search on google, regarding how networks works, how router works, which protocol do what etc from basics.
So find out some points
1. If router configure for advertise its network details to all its ports then by that packet if our electronic device learn how to read it, then problem will solve?
2. By this we can list all network details for each electronic device on paper & in our java program we can use multicasting udp program given in many website (simple example).

I found one API also after reading this & this.
That API is jnetpcap.

Now i think my electronics device should more intelligent to read or fetch different packets. So it also do something for get reach to the server!

But i need guidance from expert...whether i am going right path or doing wrongly?
Get out of my mind! Look! A tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1314 times.
Similar Threads
Find a Server of unknown IP
some java interview Questions
possible to send multicast packet out from multiple interfaces?
How to make a Serverless java LAN Chat application with a user list
Multicasting with Java?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 06:29:02.