Multi-camera setup project. - page 15 - Creative Uses of CHDK - CHDK Forum supplierdeeply

Multi-camera setup project.

  • 462 Replies
  • 199634 Views
Re: Multi-camera setup project.
« Reply #140 on: 24 / August / 2014, 16:26:55 »
Advertisements
Probably unrelated so this more as a reference - there have been a few issues discussed, over the years, among the, currently, 2900 odd topics at LibUSB Dev http://libusb.6.n5.nabble.com/LibUSB-Dev-f7i2940.html...in particular I seem to remember one related to problems associated with greater than 64 connected devices. Think it was sorted though. 

*

Offline mphx

  • ***
  • 210
Re: Multi-camera setup project.
« Reply #141 on: 24 / August / 2014, 16:52:39 »

Did I mention you should try not using the GUI? ;)

Yes you did :) . We try to keep it simple..and by simple i mean "as less typing as possible".But we will do some tries tomorrow with cli and see.

Quote
If you are using custom GUI code that's just calling multicam functions from a button callback or something like that, it would also have this problem. Since you haven't published the code, I can't give you much help with that.
There is nothing fancy.Added one tab in gui.lua and a new lua file for that tab that just contains my buttons.Which buttons are copy/pasted from other buttons and i just changed the commands :)

Quote
IO error means that some problem has happened with the USB connection. So this is probably due to your general USB stability problems, and not specific to delete.
Yes , i thought so too , but the strange thing is that other commands (preview , rec mode , shoot) continue to work to ALL connected cameras like no camera had lost connection..that's the strange thing.Anyways....

Quote
That should mean that the one (or more) of the cameras was not processing messages as fast as you were sending them. Without knowing more about the specific sequence of events, I would be very difficult for me to guess what is happening.

multicam commands are implemented as messages sent with chdkptp <connection>:write_msg. The camera side script (rlib code at the bottom of multicam.lua) sits in loop waiting for messages. The message system has a queue that can hold up to 15 messages. Normally, you should wait for the previous command to be processed before attempting a new one, by using cmdwait or a hard coded delay.

So i have to turn some cmd to cmdwait.Is there a rule ?What commands need to be "cmdwait"?

*

Offline reyalp

  • ******
  • 14098
Re: Multi-camera setup project.
« Reply #142 on: 24 / August / 2014, 17:17:35 »
There is nothing fancy.Added one tab in gui.lua and a new lua file for that tab that just contains my buttons.Which buttons are copy/pasted from other buttons and i just changed the commands :)
It doesn't matter if it is "fancy" or not, it is much more difficult to give you specific advice when I don't know what you are actually doing.

Since you post about the problems you encounter, I assume you want help. If you do want help, it's in your interest to make it as easy as possible for those who volunteer their time and effort to help you. Providing as much specific detail as you can about the problem is a good way to do that.

Anyway, in this case it seems like the errutil.wrap code I suggested earlier should give you better diagnostics in your buttons.
Quote
So i have to turn some cmd to cmdwait.Is there a rule ?What commands need to be "cmdwait"?
As I said, you should wait for the previous command to finish before issuing a new one. You can use cmdwait with any command that uses write_status, which AFAIK is just about everything but quit. Note that depending how your code is set up, using cmdwait in the gui may make it effectively lock up until the command finishes.

I suspect there is some other underlying problem causing the queue to fill up, it seems unlikely that you would be issuing more than 15 commands to the same camera in rapid succession.  I wouldn't be surprised if it was somehow related to the communication errors, but I don't see exactly how that would happen, and not knowing the specific sequence of event I can only speculate.
Don't forget what the H stands for.

*

Offline mphx

  • ***
  • 210
Re: Multi-camera setup project.
« Reply #143 on: 25 / August / 2014, 03:04:01 »
@reyalp

here you go :)

https://www.dropbox.com/s/hfa9womf6bw9aip/gui.lua?dl=0

https://www.dropbox.com/s/yeq7itfr7t4h1ug/gui_multicam.lua?dl=0

my two custom files.

gui_multicam.lua is made of gui_user.lua , so many remarks and names are the same..didn't bother to change them :)

As you can see the maximum number of commands in one button is five...the other buttons are usually 2-3 commands at once.

Problem with hubs/cables are no1 suspect and we are working on it...
« Last Edit: 25 / August / 2014, 12:11:57 by mphx »


*

Offline mphx

  • ***
  • 210
Re: Multi-camera setup project.
« Reply #144 on: 27 / August / 2014, 08:04:42 »
At the end of the day it's all about cables and hubs.

Tests with shorter cables and better usb hubs result to more stability to usb connection with the cameras.

We are looking to buying new usb hubs now :)

@reyalp

