Java or C # (on win ce) How to find the ip address of my ip camera

how can i find the ip address of my ip camera. Dhcp connects the camera, so every time it is connected, the ip address is different. I can find the ip address using "Ip Camera Finder" (the witch shows all the connected cameras, the next question is how this program works?), But I need to do this from java (android) or C # (win ce).

+6
source share
2 answers

Well, I was here for a while, I found the answer to my question, here it is:

void SendCamData() { SendCamSearch(); ReceiveCams(); } void SendCamSearch() { udpC = new UdpClient(); try { udpC.Send(MessForCamsByte, MessForCamsByte.Length, CamsIpEndPoint); } catch (Exception e) { Console.WriteLine("Blad wysylanie search cam - " + e.ToString()); } } void ReceiveCams() { if (udpC != null) { listener = new Thread(UdpReceiveThread); listener.IsBackground = true; listener.Start(); listener.Join(2000); SendCamIpAndPort(CamsValsBuilder.ToString()); } } 

and best of all was this message

  string MessForCams = "4d4f5f490000000000000000000000040000000000000000000001"; 
0
source

Typically, IP cameras have a management port number in the range: 8150 - 8350.

The IPCam crawler scans the IP addresses on the local network that opened the ports in the above range.

For your case, you can use the Addres ARP - a resolution protocol or the RARP command to find your MAC address for your IP camera.

Then in your program, enter the MAC address code and find the associated IP address.

For C # programming, refer to: www.mostthingsweb.com/2011/11/reading-arp-entries-with-c/

Another way: you can always register the Fix IP address in the DHCP pool for your camera by setting Backup on the DHCP server (bind the IP address of the card to the specified MAC address).

0
source

Source: https://habr.com/ru/post/928094/


All Articles