chdkptp - alternative ptp client - page 35 - General Discussion and Assistance - CHDK Forum

chdkptp - alternative ptp client

  • 1097 Replies
  • 388501 Views
Re: alternative ptp client
« Reply #340 on: 16 / May / 2013, 23:56:52 »
Advertisements
Waterwingz also reported something like this. My strong suspicion is that there is something automatically accessing the camera and changing it's state when you connect it (for example, something that tries to automount the camera or transfer photos). This is not specific to 64 bit, but might be be related to newer kernels or distros. I have seen similar effects on windows when using the "filter" libusb driver rather than the "inf" driver.
While I'm not saying you are wrong,  but I've been reliably downloading scripts and CHDK updates to my various cameras using chdkptp with no issues since I reported that.  Seems like that says I am gettting "control" of the USB port?

And I can connect with liveview and watch as I navigate CHDK menus with the cam's buttons ( that's where I got the screenshots I recently posted in another thread ).

But if I click the "rec" button its all over.  I basically need to pull the battery to get the camera back.

Sorry .. that just does not seem like a phantom photo application in the background (on my very stripped linux box) somehow grabbing the USB port / camera / camera interface.

Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3332
    • Photos
Re: alternative ptp client
« Reply #341 on: 17 / May / 2013, 00:01:42 »
Waterwingz also reported something like this. My strong suspicion is that there is something automatically accessing the camera and changing it's state when you connect it (for example, something that tries to automount the camera or transfer photos). This is not specific to 64 bit, but might be be related to newer kernels or distros. I have seen similar effects on windows when using the "filter" libusb driver rather than the "inf" driver.
While I'm not saying you are wrong,  but I've been reliably downloading scripts and CHDK updates to my various cameras using chdkptp with no issues since I reported that.  Seems like that says I am gettting "control" of the USB port?

And I can connect with liveview and watch as I navigate CHDK menus with the cam's buttons ( that's where I got the screenshots I recently posted in another thread ).

But if I click the "rec" button its all over.  I basically need to pull the battery to get the camera back.

Sorry .. that just does not seem like a phantom photo application in the background (on my very stripped linux box) somehow grabbing the USB port / camera / camera interface.

Do you get this on all cameras or just the memory limited A1200?
The PTP code grabs a lot of memory when in use so that could be a problem on the A1200.

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 reyalp

  • ******
  • 13391
Re: alternative ptp client
« Reply #342 on: 17 / May / 2013, 00:08:43 »
While I'm not saying you are wrong,  but I've been reliably downloading scripts and CHDK updates to my various cameras using chdkptp with no issues since I reported that.  Seems like that says I am gettting "control" of the USB port?

I'm not saying you don't have "control" of the USB port now. I'm saying that something changed the state of the camera before you got control. But if you have a better theory, feel free to post it.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 13391
Re: alternative ptp client
« Reply #343 on: 17 / May / 2013, 00:12:44 »
Do you get this on all cameras or just the memory limited A1200?
It started happening when he upgraded his linux distro, and doesn't happen under windows.
Don't forget what the H stands for.


Re: alternative ptp client
« Reply #344 on: 17 / May / 2013, 00:18:58 »
I'm not saying you don't have "control" of the USB port now. I'm saying that something changed the state of the camera before you got control.
So something slipped in and changed the state of the camera's PTP state so that everything but going to "rec" mode works?  If I go do a ps -A and kill everything but core stuff ( that will be fun to figure out ) should I be able to get past that?  Is it a user level app or something that's hooked at the kernel level?

Quote
But if you have a better theory, feel free to post it.
Touchy.  Hey - I'm just trying to compile the facts I can.

Ported :   A1200    SD940   G10    Powershot N    G16

Re: alternative ptp client
« Reply #345 on: 17 / May / 2013, 00:23:13 »
Do you get this on all cameras or just the memory limited A1200?
The PTP code grabs a lot of memory when in use so that could be a problem on the A1200.
It on my G10 - which has tons of free memory. 

I'm not even sure the palette stuff and any other PTP hooks are done for the other three cameras.

