The View from the Moon

20041223 Thursday December 23, 2004

Whoohoo! gtkam & USB on Solaris 10
With a little help from Frits, I got my Canon Powershot S45 digital camera connected via USB to my Toshiba Tecra M1, all running Solaris 10, build 74. The most important steps are:
# add_drv -i '"device_id"' ugen
See the ugen(7D) man page for more details; there is also some information and hints in /usr/sfw/share/doc/libusb/libusb.txt. The key trick I discovered is that it is critical to get the device ID correct. To figure that out, look in your prtconf -v output. You need to find the compatible property. In my case, for my camera, this was as follows (see also the full screen shot).
name='compatible' type=string items=9
  value='usb4a9,306c.1' + 'usb4a9,306c' + 'usb4a9,classff.ff.ff' +
  'usb4a9.classff.ff' + 'usb4a9.classff' + 'usb,classff.ff.ff' +
  'usb,classff.ff' + 'usb,classff' + 'usb,device'
For whatever reason, you need to get the binding to the most specific device (i.e., the first in the list). So for me:
# add_drv -m '* 0666 root sys' -i '"usb4a9,306c.1"' ugen
Also make sure to get the quoting exactly right, as I specify above. Now, unplug your camera, and plug it back in. Check with prtconf -D and make sure ugen has bound to the device. If not, you might need to just reboot. Anyway, double check the device permissions, and correct them to taste. If you've followed along they should be 0666 at this point. The device appears as /dev/usb/id/0/... (0 is the USB 'interface' number). Just chmod 666 the device nodes if they're not right.

At this point (I think) you should be able to run gphoto2. In build 74 and later, this appears in /usr/demo/jds/bin, since it's not officially supported by Sun.

$ /usr/demo/jds/bin/gphoto2 --auto-detect
Model                          Port          
----------------------------------------------------------
Canon PowerShot S45 (normal mode) usb:
If that doesn't work, try the --debug flag. Next up, try /usr/demo/jds/bin/gtkam, and see if it works. Good luck! Frits also mentioned that the USB folks are working on ways of making this process a little less arduous in the future. See also the new USB on Solaris FAQ.

P.S.: the pics are from my friends Dave and Amy's recent wedding.

P.P.S: Clicking on the thumbnail will also get you a nice shot of my desktop setup on S10_74.
(2004-12-23 01:45:06.0) Permalink Comments [5]
Trackback: http://blogs.sun.com/dp/entry/gtkam_usb_on_solaris_10

 

Trackback URL: http://blogs.sun.com/dp/entry/gtkam_usb_on_solaris_10
Comments:

Since Sun got it work, when can we see it as part of Solaris DVD so we don't have to type all these cryptic commands?

Posted by e1_ang on January 10, 2005 at 06:43 AM PST #

I'm not sure I understand your question. All of the software I'm using is on the Solaris 10 install (make sure you have the latest!). You don't need to add anything. However, you do need to do some configuration to get it to work properly. I agree that this is a pain, but for now, it's the best we can do. As I said in my post, we do hope to improve this over time.

Posted by Dan Price on January 12, 2005 at 05:22 PM PST #

Hi Dan. Your tip on how to get an usb camera connected to Solaris helped me getting my EOS 20D recognized when connecting it to my laptop. Jul 5 08:50:00 unknown usba: [ID 349649 kern.info] Canon Inc. Digital Camera Jul 5 08:50:00 unknown genunix: [ID 936769 kern.info] ugen0 is /pci@0,0/pci1028,13f@1d,7/device@3 Jul 5 08:50:00 unknown genunix: [ID 408114 kern.info] /pci@0,0/pci1028,13f@1d,7/device@3 (ugen0) online I've downloaded the libgphoto2 stuff from blastwave with all deps, but it seems as if they've compiled libgphoto2 without usb support. # ./gphoto2 --auto-detect --debug 0.000124 main(2): ALWAYS INCLUDE THE FOLLOWING LINES WHEN SENDING DEBUG MESSAGES TO THE MAILING LIST: 0.000612 main(2): gphoto2 2.1.5 0.001146 main(2): gphoto2 has been compiled with the following options: 0.001626 main(2): + cc (C compiler used) 0.002106 main(2): + popt (for handling command-line parameters) 0.002723 main(2): + exif (for displaying EXIF information) 0.003203 main(2): + no cdk (for accessing configuration options) 0.003682 main(2): + aa (for displaying live previews) 0.004162 main(2): + jpeg (for displaying live previews in JPEG format) 0.004642 main(2): + readline (for easy navigation in the shell) 0.005139 main(2): libgphoto2 2.1.5 0.005684 main(2): libgphoto2 has been compiled with the following options: 0.006163 main(2): + cc (C compiler used) 0.006642 main(2): + EXIF (for special handling of EXIF files) 0.007121 main(2): + no ltdl (working around buggy libltdl, eh? :-) 0.007600 main(2): + no /proc/meminfo (adapts cache size to memory available) 0.008087 main(2): libgphoto2_port 0.5.1 0.008628 main(2): libgphoto2_port has been compiled with the following options: 0.009109 main(2): + cc (C compiler used) 0.009588 main(2): + no USB (for USB cameras) Where did you get hold of your version? Do you know if there are any plans for getting up to libgphoto2-2.1.6? I know my camera isn't working properly with v. 2.1.5 (using it with 2.1.6 in Linux). Best regards, Kolbjorn Regards. Kolbjorn

Posted by Kolbjorn Bekkelund on July 05, 2005 at 12:02 AM PDT #

Hey Dan! I'd been chewing away at getting my Canon Ixus v2 recognised by my Ultra 5 running Solaris 10, and getting nowhere despite having read all the relevant man pages, ugen, add_drv etc etc... I googled 'gtkam on solaris 10', found your page, and a few minute later, was able to use gtkam (in usr/sfw/bin) to grab the images from my camera. *BIG THANKS* -Rob

Posted by Robert Davies on January 12, 2006 at 04:30 PM PST #

In latest Solaris Express or Solaris 10 Update 2 and above releases, this manual ugen binding is no longer necessary. The default usb_mid driver will export ugen interfaces for the devices and libusb should just work. Please always refer to USB FAQ page at: http://www.sun.com/io_technologies/usb/USB-Faq.html It will be kept updated as new features get in Solaris.

Posted by Sophia Li on May 13, 2007 at 06:43 PM PDT #

Post a Comment:

Name:
E-Mail:
URL:

Your Comment:

HTML Syntax: NOT allowed
Dan Price's Weblog
[about me]