Canada
Asked — Edited
Resolved Resolved by Jeremie!

Running 2 Ez Cameras

I am trying to run 2 EZ Cameras on one instense of ARC. I can get a second one to run for a short time but then It quits working and then I get this error message;

8/4/2015 2:38 PM - Camera Initialized: EZB://192.168.1.1 @ 320x240 8/4/2015 2:38 PM - EZ-B v4 Camera Error: System.IO.IOException: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) --- End of inner exception stack trace --- at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) at EZ_B.EZBv4Video.() 8/4/2015 2:38 PM - Camera Disabled

I have tried it with and without the other camera running - same result.


ARC Pro

Upgrade to ARC Pro

Unleash your creativity with the power of easy robot programming using Synthiam ARC Pro

PRO
Canada
#1  

Hey Bob, I'm assuming that you are using client mode to hookup 2 ez-robot cameras to one instance of ARC? Are you changing the IP addresses to match the ez-b IPs? ex: 192.168.0.104

#2  

@jeremie, I have one connected in client mode, that one works great. The one I am having problems with is in AP mode. I have problems connecting two EZBs in client mode to my router, is that what I need to do? I have other cameras working fine in AP mode on other robots but there is only one camera on them.

PRO
Canada
#3  

Sorry Bob you can't have client and AP connected at the same time as client mode needs your computer to be connected to your home network. And Yes, You'll need to connect both your ez-b's via client mode to be able to have 2 ez-robot cameras working in one instance of ARC.

When connecting two ez-b's via client mode I can advise that you space your ez-b's out a bit so they don't interfere with each other and that you search for them (using the scan tool in ARC) on your router's network. Ex: my router's IP is 192.168.0.1 so I have to scan 192.168.0.1 to 192.168.0.254. Each ez-b will chime when it's found by the scan tool. Then you connect to each one individually in the connection window. ex: connection 0 = 192.168.0.115:23 and connection 1 = 192.168.0.116:23. You then need to change the camera IP's in the camera controls to 192.168.0.115 and 192.168.0.116.

Please check out this tutorial for an overview.

#4  

Thanks Jeremie, I tried getting two EZb's to connect in client mode to my router some time ago - couldn't get it work. I'll have to get a "router guy" over and try and figure it. I have been running my InMoov for along time with two EZB's- one in client mode and one in AP, haven't had any problems until I tried to run two cameras.

Thanks for your help

#5  

I assume to run one in client and one in AP your computer has a wired and wireless connection, or two separate wireless connections? You could probably successfully run cameras in two instances of ARC, but to run them in the same, I see why there would be issues.

As for running two in client mode, You are probably getting hit with the DHCP bug. https://synthiam.com/Community/Questions/7229

Have your router guy set "reserved IP" addresses of the EZ-Bs for the lowest octet on your network.

For instance, if your router IP is 192.168.0.1, set one EZ-B to get 192.168.0.2 and the other to get 192.168.0.3. Always start your computer first (unless it is wired, in which case it doesn't matter) then the ".2" EZ-B then the ".3" EZ-B. Depending on how fast your router responds to DHCP requests, the second EZ-B may get its IP address assigned by the first EZ-B instead of the router, but it will always be ".3" as long as the first one is ".2" and your computer will see it. If you start them simultaneously you can also likely avoid the issue but it is a little hit or miss.

Alan

#6  

@thetechguru, Yes, I have my computer wired to my router. Now I just need to find a "router guy ". Last time I attempted this I got frustrated and dropped it. My internet provider looked at me like I was talking a weird language when i told him what I needed done! Anyway, thanks for help.

#7  

I'm throwing this back up here because I've got both EZB's on my robot finally connected in Client mode. Now I trying to get two cameras working.

When both are up and running and I use one of them the other one gets knocked out. I have specified in the script which camera to use but it still happens and the URL of the second camera changes to that of the other.

Does anyone have 2 cameras setup and working? Could you give me some pointers to get going.

Thanks

#8  

I will set up to test on Sunday and either confirm the problem or verify it works and share my setup.

Alan

#9  

Thanks Alan. I'll keep playing with it too. I've looked thru the forum discussions and can't find anything on it. Maybe we are breaking new ground.

#10  

I been playing around trying to get a second camera to do something, here's some of the things I've tried;

Camera 1 is connected to EZB://192.168.2.104:23 Camera 2 is connected to EZB://192.168.2.94:23

I have images on both cameras.

If both Cameras are operating, when I run this script;


ControlCommand("Camera", CameraStart,"EZB://192.168.2.94:23")

ControlCommand("Camera", CameraColorTrackingEnable)

ControlCommand("Camera", CameraColorTracking, "red")

Sayezb("i am looking for something red")

sleep(3000)

if($CameraHorizontalQuadrant = "Unknown")
Sayezb("no I do not see a red Object")

endif

if($CameraHorizontalQuadrant != "Unknown")
Sayezb("yes I do see a red object")

endif

sleep(7000)

ControlCommand("Camera", CameraColorTrackingDisable)
ControlCommand("Auto Position", AutoPositionAction, "Rest")

The address for Camera 2 is flipped into the address bar of Camera 1 and the image of Camera 1 is disabled. The image on Camera 2 stays good but doesn't track RED.

If both cameras are off when I run the script - The address for Camera 2 is flipped into the address bar of Camera 1 and the image of Camera 1 is displayed. I've also noticed that the address for Camera 2 is never in the drop down list under Video Device (even though I have entered it several times)

Is there another way to specify a particular camera? Like when specifying a servo from a second EZB a 1 or the number of EZB connection is used ie, Servo(1.D3,50)

#11  

Are both Camera Objects named "Camera"? You will need to rename one and reference it in your control commands or both will try to act on it.

Alan

#12  

OK Thanks Renamed the second camera and it's working. Now I think I need to change some variables and I might have it.

#14  

So this is what hung me up for awhile, I didn't change this to Camera 2. So as Alan said it didn't know what camera to use. I thought I would put this up so others in the future will be sure to do it when running more than 1 camera.

User-inserted image

PRO
Synthiam
#16  

192.168.1.2 is not the same subnet as 192.168.2.104.

What this means is that you're connected to your router, as I can tell by the IP address. That's fine, but you can only use ip addresses within the routers network range. On your router it's between 192.168.2.2 and 192.168.2.254

That being said, the dhcp of the router will assign the IP address so you don't have to assign it yourself.