It started happening when he upgraded his linux distro, and doesn't happen under windows.
Well,  more correctly,  I had not used anything but file download for a long time and during that interval I did an update to Fedora18.  I had not done an svn update in a long while - it wasn't broken and I thus had no need to fix it - or even think about it.   The upgrade required updating the IUP code to a current release and I did an svn up at the same time.  Its not clear that things worked immediately prior to the upgrade and stopped working immediately after the upgrade.
« Last Edit: 17 / May / 2013, 00:34:50 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 13391
Re: alternative ptp client
« Reply #346 on: 17 / May / 2013, 00:39:46 »
So something slipped in and changed the state of the camera's PTP state so that everything but going to "rec" mode works?  If I go do a ps -A and kill everything but core stuff ( that will be fun to figure out ) should I be able to get past that?  Is it a user level app or something that's hooked at the kernel level?
As I tried to explain several times, most modern linuxes have stuff that runs as soon as you plug something into USB. This includes kernel and userspace components. The userspace components are likely to be invoked only when the actual plugin event happens, so randomly killing daemons would not necessarily prevent it.

This is something that could be investigated and proven or disproven by someone who has one of the affected systems.
Quote
Its not clear that things worked immediately prior to the upgrade and stopped working immediately after the upgrade.
I am 100% (ok, 99.999%) certain this has nothing to do with IUP. This can easily be verified by building without IUP support. (IUP_SUPPORT=0 in config.mk)

Given that it still works on windows and still works on my linux systems, this strongly suggests something specific to your particular linux configuration.

If this is triggered by a change in CHDK or chdkptp, then reverting to an old version (from about the time we implemented live view for the G10) should be a good way to check that. But I see no mechanism for changes in either to cause the observed behavior, while I have seen similar behavior triggered by meddling OSes.
edit: live view was merged in trunk 1921, the corresponding chdkptp revision is 253
« Last Edit: 17 / May / 2013, 00:49:25 by reyalp »
Don't forget what the H stands for.

Re: alternative ptp client
« Reply #347 on: 17 / May / 2013, 00:59:12 »
As I tried to explain several times, most modern linuxes have stuff that runs as soon as you plug something into USB. This includes kernel and userspace components. The userspace components are likely to be invoked only when the actual plugin event happens, so randomly killing daemons would not necessarily prevent it.
I got it the first time.  I was  just struggling with something that runs and only stops the camera from accepting a command to go from playback to shooting mode.   

So I just went back and tried some more things.  I can look at files (second tab) and download them.  I can use live view to watch what happens when I press camera buttons.  But it turns out that I can't use any of the GUI camera buttons on the chdkptp app to do anything (like Left or Right to scroll through saved images in playback while not in <ALT> mode).

And then all of a sudden,  the CHDKPTP camera buttons started working.  Go to shoot mode ... shoot .. go to playback mode ... scroll through pictures ..  Wasn't doing anything that I can recall to make that start happening - just clicking buttons while I wrote the description above.

Closed chdkptp,  restarted the camera, run chdkptp again.  No button response now.

I get it that is something to do with my Fedora18 64 bit install.   But that does not help me much.  So I'll just leave it for now - its not something I personally need.


« Last Edit: 17 / May / 2013, 01:05:03 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline reyalp

  • ******
  • 13391
Re: alternative ptp client
« Reply #348 on: 17 / May / 2013, 01:10:51 »
Quote
I get it that is something to do with my Fedora18 64 bit install.   But that does not help me much.  So I'll just leave it from now - its not something I personally need.
Since this seems to affect other users, I'd like to understand it and find workarounds, but that's pretty hard without an affected system.

FWIW, I found that my D10, listing PTP objects using normal PTP protocol will make the screen go black. This can be done in with ptpcam using
Code: [Select]
ptpcam -L
or in gphoto with
Code: [Select]
$ gphoto2 --shell
> ls
store_00010001/
> ls store_00010001
DCIM/               PS.FI2
After doing this, chdkptp can connect, but the screen stays black and rec doesn't work.

edit:
the same happens if I access the "camera" that is automounted in the file manager.

Quote
  But it turns out that I can't use any of the GUI camera buttons on the chdkptp app to do anything (like Left or Right to scroll through saved images in playback while not in <ALT> mode).
This is normal. To unlock the keyboard, you have to either switch to rec mode (if you could ;)) or post the magic levent
Code: [Select]
.post_levent_to_ui(4484)
« Last Edit: 17 / May / 2013, 01:15:40 by reyalp »
Don't forget what the H stands for.

Re: alternative ptp client
« Reply #349 on: 17 / May / 2013, 08:04:47 »
Hi reyalp & waterwingz

I've red through your last posts and I think I have the effected machine as waterwingz. I'll also test on 32 bit as I think this computer wasn't effected because I was remotely accessing it... I too can download or upload files if I'm not pressing rec button. Yesterday I found out or got an idea that indeed automount could have something to do with usb blocking stuff. I use pcmanfm and if it's not opened automount for usb devices won't work. I'll take a closer look about automounting and kernel logs later today or tomorrow. Have some other work to do first.

 

Related Topics