Nochmal PTP Problem, diesmal mit A480

CHDK-Skripte, CHDK-Entwicklung, PC-Zusatzprogramme, Informationen für Tüftler

Nochmal PTP Problem, diesmal mit A480

Beitragvon dorumn » 01.06.2011, 18:40

Hallo,

ich muss euch nochmal um Hilfe bitten. Vor kurzem habe ich mir leider den USB Anschluss meiner A620 zerstört und damit ist die Kamera für mich nutzlos geworden, da ich sie ja ausschließlich remote betrieben hab. Also habe ich mir schnell eine neue gekauft, ne A480, relativ billig und für meine Zwecke auch ausreichend. Jetzt versuchte ich sie ebenfalls über das PTP Interface anzusprechen aber das funktioniert leider nicht so reibungslos.
Ich nutze nach wie vor CHDKPTP und konnte mich mittels
chdkptp.exe -c -i
auch erfolgreich verbinden. Dinge wie get_buildinfo() laufen ebenfalls, Output:
2:return:table:{platform="a480",build_date="May 31 2011",build_number="1.1.0",build_time="21:21:09",version="CHDK-DE",platsub="100b",build_revision="676",platformid=12735,os="dryos",}

Allerdings läuft die Kamerasteuerung nicht mehr, mit set_record(1) konnte ich die A620 in den Aufnahmemodus versetzen, da passiert jetzt einfach gar nichts mehr. Bei set_record(0) schaltet die Kamera sofort ab. Dementsprechend kann ich momentan auch keine Bilder machen ect.
Außerdem bekomme ich die Bilder nicht mehr angezeigt. Ein einfaches "ls" geht aber "ls DCIM/102CANON" führt zu folgendem:
unexpected return code 0x2ff (den Ordner gibt es, "ls DCIM" liefert den output "102CANON/"). Merkwürdigerweise liegt in 102CANON z.B. das Bild "IMG_0003.JPG", sollte das nicht im Ordner 100CANON gespeichert werden? Den Ordner hat die Kamera angelegt und das Bild ist ein manuell aufgenommenes Testbild.

Ich nutze die aktuelle Version von CHDK und habe sie mittels cardtricks auf die SD Karte kopiert, alles wie bei der A620. Hat vielleicht jemand nen Tipp, warum die Kamerasteuerung jetzt nicht läuft, alles andere aber schon?
Vielen Dank.
dorumn
CHDK-Einsteiger
CHDK-Einsteiger
 
Beiträge: 12
Registriert: 11.05.2011, 18:46
Kamera(s): Canon Powershot A620
Canon Powershot A480

Re: Nochmal PTP Problem, diesmal mit A480

Beitragvon reyalp » 01.06.2011, 21:15

try switch_mode_usb(1), set_record does not work on new cameras.
reyalp
CHDK-Einsteiger
CHDK-Einsteiger
 
Beiträge: 29
Registriert: 25.12.2010, 01:18
Kamera(s): a540 d10 sx160 elph130 g7x sx710 elph180 sx730

Re: Nochmal PTP Problem, diesmal mit A480

Beitragvon dorumn » 02.06.2011, 13:24

Thanks, switch_mode_usb(1) works.

But I still have the problem with the ls command. If I type "ls DCIM/102CANON" the camera shuts down with the error I've written above. But "ls DCIM" gives me the output "102CANON". I also can download an image, for example "d A/DCIM/102CANON/IMG_0005.JPG testimage.JPG", no problem. What's wrong with the ls command? Is there something I can check out, for example reset the camera so that it starts counting with "100CANON" again?

And I have another question: Sometimes if an action couldn't be completed correctly I get the following error message when I want to type the next command:
Error: A script is already running.
But I don't know which one is it. Do you know a command to kill all running scripts? At the moment my only solution is it to restart the camera manually.
dorumn
CHDK-Einsteiger
CHDK-Einsteiger
 
Beiträge: 12
Registriert: 11.05.2011, 18:46
Kamera(s): Canon Powershot A620
Canon Powershot A480

Re: Nochmal PTP Problem, diesmal mit A480

Beitragvon reyalp » 02.06.2011, 18:14

dorumn hat geschrieben:Thanks, switch_mode_usb(1) works.

But I still have the problem with the ls command. If I type "ls DCIM/102CANON" the camera shuts down with the error I've written above. But "ls DCIM" gives me the output "102CANON". I also can download an image, for example "d A/DCIM/102CANON/IMG_0005.JPG testimage.JPG", no problem. What's wrong with the ls command? Is there something I can check out, for example reset the camera so that it starts counting with "100CANON" again?

If there is a lot of images, the camera can run out of memory listing the directory. In the international version, you can use =return get_meminfo() to get information about free memory. I'm not sure if this has been ported to chdkde yet.

If it is running out, reducing the batch size used by chdku.listdir might help, but only if there is enough memory for the full listing. Otherwise, you'd need to download and delete before there are too many files.

If it isn't running out of memory, I'm not sure what would cause that. You can try getting a ROMLOG http://chdk.wikia.com/wiki/Debugging#Ca ... 8romlog.29
And I have another question: Sometimes if an action couldn't be completed correctly I get the following error message when I want to type the next command:
Error: A script is already running.
But I don't know which one is it. Do you know a command to kill all running scripts? At the moment my only solution is it to restart the camera manually.

Only one script can run at a time, so it's whatever you ran previously. The number in the chdkptp prompt is the script id of the last script that started successfully.

Unfortunately, there is currently no way to cleanly kill a running script over PTP. You may be able to interrupt it with the shutter button.

You can force a script to start while one is already running (using chdku.exec with the clobber option for example), but this will corrupt the heap on the camera so it will crash eventually.
reyalp
CHDK-Einsteiger
CHDK-Einsteiger
 
Beiträge: 29
Registriert: 25.12.2010, 01:18
Kamera(s): a540 d10 sx160 elph130 g7x sx710 elph180 sx730

Re: Nochmal PTP Problem, diesmal mit A480

Beitragvon msl » 02.06.2011, 20:18

reyalp hat geschrieben:get_meminfo() to get information about free memory. I'm not sure if this has been ported to chdkde yet.

At the moment not, but it is planned for the future.


Die Funktion get_meminfo() ist gegenwärtig nur mit CHDK verfügbar. Es ist geplant, diese Funktion auch in CHDK-DE einzubauen.

Gruß msl
Benutzeravatar
msl
Super-Mod
Super-Mod
 
Beiträge: 4567
Bilder: 271
Registriert: 22.02.2008, 11:47
Wohnort: Leipzig
Kamera(s): A720 1.00c
SX220 1.01a

Re: Nochmal PTP Problem, diesmal mit A480

Beitragvon reyalp » 02.06.2011, 20:43

msl hat geschrieben:At the moment not, but it is planned for the future.

Using the CAM_FIRMWARE_MEMINFO 1 (native dryos/vxworks getmeminfo) avoids using malloc to find amount of free memory in PTP task for every ptp call. This might be a little safer (if task switch can happen in the middle of malloc loop, I'm not sure).
reyalp
CHDK-Einsteiger
CHDK-Einsteiger
 
Beiträge: 29
Registriert: 25.12.2010, 01:18
Kamera(s): a540 d10 sx160 elph130 g7x sx710 elph180 sx730


Zurück zu Code-Ecke

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 16 Gäste

cron