how can I find ip address of my camera ip. Camera is connected by dhcp, so every time it is connected ip address is different. I can find ip address using "Ip Camera Finder" (witch shows all cameras connected, next question, how this program works?) but I need to do this from java (android) or c# (win ce).
Asked
Active
Viewed 1,597 times
6
-
What kind of camera (brand/manufacturer) is it? Have you tried capturing the network traffic while this camera finder tool is running to determine what it's doing to locate it? – mlorbetske Oct 19 '12 at 08:26
-
1http://stackoverflow.com/questions/9165536/ip-camera-how-to-detect-it-on-the-network – m0s Oct 19 '12 at 08:28
-
this is CoolCam, its something like Foscam. How can I capture network traffic? This could be good track – Radosław Malinowski Oct 19 '12 at 08:31
-
I use Wireshark from http://www.wireshark.org/ to capture traffic, though there are other tools available. – mlorbetske Oct 19 '12 at 08:37
-
1@m0s I'd make that an answer, it's a UPnP camera – mlorbetske Oct 19 '12 at 08:39
-
well, I did try to use cling on android but I couldn't find the camera. U think that "Ip Camera Finder" is using UPnP? Is there an easy tutorial how to search lan using UPnP with java or c# ?? – Radosław Malinowski Oct 19 '12 at 08:45
-
Were you connected to the same subnet as the camera? Finding UPnP references... – mlorbetske Oct 19 '12 at 08:49
-
well, I used this code http://4thline.org/projects/cling/core/manual/cling-core-manual.html#chapter.Android and it found only 2 ip addresses, neither of them was camera, and yes, it is the same subnet – Radosław Malinowski Oct 19 '12 at 08:54
-
1Windows CE UPnP docs http://msdn.microsoft.com/en-us/library/ms907986.aspx – mlorbetske Oct 19 '12 at 08:57
2 Answers
0
Normally the IP cameras have control port number in the range: 8150 - 8350.
The IPCam Finder will scan the IPs in local Network which have opened ports in above range.
For your case, you can use Addres Resolution Protocol ARP - a
or RARP command to find your MAC address of your IP Camera.
Then in your program, hardcode the MAC address and find the bound IP Adress.
With programming in C#, refer to: www.mostthingsweb.com/2011/11/reading-arp-entries-with-c/
Another way: You can always register a Fix IP Address in DHCP pool for your Camera by configuring Reservation in DHCP server (map fix IP to a specified MAC address).

Kelvin Trinh
- 1,248
- 7
- 15
-
This solution is not good for me. Imagine someone buy my app and then bay ip camera. Install app on phone, plug camera to network and it doesn't work because he need to do some woodoo stuff on router. It is crucial to work without configuring anything. But of course thx for Your help and time :) – Radosław Malinowski Oct 19 '12 at 10:54
-
If your question is in such general case, things are new problems. For that case, you still need at least some fix network specifications for ip cameras. In my idea, there's only the way to implement a port scan program which scans the IPs in LAN with suspicious ports. Port scanner example is quite simple: http://www.geekpedia.com/tutorial142_Creating-a-Port-Scanner-with-Csharp.html – Kelvin Trinh Oct 22 '12 at 01:52
-
Well, the best solution will be similar to app "Ip Camera Finder". When I run it, it shows me immediately ip of my camera. It probably use UPnP but I am not able to do this on android :/ – Radosław Malinowski Oct 23 '12 at 12:34
0
Well havent been here some time, I did 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 the best part was this message
string MessForCams = "4d4f5f490000000000000000000000040000000000000000000001";

Radosław Malinowski
- 149
- 11