Hi Alesan,
I tried your new version and this is the log for a clean attempt
root@raspberrypi_Zero-01:~# tail -f multilapse.log
Reloading config file!
Making sure camera is OFF
Waiting 5s...
Turning camera ON
Waiting 5s for boot...
Connecting
open_camera_dev_usb:usb_ptp_device_reset(): Device or resource busy
usb_ptp_get_device_status(): Device or resource busy
open_camera_dev_usb: ptp_opensession failed 0x2ff
connected: Canon IXUS 160, max packet size 512
Unpressing power button
Going into rec mode
ERROR: switch failed
Setting P mode
Setting zoom
Disabling display
sh: 1: cannot create /sys/class/leds/led1/brightness: Directory nonexistent
Temperature: sensor = 30 optics = 26
SSTT,20171118-154655,30,26
Checking brightness level
*** *** *** Pre-shooting error
Turning camera OFF
Waiting 5s...
The camera crashed - needed battery removing momentarily to come back.
The contents of multilapse was edited as follows - trying to cater for the Raspberry Pi Zero's lack of two LEDs
#!/bin/sh
echo none >/sys/class/leds/led0/trigger
echo 0 >/sys/class/leds/led0/brightness
#echo none >/sys/class/leds/led1/trigger
#echo 0 >/sys/class/leds/led1/brightness
#/usr/bin/lan951x-led-ctl --spd=0 --lnk=0
while [ true ]
do
/root/chdkptp/chdkptp.sh -e'exec dofile("/root/multilapse-CHDK/multilapse.$
sleep 10
done
I hope this is useful. I see errors related to the USB so I've googled up some more similar issues and though the following info might help troubleshoot: Here's the result of an lsusb command
root@raspberrypi_Zero-01:~/multilapse-CHDK# lsusb
Bus 001 Device 005: ID 04a9:32aa Canon, Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
I see that Device 001 is identified as a root hub - the Pi Zero's single, micro usb device is described as an OTG "on the go" adaptor
Here's a sample of the output from a dmesg command
[ 1543.744391] Indeed it is in host mode hprt0 = 00001101
[ 1543.975390] usb 1-1: New USB device found, idVendor=04a9, idProduct=32aa
[ 1543.975410] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1543.975433] usb 1-1: Product: Canon Digital Camera
[ 1543.975440] usb 1-1: Manufacturer: Canon Inc.
[ 1543.975447] usb 1-1: SerialNumber: E2BDC44C0F874789ADD922AB51FC3FFA
[ 1587.876785] usb 1-1: usbfs: interface 0 claimed by usbfs while 'chdkptp' sets co nfig #1
[ 1587.876974] usb 1-1: usbfs: process 1051 (chdkptp) did not claim interface 0 bef ore use
[ 1587.877067] usb 1-1: usbfs: process 1051 (chdkptp) did not claim interface 0 bef ore use
[ 1587.877312] usb 1-1: usbfs: process 1051 (chdkptp) did not claim interface 0 bef ore use
[ 1587.877671] Indeed it is in host mode hprt0 = 00001101
[ 1588.093968] usb 1-1: reset high-speed USB device number 4 using dwc_otg
[ 1588.094342] Indeed it is in host mode hprt0 = 00001101
[ 1599.146906] Indeed it is in host mode hprt0 = 00001101
[ 1599.343977] usb 1-1: reset high-speed USB device number 4 using dwc_otg
[ 1599.344352] Indeed it is in host mode hprt0 = 00001101
[ 1600.344121] usb 1-1: USB disconnect, device number 4
[ 3028.556470] Indeed it is in host mode hprt0 = 00021501
[ 3028.756382] usb 1-1: new high-speed USB device number 5 using dwc_otg
[ 3028.756820] Indeed it is in host mode hprt0 = 00001101
[ 3028.987963] usb 1-1: New USB device found, idVendor=04a9, idProduct=32aa
[ 3028.987981] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3028.987988] usb 1-1: Product: Canon Digital Camera
[ 3028.987995] usb 1-1: Manufacturer: Canon Inc.
[ 3028.988001] usb 1-1: SerialNumber: E2BDC44C0F874789ADD922AB51FC3FFA
Now I remember and issue I had with my main RaspBPi machine.. each time I plugged in the camera to the USB, it was identified and associated with gphoto2 an inbuilt program. Once I uninstalled gphoto, the problem disappeared.
I just looked for gphoto on the Zero and it's not installed but perhaps theres another product doing a similar thing?