Saturday, June 10, 2006

Kamera digital dan FreeBSD

Spesifikasi kamera digital: Canon IXY 30a
OS: FreeBSD-7.0-CURRENT 5 Juni 2006.

Aplikasi menggunakan gphoto2 yang dapat di install melalui ports:
/usr/ports/graphics/gphoto2

Konfigurasi kernel yng penting diikutsertakan:
device uhci # UHCI PCI->USB interface
device ohci # OHCI PCI->USB interface
device ehci # EHCI PCI->USB interface (USB 2.0)
device usb # USB Bus (required)
device ugen # Generic


Selanjutnya me-reconfigurasi devfs seperti yng dideskripsikan di:
http://gphoto.sourceforge.net/doc/manual/permissions-usb.html#usb-on-FreeBSD
(kalo ngga mau repot dengan urusan devfs ini pakai user root saja untuk akses ke USB device)

Kalau sudah selesai ya tinggal dicobain aja toh.
Colokkan usb kabel dari kamera ke usb port komputer, nyalakan kamera, jreng ! liat dmesg.
Contohnya:

uhub1: on uhub0
uhub1: 2 ports with 2 removable, self powered
ugen0: on uhub1

Cek ports:
freebsd# gphoto2 --list-ports
Devices found: 2
Path Description
--------------------------------------------------------------
serial:/dev/cuad0 Serial Port 0
usb: Universal Serial Bus



Cek tipe kamera menggunakan --auto-detect:
freebsd# gphoto2 --auto-detect
Model Port
----------------------------------------------------------
Canon Digital IXUS IIs usb:


Wah rupanya Canon IXY 30a saya dideteksi sbg Canon IXUS IIs
Mari kita liat summary:

freebsd# gphoto2 --summary
Detected a 'Canon:PowerShot SD110 Digital ELPH'.
Camera summary:

Camera identification:
Model: Canon:PowerShot SD110 Digital ELPH
Owner:

Power status: on battery (power OK)

Flash disk information:
Drive D:
125'344 bytes total
3'216 bytes available

Time: 2006-06-10 01:22:29 (host time +0 seconds)

Mari kita liat isi kamera digital saya:
freebsd# gphoto2 --list-files | more
Detected a 'Canon:PowerShot SD110 Digital ELPH'.
There are no files in folder '/'.
There are no files in folder '/DCIM'.
There are 80 files in folder '/DCIM/103CANON':
#1 IMG_0304.JPG rd 252 KB image/jpeg
#2 IMG_0305.JPG rd 239 KB image/jpeg
#3 IMG_0306.JPG rd 214 KB image/jpeg
#4 IMG_0308.JPG rd 141 KB image/jpeg
#5 IMG_0310.JPG rd 150 KB image/jpeg
#6 IMG_0311.JPG rd 192 KB image/jpeg
#7 IMG_0312.JPG rd 198 KB image/jpeg
#8 IMG_0313.JPG rd 201 KB image/jpeg
#9 IMG_0314.JPG rd 216 KB image/jpeg
#10 IMG_0315.JPG rd 189 KB image/jpeg
#11 IMG_0316.JPG rd 125 KB image/jpeg

dan seterusnya.

Untuk mendownload files tersebut diatas dapat digunakan perintah:

#gphoto2 --get-file 1-10

artinya mengambil file nomor 1 sampai 10 seperti yang dideskripkan oleh --list-files

Kalau ingin mengambil semua files ya pakai perintah:

#gphoto2 -get-all-files

Lebih lanjut silahkan baca manual gphoto2:
http://gphoto.sourceforge.net/doc/manual/

No comments: