Автор Тема: USB връзка с камера  (Прочетена 3080 пъти)

Rumen_Zapryanov

  • Участници
  • ***
  • Публикации: 5
    • Профил
USB връзка с камера
« -: Sep 21, 2016, 17:39 »
Здравейте,

имам фото апарат, който като го вържа с USB кабел се вижда през lsusb, но не го виждам като Storage или с някоя друга програма като Shotwell Digicam и др. за да мога да виждам картата със снимките.

Ето резултата от LSUSB

Код:
Bus 001 Device 002: ID 0c45:6340 Microdia Camera

Ето резултата от DMESG

Код:
[78729.405075] sd 9:0:0:0: [sdb] No Caching mode page found
[78729.405080] sd 9:0:0:0: [sdb] Assuming drive cache: write through
[78729.442988]  sdb: sdb2
[78729.446699] sd 9:0:0:0: [sdb] Attached SCSI disk
[78730.101931] EXT4-fs (sdb6): mounting ext3 file system using the ext4 subsystem
[78730.195900] EXT4-fs (sdb6): warning: maximal mount count reached, running e2fsck is recommended
[78730.197228] EXT4-fs (sdb6): mounted filesystem with ordered data mode. Opts: (null)
[78742.651650] systemd[1]: snapd.refresh.timer: Adding 3h 57min 53.625951s random time.
[78790.352037] systemd[1]: snapd.refresh.timer: Adding 5h 26min 50.018317s random time.
[78926.123095] usb 2-3: USB disconnect, device number 7

Опитах с драйвера, който официално върви из нета и трябва да се компилира

Код:
git clone http://repo.or.cz/r/microdia.git
cd microdia
make

Но ми даде грешка:

Код:
make -C /lib/modules/4.4.0-36-generic/build SUBDIRS=/home/ucc/microdia modules
make[1]: Entering directory '/usr/src/linux-headers-4.4.0-36-generic'
  CC [M]  /home/ucc/microdia/sn9c20x-v4l2.o
/home/ucc/microdia/sn9c20x-v4l2.c: In function ‘v4l_sn9c20x_register_video_device’:
/home/ucc/microdia/sn9c20x-v4l2.c:1463:11: error: ‘struct video_device’ has no member named ‘parent’
  dev->vdev->parent = &dev->interface->dev;
           ^
/home/ucc/microdia/sn9c20x-v4l2.c:1465:11: error: ‘struct video_device’ has no member named ‘current_norm’
  dev->vdev->current_norm = 0;
           ^
/home/ucc/microdia/sn9c20x-v4l2.c:1472:12: error: ‘struct video_device’ has no member named ‘debug’
   dev->vdev->debug = V4L2_DEBUG_IOCTL_ARG;
            ^
/home/ucc/microdia/sn9c20x-v4l2.c:1472:22: error: ‘V4L2_DEBUG_IOCTL_ARG’ undeclared (first use in this function)
   dev->vdev->debug = V4L2_DEBUG_IOCTL_ARG;
                      ^
/home/ucc/microdia/sn9c20x-v4l2.c:1472:22: note: each undeclared identifier is reported only once for each function it appears in
/home/ucc/microdia/sn9c20x-v4l2.c: At top level:
/home/ucc/microdia/sn9c20x-v4l2.c:1555:2: error: unknown field ‘ioctl’ specified in initializer
  .ioctl = v4l_sn9c20x_ioctl,
  ^
/home/ucc/microdia/sn9c20x-v4l2.c:1555:11: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
  .ioctl = v4l_sn9c20x_ioctl,
           ^
/home/ucc/microdia/sn9c20x-v4l2.c:1555:11: note: (near initialization for ‘v4l_sn9c20x_fops.open’)
scripts/Makefile.build:258: recipe for target '/home/ucc/microdia/sn9c20x-v4l2.o' failed
make[2]: *** [/home/ucc/microdia/sn9c20x-v4l2.o] Error 1
Makefile:1403: recipe for target '_module_/home/ucc/microdia' failed
make[1]: *** [_module_/home/ucc/microdia] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.4.0-36-generic'
Makefile:33: recipe for target 'driver' failed
make: *** [driver] Error 2

Работя на Убунту 16 / 64 бита.

Някой може ли да помогне?

Предварително благодаря!
Активен

Zorkata

  • Участници
  • ***
  • Публикации: 5
    • Профил
Re: USB връзка с камера
« Отговор #1 -: Sep 22, 2016, 08:01 »
Здравей,

единствено мога да ти помогна с разяснения.

Първо драйверът, който си се опитал да компилираш е предполагам за да можеш да ползваш фотоапарата като камера и не ти трябва.

Би трябвало да виждаш паметта на фотоапарата като флашка. От dmesg се вижда, че компютърът ти е засякал устройството като /dev/sdb и е видял дял /dev/sdb6 с файлова система ext3. Значи би трябвало всичко да е наред. За съжаление не ползвам Гном и не знам къде трябва да търсиш монтираното устройство.
Активен

Odido

  • Напреднали
  • *****
  • Публикации: 627
  • Distribution: Arch Linux
  • Window Manager: Gnome
    • Профил
Активен

"Congratulations, you broke the Internet
Look at what you did! Are you happy now?"

Rumen_Zapryanov

  • Участници
  • ***
  • Публикации: 5
    • Профил
