CHDK PTP interface - page 92 - General Discussion and Assistance - CHDK Forum

CHDK PTP interface

  • 1241 Replies
  • 487385 Views
*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: CHDK PTP interface
« Reply #910 on: 14 / November / 2012, 03:57:14 »
Advertisements
Some of you may not like the way I changed dng.h and dng.c (I mean the added #ifdefs), if I should change it, just ask :)

I don't think #ifdef code in a module is a good idea. As far as possible the modules should be platform and version independent.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline Taka

  • *
  • 12
Re: CHDK PTP interface
« Reply #911 on: 14 / November / 2012, 08:09:08 »
- You have installed CHDK and set it to autoboot with the lock switch on the card. OK!
- If you start the camera in play mode, do you see the CHDK splash screen showing up for a few moments? Yes, I do. Can you enter ALT mode (I think you need to use the "face" button for that)? Yes, I can. If you see either the splash screen and/or you are able to enter ALT mode (watch the bottom of the screen), then CHDK is running. OK!
- If you are sure CHDK is running, you can expect chdkptp to be able to connect to the camera.
- Start the cam in play mode if you want to connect.


I start the camera in play mode and I see the CHDK splash screen showing up for a few moments. So I connect camera and computer with the USB cable. I execute chdktp and click in "connect". So, the message "error: no devices available" appears.

I am using one computer Windows 7 Ultimate 32 Bits and other computer Windows 7 professional 32 Bits.

Thanks  :P

« Last Edit: 14 / November / 2012, 09:57:01 by Taka »

*

Offline srsa_4c

  • ******
  • 4451
Re: CHDK PTP interface
« Reply #912 on: 14 / November / 2012, 09:57:01 »
I execute chdktp and click in "connect". So, the message "error: no devices available".
You get this when the libusb driver is not installed for your camera. You need to install it for every camera(model) you'd like to use on the PC.
The install procedure on XP is like this, assuming you are using the unpacked "libusb-win32-bin-1.2.6.0.zip" from the sourceforge site:
- start libusb-win32-bin-1.2.6.0\bin\inf-wizard.exe
- do as it says (before clicking "Next" make sure that your device is connected to the system)
"connected" means the camera is connected on USB and is switched on in play mode. Close any windows that pop up (wizard or whatever).
- click "next"
- select the camera from the list, click "next"
- you can rename your "device" in the "Device Name" field, then click "next"
- save the config (and the customized driver files) in a separate directory (create one if needed)
- click "install now"
- after you get the confirmation message, switch off then switch on the camera
- the usual Windows wizard will no longer appear
- start chdkptp and connect

On Win7, you will get the usual UAC screen a few times, I guess.

*

Offline Taka

  • *
  • 12
Re: CHDK PTP interface
« Reply #913 on: 14 / November / 2012, 10:10:36 »
I already did it :( but didn't work


*

Offline srsa_4c

  • ******
  • 4451
Re: CHDK PTP interface
« Reply #914 on: 14 / November / 2012, 10:16:01 »
I already did it :( but didn't work
Can you find a "libusb-win32 device" in the device manager when the camera is connected? Is it your SX130IS?
Don't know what else could cause problems. Some kind of a "smart" antivirus or personal firewall? Do you have the necessary user rights to install a device driver on the PC?
« Last Edit: 14 / November / 2012, 10:17:39 by srsa_4c »

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: CHDK PTP interface
« Reply #915 on: 14 / November / 2012, 10:59:12 »
@Taka

Some questions:
Did you uninstalled (or deactivated) all other camera related USB driver functions (e.g. Zoombrowser installation)?
Have you installed the libusb driver for your SX130 successfully (see device manager)?
Did you installed a recent CHDK version for your camera?
Have you started the camera in play mode?
Have you turn off the USB remote control option in the CHDK menu?

Can you answer all questions with yes then the PTP connection should be run.

msl
CHDK-DE:  CHDK-DE links

*

Offline Taka

  • *
  • 12
Re: CHDK PTP interface
« Reply #916 on: 16 / November / 2012, 09:00:20 »
It worked!! \o/

I was using USB remote control option enabled  ::)

Thanks srsa_4c and msl!  :)

Re: CHDK PTP interface
« Reply #917 on: 18 / December / 2012, 12:33:33 »
Hello, i'm add CHDK Liveview 2.1 to CHDKPTPRemote for dotNET dev.

forked from mweerden/CHDKPTPRemote:   https://github.com/chakphanu/CHDKPTPRemote
« Last Edit: 18 / December / 2012, 12:48:28 by chakphanu »


*

Offline reyalp

  • ******
  • 14079
Re: CHDK PTP interface
« Reply #918 on: 25 / December / 2012, 20:00:11 »
@reyalp
Somehow ptp.Nparam doesn't get updated after ptp_transaction().
In fact, the ptpcam based ptp.c code did not fill in this value (see ptp.c ptp_usb_getresp)

According to Universal Serial Bus Still Image Capture Device Definition, 7.1.4 Response Block Payload Structure
Quote
Parameters are always 4 bytes in length. The number of parameters can be determined
from the Container length. (Length – 12)/4
I've added this code in chdkptp changeset 312. If anything relied on Nparam continuing to hold the number of input params after a transaction, it will be broken, but I didn't see anything like that from a quick inspection.
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4451
Re: CHDK PTP interface
« Reply #919 on: 29 / December / 2012, 13:26:29 »
@reyalp
Somehow ptp.Nparam doesn't get updated after ptp_transaction().
In fact, the ptpcam based ptp.c code did not fill in this value (see ptp.c ptp_usb_getresp)

According to Universal Serial Bus Still Image Capture Device Definition, 7.1.4 Response Block Payload Structure
Quote
Parameters are always 4 bytes in length. The number of parameters can be determined
from the Container length. (Length – 12)/4
I've added this code in chdkptp changeset 312. If anything relied on Nparam continuing to hold the number of input params after a transaction, it will be broken, but I didn't see anything like that from a quick inspection.
Thanks for that, I wanted to use Nparam for an additional check, not sure whether it will still be needed when the protocol becomes final.

I'm considering the simplification of filewrite_main_hook()'s arguments. If the FileWriteTask data block is mapped to a camera-specific structure, only a pointer would be needed as a single argument. It would also make the assembly (glue) part simpler and the code less ugly.

 

Related Topics