USB control - Script Writing - CHDK Forum supplierdeeply

USB control

  • 7 Replies
  • 3222 Views
USB control
« on: 18 / March / 2010, 21:25:49 »
Advertisements
Hello,
   I am new to chdk and just got up and running with chdk installed on my canon S2 IS. Now before I dive into writing script etc.. I wanted to find out if what I want to do is within the scope of what CHDK will help me do, or better still some such utility/script is already available.

I want to talk to my camera via usb and preferably be able to perform all functions that I can manually do, shutter release, zoom, change mode, video etc... I did see the usb shutter release via usb schematic and that seems nice and straightforward but i really want to be able to perform more interactive control.

Any help/suggestion much appreciated.
 

*

Offline reyalp

  • ******
  • 13058
Re: USB control
« Reply #1 on: 19 / March / 2010, 00:30:50 »
As you have realized, the USB remote is not a computer USB connection. It's mostly just a remote shutter release, although you can script other things based on the USB power state.

Computer control over USB in CHDK is highly experimental, and not in the autobuilds yet, see http://chdk.setepontos.com/index.php/topic,4338.0.html

Many older canon cameras (including the S2) support USB control natively with the canon SDK. In this case you can use other programs (e.g. gphoto) for USB control.

Don't forget what the H stands for.

Re: USB control
« Reply #2 on: 19 / March / 2010, 02:46:20 »
thanks for your reply reyalp. I will check out the canon SDK but i fear that may not be of too much help to me. I wont be hooking this up with a PC. I will be building a microcontroller based module that will be hooked up to the camera and have a remote interface for user input..

The p2p thread might have something more interesting to me. Will chck that out.

Thanks and more pointers (non-dangling :p) welcome.


*

Offline reyalp

  • ******
  • 13058
Re: USB control
« Reply #3 on: 19 / March / 2010, 03:06:29 »
thanks for your reply reyalp. I will check out the canon SDK but i fear that may not be of too much help to me. I wont be hooking this up with a PC. I will be building a microcontroller based module that will be hooked up to the camera and have a remote interface for user input..

The p2p thread might have something more interesting to me. Will chck that out.
In either case, you'll have to implement a bunch of stuff to talk USB to the camera. You'd need to be able to run ptpcam or the equivalent on your microcontroller, and if you can do that, you can probably also use libgphoto to talk to the canon remote capture interface.

Depending on your project, an alternate approach would be replace some of the physical buttons and leds with wires to your microcontroller.

edit:
I believe people have done quite sophisticated control using the USB remote interface and microcontrollers. A forum search will probably turn something up.
« Last Edit: 19 / March / 2010, 03:34:19 by reyalp »
Don't forget what the H stands for.


Re: USB control
« Reply #4 on: 14 / April / 2010, 13:29:21 »
NXP (Phillips) make a series of Arm7 based microcontrollers, some of which have Host mode USB controllers embedded. Those ones have all the stuff needed for talking to a USB device like a camera. I saw a development kit just today on eBay for this that had samples of code for managing a mass storage type device. The board/kit was going for $88 at the time. The LPC2361 chip is one of them and is available on Digikey for $8.50 each. It would be a huge amount of work to do this without having the host controller already working for you.

(Unfortunately those chips are only USB 1.1 - I haven't seen a good and cheap USB 2.0 Host mode microcontroller but Austria Micro Systems make one that is likely hard to get hands on - used in the Sansa Fuze amongst others).
« Last Edit: 14 / April / 2010, 13:32:46 by csavery »

*

Offline reyalp

  • ******
  • 13058
Re: USB control
« Reply #5 on: 14 / April / 2010, 22:16:56 »
NXP (Phillips) make a series of Arm7 based microcontrollers, some of which have Host mode USB controllers embedded.
I was talking about ad-hoc control using the USB power signal, not actual USB protocol. Using an LED you can get get bidirectional communication. If your performance requirements are aren't too demanding, this should be relatively straight forward.
Quote
Those ones have all the stuff needed for talking to a USB device like a camera. I saw a development kit just today on eBay for this that had samples of code for managing a mass storage type device. It would be a huge amount of work to do this without having the host controller already working for you.
Even with a host controller, you still have to write or port a whole PTP layer, or reverse engineer the lower level stuff on the camera side.
Don't forget what the H stands for.

Re: USB control
« Reply #6 on: 15 / April / 2010, 10:35:22 »
I want to talk to my camera via usb and preferably be able to perform all functions that I can manually do, shutter release, zoom, change mode, video etc...
So what's problem? :)
S2 IS have native support for remote capture - just install Canon software from the installation disk and that's all.

Re: USB control
« Reply #7 on: 15 / April / 2010, 10:48:58 »

So what's problem? :)

Quote from: hucqym
I wont be hooking this up with a PC


 

Related Topics