LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to find the ID of camera connect through USBHub (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-find-the-id-of-camera-connect-through-usbhub-593859/)

nobtiba 10-23-2007 02:35 AM

How to find the ID of camera connect through USBHub
 
Dear all,

I have about 20 cameras Aiptek Megacam (or called Mini Pencam 1.3) which are connected to PC through usb Hub. I can use gphoto2 command to find the address of the usb ports used by these cameras. But the problem is: each time I connect or disconnect the camera the address will change and the camera will be assigned a new address (seem to be random). So I hardly know which adress belong to which camera.

My question is " how to find a fix parameter belong to the camera that can help me to identify each camera ? ". I tried to look for something like camera serial number but not found yet.

Pls, help !
Thank you

Ps: I use Ubuntu.

tredegar 10-23-2007 03:11 AM

You can do this with some udev rules. See here: http://www.reactivated.net/writing_udev_rules.html

nobtiba 10-23-2007 04:08 AM

There is a paragraph in the link you gave (http://www.reactivated.net/writing_udev_rules.html), :

"Not all cameras work in this way: some of them use a non-storage protocol such as cameras supported by gphoto2. In the gphoto case, you do not want to be writing rules for your device, as is it controlled purely through userspace (rather than a specific kernel driver). "

Unfortunately, my cameras are these types. So I guess this method doesn't help, right !?! :(

Ps: I tried lsusb command and find out that the names of cameras are exactly listed the same, so there is no way to use the command of udev:
# udevinfo -a -p $(udevinfo -q path -n /dev/sdb1)

tredegar 10-23-2007 04:30 AM

Many cameras have a "setup menu" (mine all do), where you can change the mode the USB interfaces uses. I set mine to be "Storage". Perhaps yours can do the same? Otherwise, I do not think I can help.

nobtiba 10-23-2007 04:49 AM

I am afraid mine doesn't have this mode. Anyway, many thanks for your help!
Any idea please !?

nobtiba 10-23-2007 09:13 PM

Looking for help ! :|

davimint 10-23-2007 09:35 PM

nobtiba,
Don't know if this will produce any help full info but "lshal" will dump hals
"Global Device List".

nobtiba 10-28-2007 11:17 PM

Yes thank you, the information is really useful and I do hope that HAL could help me to get the cameraID. But from here http://www.linuxfromscratch.org/blfs...neral/hal.html
I see that installation is really difficult and complex. Do you have any experience on this or any easy guide for me cause am a beginner.

Thanks alot !

nobtiba 10-31-2007 07:59 PM

hi davimint,
I have HAL installed. Can you tell me more detail which command could help me get the camera ID ?
I tried some commands with some parameters but not get what i want
(tried hal-get-property, --udi not know how to use this parameter )
Thank you for any suggestion!

davimint 11-02-2007 07:02 AM

notiba,
I'm not going to be much help, I was just passing on some information that I had
read once with the hopes it may help. Google around I found tons of info on this but I
just don't have any equipment to sort it out for you. Maybe someone else can jump in
with some ideas.

nobtiba 11-03-2007 11:25 PM

Hi Davimint,

Thanks for your kind ! Yes, i also google around with HAL and practice them. However since am not familiar with Linux, especially using HAL, someone knows it more than me could give value suggestion.
I also trying to update a driver of camera for Linux hoping to solve my problem.

Still on the way finding the solution.
Any help is highly appreciate!

Thank you !


All times are GMT -5. The time now is 12:33 AM.