Re: USB връзка с камера
« Отговор #3 -: Sep 22, 2016, 13:42 »
Да, искам да го видя като флашка.

С програмата DISKS не става, не го вижда.

Като USB-DEVICES:

Код:
T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  3 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0c45 ProdID=6340 Rev=00.00
S:  Manufacturer=Sonix Technology Co., Ltd.
S:  Product=USB 2.0 Camera
C:  #Ifs= 4 Cfg#= 1 Atr=80 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=0e(video) Sub=01 Prot=00 Driver=uvcvideo
I:  If#= 1 Alt= 0 #EPs= 0 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
I:  If#= 2 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=snd-usb-audio
I:  If#= 3 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio

Като разгледах добре DMESG попаднах на това:

Код:
[109797.248460] usb 1-2: USB disconnect, device number 2
[109953.867494] usb 1-2: new high-speed USB device number 3 using ehci-pci
[109954.039216] usb 1-2: New USB device found, idVendor=0c45, idProduct=6340
[109954.039221] usb 1-2: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[109954.039225] usb 1-2: Product: USB 2.0 Camera
[109954.039227] usb 1-2: Manufacturer: Sonix Technology Co., Ltd.
[109954.041028] uvcvideo: Found UVC 1.00 device USB 2.0 Camera (0c45:6340)
[109954.054114] input: USB 2.0 Camera as /devices/pci0000:00/0000:00:1a.7/usb1/1-2/1-2:1.0/input/input29
[109954.063243] usb 1-2: 3:1: cannot get freq at ep 0x84
[109954.159581] usb 1-2: 3:1: cannot get freq at ep 0x84
[109954.162591] usb 1-2: 3:1: cannot get freq at ep 0x84
[109954.206983] usb 1-2: 3:1: cannot get freq at ep 0x84
[109954.209978] usb 1-2: 3:1: cannot get freq at ep 0x84

Като стартирам MOUNT:

Код:
ucc@ucc-ThinkStation-C20:~$ mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=6127856k,nr_inodes=1531964,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=1229372k,mode=755)
/dev/sda1 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=25,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
tracefs on /sys/kernel/debug/tracing type tracefs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
vmware-vmblock on /run/vmblock-fuse type fuse.vmware-vmblock (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=1229372k,mode=700,uid=1000,gid=1000)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
/dev/sda3 on /media/ucc/Data type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)

С LSBLK също не се вижда:

Код:
ucc@ucc-ThinkStation-C20:~$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0   1,8T  0 disk
├─sda1   8:1    0 492,4G  0 part /
├─sda3   8:3    0   1,3T  0 part /media/ucc/Data
└─sda5   8:5    0    12G  0 part [SWAP]
Активен

Rumen_Zapryanov

  • Участници
  • ***
  • Публикации: 5
    • Профил
Re: USB връзка с камера
« Отговор #4 -: Sep 22, 2016, 13:46 »
С sudo fdisk -l ми дава няколко дяла като RAM

Код:
ucc@ucc-ThinkStation-C20:~$ sudo fdisk -l
Disk /dev/ram0: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram1: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram2: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram3: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram4: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram5: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram6: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram7: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram8: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram9: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram10: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram11: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram12: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram13: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram14: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram15: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/sda: 1,8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x186fddb8

Device     Boot      Start        End    Sectors   Size Id Type
/dev/sda1  *          2048 1032581119 1032579072 492,4G 83 Linux
/dev/sda2       3881883646 3907028991   25145346    12G  5 Extended
/dev/sda3       1032581120 3881881599 2849300480   1,3T 83 Linux
/dev/sda5       3881883648 3907028991   25145344    12G 82 Linux swap / Solaris
Активен

mavar

  • Напреднали
  • *****
  • Публикации: 61
    • Профил
Re: USB връзка с камера
« Отговор #5 -: Sep 28, 2016, 15:38 »
А опита ли с
Код
GeSHi (Bash):
  1. sudo mount /dev/sdb2 /mnt
и после да си ги търсиш в /mnt
Активен

Rumen_Zapryanov

  • Участници
  • ***
  • Публикации: 5
    • Профил
Re: USB връзка с камера
« Отговор #6 -: Sep 28, 2016, 23:15 »
Не я вижда. С USB-DEVICES ми показва:

Код:
T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  2 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0c45 ProdID=6340 Rev=00.00
S:  Manufacturer=Sonix Technology Co., Ltd.
S:  Product=USB 2.0 Camera
C:  #Ifs= 4 Cfg#= 1 Atr=80 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=0e(video) Sub=01 Prot=00 Driver=uvcvideo
I:  If#= 1 Alt= 0 #EPs= 0 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
I:  If#= 2 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=snd-usb-audio
I:  If#= 3 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio

Обаче като устройство за монтиране не го виждам никъде.Може да не е SDB2, може да е 6 или 7 може да е SDB4. Как да разбера? Не го показва никъде.
Активен

Rumen_Zapryanov

  • Участници
  • ***
  • Публикации: 5
    • Профил
Re: USB връзка с камера
« Отговор #7 -: Sep 28, 2016, 23:18 »
lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0   1,8T  0 disk
├─sda1   8:1    0 492,4G  0 part /
├─sda2   8:2    0     1K  0 part
├─sda3   8:3    0   1,3T  0 part /media/ucc/Data
└─sda5   8:5    0    12G  0 part [SWAP]


SDB .... го няма въобще.
Активен