Is it possible , if i connect to x number of cameras , and y number of them lost connection to continue working (issue multicam commands) to the remaining ?
Right now if atleast one camera lose connection..i can't do anything...i have to reconnect to all.

Is it possible to turn chdkptp into client/server ? :) I mean ...to be able to run chdkptp to let's say two different pcs and each one will connect to a specific number of cameras... then hit shoot to one pc and check in the local lan and sync shoot to all running instances of chdkptp... something like that :)

*

Offline reyalp

  • ******
  • 14098
Re: Multi-camera setup project.
« Reply #145 on: 27 / August / 2014, 22:34:46 »
Is it possible , if i connect to x number of cameras , and y number of them lost connection to continue working (issue multicam commands) to the remaining ?

Right now if atleast one camera lose connection..i can't do anything...i have to reconnect to all.
It should be possible to flag cameras when they hit an error or remove them from the list of active connections. This is something I've thought about but haven't written any code for yet.

Depending on the specific error, you might have to wait for some timeouts before the error was actually detected.

Quote
Is it possible to turn chdkptp into client/server ? :) I mean ...to be able to run chdkptp to let's say two different pcs and each one will connect to a specific number of cameras... then hit shoot to one pc and check in the local lan and sync shoot to all running instances of chdkptp... something like that :)
Of course it's possible in theory. In practice, I don't see any way to do it without writing a lot of new code.

You could easily have multiple instances of chdkptp receive their standard input over a network, using ssh or something like that. If you feed the standard input from another program, you could probably get shoot commands executed in reasonable sync.
Don't forget what the H stands for.

*

Offline mphx

  • ***
  • 210
Re: Multi-camera setup project.
« Reply #146 on: 01 / September / 2014, 16:21:16 »
UPDATE on the project :)

Cameras continue to give us a hard time.Their usb connection isn't reliable even with good expensive hubs.
We are starting to think to split tripods/cameras into 2 or 3 pcs , to lighten the load.
8 cameras are working stable.every next 8 cameras decrease stability....randomly....

This thought arises another pack of problems..how to click / shoot synced at the different computers.
We are thinking touch screen and use of teamviewer..still it will be tricky.

@reyalp

I will be straight .. how much do you want to make chdkptp work in a network :)

*

Offline ahull

  • *****
  • 634
Re: Multi-camera setup project.
« Reply #147 on: 01 / September / 2014, 17:21:17 »
How are you powering the hubs and cameras?

Could it be the case that the power supply is the cause of your woes, rather than the hubs themselves?

A previous rig suffered from earthing (electrical grounding) issues. You might like to take a look at this thread http://chdk.setepontos.com/index.php?topic=10385.120


*

Offline reyalp

  • ******
  • 14098
Re: Multi-camera setup project.
« Reply #148 on: 01 / September / 2014, 17:37:35 »
This thought arises another pack of problems..how to click / shoot synced at the different computers.
We are thinking touch screen and use of teamviewer..still it will be tricky.
As I suggested earlier, you should be able to do this programmatically if you use the CLI and feed commands over ssh or similar. You could also do it with some fairly trivial scripting using control files on a network filesystem.

Did you ever try using a linux host? Or using the CLI?

Do you have any more details of the specific errors and when they happen? Does it only happen if you shoot, or if you just connect to the cameras do they stop being connected after a while?

What specific errors do you get?
Quote
I will be straight .. how much do you want to make chdkptp work in a network :)
Spending much more time than I do now to chdkptp would require quitting my day job.
Don't forget what the H stands for.

*

Offline mphx

  • ***
  • 210
Re: Multi-camera setup project.
« Reply #149 on: 02 / September / 2014, 04:42:57 »

As I suggested earlier, you should be able to do this programmatically if you use the CLI and feed commands over ssh or similar. You could also do it with some fairly trivial scripting using control files on a network filesystem.

Did you ever try using a linux host? Or using the CLI?

Do you have any more details of the specific errors and when they happen? Does it only happen if you shoot, or if you just connect to the cameras do they stop being connected after a while?

What specific errors do you get?

There is no specific error and it doesn't occur in a specific moment..it can happen during "connecting" or during sync/shoot or during download/delete.It just pops a blank error window and when i see it i know that one or more cameras have lost connection.
It's irrelevant with gui..it happens when i use console too.And it happens when i hook up many cameras.With 8 cameras or 16 cameras its fairly stable..from 16 and up its random.
That's why i told you before..if there was a way to "ignore" those cameras that lost connection and multicam commands apply to the rest of them.
Because if one or two lost connection..i can process the result of the rest cameras..But now even one if loses connection , i can't do anything...i have to connect all of them again and pray no camera will lose connection..at  least at the connection stage...
« Last Edit: 02 / September / 2014, 04:44:32 by mphx »

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal