Accessing two devices with the same IP?

1

1

I want to connect my laptop to two WiFi enabled digital cameras, that have the same IP hardcoded: 192.168.1.1

One solution that I've successfully tried:

  • Connect one device to the laptop's built in WiFi adapter, and access it at 192.168.1.1:15740. Here 15740 is the standard port for PTP/IP (Picture Transfer Protocol via IP), a protocol for remote controlling cameras.

  • Set up a virtual machine with Linux. Attach a USB WiFi adapter to the virtual machine. Use SSH port forwarding to redirect port 15740:

    Screen shot of PuTTY port forwarding configuration

    Now the second camera's PTP/IP port can be accessed on the host at: localhost:15740

Is there a solution that doesn't require setting up a virtual machine?

Someone mentioned ForceBindIP, but I couldn't get it to work, at least not with ptp.js:

C:\Windows\SysWOW64\ForceBindIP.exe {64DD8F7D-8F9A-40DD-BE10-74011D549687} "C:\Program Files (x86)\nodejs\node.exe" C:\Scratch\ptp.js\node_demo\app.js capture 192.168.1.1

What I see is a window poping up and down, too fast to read it.

feklee

Posted 2014-10-20T10:14:11.197

Reputation: 1 194

1What is the make and model number of the camera? – DavidPostill – 2014-10-20T10:17:23.743

@DavidPostill Ricoh Theta

– feklee – 2014-10-20T10:19:01.470

2I don't believe that the IP addresses can't be modified, especially when 192.168.1.1 is typically the address of the router on the 192.168.1.x subnet. – AFH – 2014-10-20T10:21:14.253

1@AFH The Theta acts like an access point, taking on computers as clients on a network that includes only them and the Theta. It can also act as a router for a 192.168.1.x subnet using its built in 3G connection. It expects to be the only router on its LAN subnet. – David Schwartz – 2014-10-20T10:23:46.940

According to https://theta360.com/uk/support/manual/content/add_info/add_info_01.html the camera comes with a USB connection. Can you use this for one of the cameras?

– DavidPostill – 2014-10-20T10:24:43.733

@DavidPostill The USB connection is for downloading pictures and for charging the battery. You cannot trigger the shutter via it. I've tried that with gphoto2, and so have others. – feklee – 2014-10-20T10:39:02.450

@AFH Neither the official Android app nor documentation mentions the possibility of modifying the IP address. Also, I am not aware of any inofficial hacks to do that. Thing is, the WiFi connection is supposed to be used from smartphones and tablets. As these devices normally only have one WiFi adapter, there is no conflict, except if a device is connected to a 3G network 192.168.1.0/24. In that case you would simply disable 3G. – feklee – 2014-10-20T10:44:44.123

@DavidSchwartz - That is a very strange device indeed if it can't connect to an existing wireless network or co-exist with another like itself. It means you would need 3 wireless networks, your normal router, plus one for each of the cameras; you would need to switch networks for the internet and each of the cameras. I don't see how a VM would help, as it would still use the same wireless connection as the host. It might be possible to connect to all three networks simultaneously with two additional WiFi dongles with each locked to a VM, but that is probably not a well-trodden path. – AFH – 2014-10-20T10:46:56.847

@AFH I think you do actually need a VM with its own wireless interface for each camera. :( – David Schwartz – 2014-10-20T10:51:42.647

@feklee - There is a conflict if you normally connect your mobile to your domestic WiFi, as I and many others do. – AFH – 2014-10-20T10:52:11.657

@AFH Only need one VM would be required. If Internet is needed, then connecting to the Internet and to the Theta at the same time is no problem from Windows 7 with two adapters. Well, unless the Internet router also uses 192.168.1.0/24, but one could change that. The VM is only needed for the second Theta. The USB dongle would be attached directly to the VM, which is just one click with VMware and VirtualBox. – feklee – 2014-10-20T10:52:40.940

@DavidSchwartz - I thought that was what I was suggesting. – AFH – 2014-10-20T10:53:39.593

@feklee - You still need an interface for each camera, unless you normally connect your laptop via Ethernet, in which case, yes, you already have a spare WiFi interface, so you need only one dongle. If you can handle the two adapters within W7, then why not three? You could set the two Wifi interface IPs manually, eg 192.168.0.2 and 192.168.0.3, so they would co-exist in the laptop and would each be addressable within its own wireless network. Sorry, I missed a trick when suggesting you need two VMs. – AFH – 2014-10-20T11:10:53.363

@AFH One VM, I said. It's for NATing the second Theta's IP. As I wrote before: "If Internet is needed, then connecting to the Internet and to the Theta at the same time is no problem from Windows 7 with two adapters." In fact I do that all the time when developing and testing my app Theta Control.

– feklee – 2014-10-20T11:33:31.013

@feklee - OK. I see that there is a routing issue for addressing the second camera. – AFH – 2014-10-20T13:14:49.013

Answers

1

This is a bit of a reach, but its worth a shot. Find the MAC address to each of your cameras, then set up a static ARP mapping on your PC so that each camera has its own IP address. With the static ARP in place, you're machine won't try to resolve the ARP for the made up IP address, and will encapsulate the traffic with the correct MAC address.

That will definitely get the packets to the Camera. The only concern is if the Camera is listening specifically on the 192.168.1.1 IP, or on any IP. AKA, if its listening on localhost:15740, you'll be fine. If its only listening on 192.168.1.1:15740, this will probably not work.

Eddie

Posted 2014-10-20T10:14:11.197

Reputation: 203

Interesting - didn't know about this possibility. Unfortunately, it doesn't seem to work. Using arp -a, I found out the MAC address of the camera, associated with 192.168.1.1 (dynamic). Then using arp -s I assigned 10.0.0.200 as well as 192.168.1.2 to that MAC address (static). However, at neither of these IPs I could access the camera. If there is anything else I can try, please let me know. – feklee – 2014-10-20T17:57:01.757

To be clear, you will have to use IP addresses in your home network's range (192.168.1.x). So to put examples, if the MAC address for Camera 1 is c1c1.c1c1.c1c1 and the MAC address for Camera 2 is c2c2.c2c2.c2c2; You will want to map (for instance) 192.168.1.201 to c1c1.c1c1.c1c1, and 192.168.1.202 to c2c2.c2c2.c2c2. Once that is set, you can test by pinging 192.168.1.201 or .202. If you get responses, then the solution will work. (assuming the camera's respond to ping). At no time are you changing your PC's IP/MAC information, that stays the same. – Eddie – 2014-10-20T18:00:46.507

See, that's what I did: I mapped the camera's MAC to 192.168.1.2 (in the network), and also - for testing - to 10.0.0.200 (outside of the network). None of the IPs was reachable, neither by PTP/IP nor by HTTP. Ping I didn't try because I think the camera doesn't respond to ping requests. – feklee – 2014-10-20T18:21:37.693

Now I tried assigning 192.168.56.200, which is an unused IP in the host-only network used by VirtualBox, 192.168.56.0/24. At that IP the camera also was unreachable. – feklee – 2014-10-20T18:30:13.893