CHDKPTP File Downloading

  • 47 Replies
  • 1666 Views
*

Offline srsa_4c

  • ******
  • 3495
Re: CHDKPTP File Downloading
« Reply #40 on: 12 / January / 2018, 15:00:49 »
Advertisements
I should probably call an exorcist.
Uhm, no*. You just found a bug. In case you find more in the future, please report them - the best place to do that is the camera's porting thread.

I fixed LED behaviour on the a3400 - I happen to have one, but was not aware of the non-working set_led().
Please install revision 4975 or later, once they become available (in a few hours).
LED 0 = green LED, LED 1 = AF LED.

*edit:
Or maybe you should... set_led() should have been completely non-functional on the a3400...
« Last Edit: 12 / January / 2018, 15:24:19 by srsa_4c »

*

Offline reyalp

  • ******
  • 11031
Re: CHDKPTP File Downloading
« Reply #41 on: 12 / January / 2018, 16:02:29 »
Also I know I can use save_list to save camera id's, but is there a way to persistently map cameras to libusb id's?
If you want to get the same ids in multicam (these are multicam IDs, there is no "libusb id" that I know of), just use the list in connect, e.g. mc:connect({list='mylist.txt'})

If you look at the definition of mc:connect() this is documented (though not very clearly)

*edit:
Or maybe you should... set_led() should have been completely non-functional on the a3400...
Yeah, if the old set_led did something :o
Don't forget what the H stands for.

Re: CHDKPTP File Downloading
« Reply #42 on: 12 / January / 2018, 16:03:24 »
Quote
Or maybe you should... set_led() should have been completely non-functional on the a3400...
Cool I probably just broke the green led's with my ineptitude. I'm super glad thats a bug though and not something wrong with the cameras. I never even thought about the possibility of it being a bug I just assumed I was screwing it up somehow.

So here's a gui question; how would I go about creating a text field in chdkptp? I found this for the console
Code: [Select]
-- console input
inputtext = iup.text{
expand = "HORIZONTAL",
}

I'd like to expand on my shoot naming system, I'll link a picture I posted earlier so you know what I'm talking about.


Under "NAMING" I have the numbers 1-6. If I hit "6" for example it will extract the photos on the cameras to the folder "S6". I'd like to make it so I have a text field instead of numbers, where I could type "muskrat" and have the photos put into a folder called "muskrat". I haven't really played around with iup.text yet so it might be easier than I thought, but something tells me I'm gonna fail in some way or another so I figure I might as well ask now.

Re: CHDKPTP File Downloading
« Reply #43 on: 15 / January / 2018, 12:38:41 »
I updated to r4976 but set_led still isn't doing anything

edit: Nevermind I got it!
« Last Edit: 15 / January / 2018, 12:40:21 by jdstech »


*

Offline reyalp

  • ******
  • 11031
Re: CHDKPTP File Downloading
« Reply #44 on: 15 / January / 2018, 12:54:31 »
So here's a gui question; how would I go about creating a text field in chdkptp? I found this for the console
Code: [Select]
-- console input
inputtext = iup.text{
expand = "HORIZONTAL",
}
Unless I'm missing something, you should be able to just put an iup.text with your other controlls. You can use the .value field elsewhere (e.g. in a button handler) to access the value

IUP documentation is at https://webserver2.tecgraf.puc-rio.br/iup/

Don't forget what the H stands for.

Re: CHDKPTP File Downloading
« Reply #45 on: 15 / January / 2018, 16:32:56 »
Quote
Unless I'm missing something, you should be able to just put an iup.text with your other controlls. You can use the .value field elsewhere (e.g. in a button handler) to access the value
Awesome, got it working.

I'm still working on fixing these cameras that keep giving me I/O errors. I have three of the cameras in question connected to a usb hub (and only 3). I've been trying to update them to the latest version of chdk and if I cut connection to my keyboard and mouse while it's updating I get an imediate I/O error. I could however update the other cameras fairly successfully while disconnecting and reconecting my kb&m. So it appears that when the system tries to update it's usb connections with these specific cameras plugged in it gets hung up somewhere.

I don't know if this relation helps you in any way but I figured it might be significant and I really need to get these cameras working.

*

Offline reyalp

  • ******
  • 11031
Re: CHDKPTP File Downloading
« Reply #46 on: 15 / January / 2018, 17:12:41 »
I'm still working on fixing these cameras that keep giving me I/O errors. I have three of the cameras in question connected to a usb hub (and only 3). I've been trying to update them to the latest version of chdk and if I cut connection to my keyboard and mouse while it's updating I get an imediate I/O error.
This really sounds like something happening at a much lower level than anything chdkptp does. However, it's probably true that chdkptp doesn't handle error conditions robustly. I don't remember if the inherented ptpcam code tries to do anything in  response to STALL http://wiki.osdev.org/Universal_Serial_Bus#STALL

When I have some time I'll look into whether there's additional diagnostics I can put into chdkptp.

A keyboard / mouse might be a low speed / USB1 device. IIRC connecting low speed devices to hubs can affect how they interact with other devices.

Maybe single TT vs multi TT could be relevant https://en-us.knowledgebase.renesas.com/English_Content/SoC%2CASSP/Basic_Information/What_is_the_difference_between_Single-_TT_and_Multi-TT%3F
https://community.cypress.com/docs/DOC-10835

You might try PTP live view with just one camera to reproduce the error. That should produce a fairly continuous stream of data, without messing up your SD card when it fails in the middle.
Don't forget what the H stands for.

Re: CHDKPTP File Downloading
« Reply #47 on: Today at 13:55:05 »
Awesome, everything is working fairly well ATM. I'm still getting some I/O errors but I found a work around. I'm hoping it wasn't this easy the whole time cuz if so I'd feeling REALLY stupid, but after getting I/O errors I can just refresh the camera list (via mc:connect) and keep going.

I still have a few things I'd like to add, and I'll keep refining my system, but chances are we won't be keeping this array for much longer. If any of you would be interested in buying some 3400's let me know. I have around 42 3400's that are working well, and another 6 or so that work fine on their own but cause trouble with multicam. I also have around 16 other cameras that are a mix between 3300's, 2500's, and 4000's. I'm not sure exactly what they're worth so if you're interested throw me an offer. I'm sure I could probably talk my boss into letting me send you guys a couple free ones too since you've been such a huge help.

I'll also attach my modified version of chdkptp in case you guys wanna play around with it. Again I'll keep working on it and trying to make it work better with the rest of chdkptp, probably on my own time. If you have anything you'd like me to prototype in the gui let me know, it's the least I can do to repay you for all your help. I wish I could help out around the forum but I feel a bit out of my league, maybe once I get more aquainted with the system I could be of more assistance.



 

Related Topics