OLIMEX BOARD AT91SAM9260 , USB WEBCAM

I’d like to connect an USB webcam to my olimex linux board but when I plug it I can’t find in the /dev directory any video device ( something like /dev/video0 and so on).

It’s very strange because the kernel recognizes it when I plug the webcam.

Does anybody know which name the webcam has under the /dev directory?

Thank you very much.

There are many types of USB webcams and many of those use some kind of proprietary transfer protocol and proprietary image compression. Only relatively recently are USB webcams starting to use a common protocol (it’s called UVC, USB video class if I remember correctly).

At some point the Linux developers decided that it was no longer allowed to do image decompression within the webcam driver, so some kind of hybrid kernel/userspace solution is required. Last time I was involved in it, USB webcam support for Linux was very messy.

You need to know the exact type of webcam (googling with the USB VID/PID may help) and you may have to compile your own driver. Useful pages:

http://mxhaard.free.fr/index.html (open-source)

http://www.linux-projects.org (closed source)

I own a CREATIVE one , whwn I plug it I get this message:

sam9-l9260:~# usb 1-1: USB disconnect, address 5

usb 1-1: new full speed USB device using at91_ohci and address 6

usb 1-1: configuration #1 chosen from 1 choice

if I give “lsusb” I get:

lsusb

Bus 001 Device 006: ID 041e:4003 Creative Technology, Ltd VideoBlaster WebCam Go Plus [W9967CF]

Bus 001 Device 001: ID 0000:0000

sam9-l9260:~#

sam9-l9260:~#

and with “dmesg”:

usb 1-1: new full speed USB device using at91_ohci and address 2

usb 1-1: configuration #1 chosen from 1 choice

usb 1-1: USB disconnect, address 2

usb 1-1: new full speed USB device using at91_ohci and address 3

usb 1-1: configuration #1 chosen from 1 choice

usb 1-1: USB disconnect, address 3

usb 1-1: new full speed USB device using at91_ohci and address 4

usb 1-1: device descriptor read/64, error -62

usb 1-1: configuration #1 chosen from 1 choice

eth0: link up (100/Full)

usb 1-1: USB disconnect, address 4

usb 1-1: new full speed USB device using at91_ohci and address 5

usb 1-1: configuration #1 chosen from 1 choice

usb 1-1: USB disconnect, address 5

usb 1-1: new full speed USB device using at91_ohci and address 6

usb 1-1: configuration #1 chosen from 1 choice

sam9-l9260:~#

sam9-l9260:~#

in the dev directory I have this situation:

sam9-l9260:~# ls /dev

1-1\0x09 loop6\0x09 ptyp5 ram2 tty12 tty3 tty47 tty7\0x09ttypd

MAKEDEV loop7\0x09 ptyp6 ram3 tty13 tty30 tty48 tty8\0x09ttype

bus\0x09 mem\0x09 ptyp7 ram4 tty14 tty31 tty49 tty9\0x09ttypf

console mtd0\0x09 ptyp8 ram5 tty15 tty32 tty5\0x09 ttyS0\0x09urandom

core\0x09 mtd0ro ptyp9 ram6 tty16 tty33 tty50 ttyS1\0x09usb1

fd\0x09 mtd1\0x09 ptypa ram7 tty17 tty34 tty51 ttyS2\0x09usbdev1.1_ep00

full\0x09 mtd1ro ptypb ram8 tty18 tty35 tty52 ttyp0\0x09usbdev1.1_ep81

initctl mtdblock0 ptypc ram9 tty19 tty36 tty53 ttyp1\0x09usbdev1.6_ep00

input\0x09 mtdblock1 ptypd random tty2 tty37 tty54 ttyp2\0x09usbdev1.6_ep81

kmem\0x09 net\0x09 ptype shm\0x09 tty20 tty38 tty55 ttyp3\0x09vcs

kmsg\0x09 null\0x09 ptypf sndstat tty21 tty39 tty56 ttyp4\0x09vcsa

log\0x09 ppp\0x09 ram0 stderr tty22 tty4 tty57 ttyp5\0x09video0

loop\0x09 ptmx\0x09 ram1 stdin tty23 tty40 tty58 ttyp6\0x09xconsole

loop0\0x09 pts\0x09 ram10 stdout tty24 tty41 tty59 ttyp7\0x09zero

loop1\0x09 ptyp0\0x09 ram11 tty\0x09 tty25 tty42 tty6\0x09 ttyp8

loop2\0x09 ptyp1\0x09 ram12 tty0 tty26 tty43 tty60 ttyp9

loop3\0x09 ptyp2\0x09 ram13 tty1 tty27 tty44 tty61 ttypa

loop4\0x09 ptyp3\0x09 ram14 tty10 tty28 tty45 tty62 ttypb

loop5\0x09 ptyp4\0x09 ram15 tty11 tty29 tty46 tty63 ttypc

sam9-l9260:~#

sam9-l9260:~#

Please , can anybody tell me which one is my usb webcam?

I’d like to use “open” in a C program to open the webcam and get an image to store on a file.

Thank you very much.

/dev/video0

If it returns ENODEV, you still need to load the w9968cf driver.

denial:
/dev/video0

If it returns ENODEV, you still need to load the w9968cf driver.

I have found only this under /dev:

ttyp5\0x09video0

is this the same thing?

caccolillo:
I have found only this under /dev:

ttyp5\0x09video0

is this the same thing?

Either your /dev directory is messed up or whatever you use to access the board prints tab characters as \0x09.

There should be ttyp5 and video0 but not ttyp5\0x09video0.

denial:

caccolillo:
I have found only this under /dev:

ttyp5\0x09video0

is this the same thing?

Either your /dev directory is messed up or whatever you use to access the board prints tab characters as \0x09.

There should be ttyp5 and video0 but not ttyp5\0x09video0.

It’s very strange , i’ve given again the ls command and the /video device is disappeared.

I can’t find it neither if I reboot the board.

sam9-l9260:~# ls -l /dev

total 0

crw-rw---- 1 root root 189, 1 Jan 1 02:04 1-1

lrwxrwxrwx 1 root root 13 Jan 1 02:00 MAKEDEV → /sbin/MAKEDEV

drwxr-xr-x 3 root root 60 Jan 1 02:00 bus

crw------- 1 root root 5, 1 Jan 1 02:02 console

lrwxrwxrwx 1 root root 11 Jan 1 02:00 core → /proc/kcore

lrwxrwxrwx 1 root root 13 Jan 1 02:00 fd → /proc/self/fd

crw-rw-rw- 1 root root 1, 7 Jan 1 02:00 full

prw------- 1 root root 0 Jan 1 02:00 initctl

drwxr-xr-x 2 root root 60 Jan 1 02:00 input

crw-r----- 1 root kmem 1, 2 Jan 1 02:00 kmem

crw-rw---- 1 root root 1, 11 Jan 1 02:00 kmsg

srw-rw-rw- 1 root root 0 Jan 1 02:02 log

drwxr-xr-x 2 root root 60 Jan 1 02:00 loop

brw-rw---- 1 root disk 7, 0 Jan 1 02:00 loop0

brw-rw---- 1 root disk 7, 1 Jan 1 02:00 loop1

brw-rw---- 1 root disk 7, 2 Jan 1 02:00 loop2

brw-rw---- 1 root disk 7, 3 Jan 1 02:00 loop3

brw-rw---- 1 root disk 7, 4 Jan 1 02:00 loop4

brw-rw---- 1 root disk 7, 5 Jan 1 02:00 loop5

brw-rw---- 1 root disk 7, 6 Jan 1 02:00 loop6

brw-rw---- 1 root disk 7, 7 Jan 1 02:00 loop7

crw-r----- 1 root kmem 1, 1 Jan 1 02:00 mem

crw-rw---- 1 root root 90, 0 Jan 1 02:00 mtd0

crw-rw---- 1 root root 90, 1 Jan 1 02:00 mtd0ro

crw-rw---- 1 root root 90, 2 Jan 1 02:00 mtd1

crw-rw---- 1 root root 90, 3 Jan 1 02:00 mtd1ro

brw-rw---- 1 root disk 31, 0 Jan 1 02:00 mtdblock0

brw-rw---- 1 root disk 31, 1 Jan 1 02:00 mtdblock1

drwxr-xr-x 2 root root 60 Jan 1 02:00 net

crw-rw-rw- 1 root root 1, 3 Jan 1 02:00 null

crw------- 1 root root 108, 0 Jan 1 02:00 ppp

crw-rw-rw- 1 root root 5, 2 Jan 1 02:00 ptmx

drwxr-xr-x 2 root root 0 Jan 1 02:00 pts

crw-rw-rw- 1 root tty 2, 0 Jan 1 02:00 ptyp0

crw-rw-rw- 1 root tty 2, 1 Jan 1 02:00 ptyp1

crw-rw-rw- 1 root tty 2, 2 Jan 1 02:00 ptyp2

crw-rw-rw- 1 root tty 2, 3 Jan 1 02:00 ptyp3

crw-rw-rw- 1 root tty 2, 4 Jan 1 02:00 ptyp4

crw-rw-rw- 1 root tty 2, 5 Jan 1 02:00 ptyp5

crw-rw-rw- 1 root tty 2, 6 Jan 1 02:00 ptyp6

crw-rw-rw- 1 root tty 2, 7 Jan 1 02:00 ptyp7

crw-rw-rw- 1 root tty 2, 8 Jan 1 02:00 ptyp8

crw-rw-rw- 1 root tty 2, 9 Jan 1 02:00 ptyp9

crw-rw-rw- 1 root tty 2, 10 Jan 1 02:00 ptypa

crw-rw-rw- 1 root tty 2, 11 Jan 1 02:00 ptypb

crw-rw-rw- 1 root tty 2, 12 Jan 1 02:00 ptypc

crw-rw-rw- 1 root tty 2, 13 Jan 1 02:00 ptypd

crw-rw-rw- 1 root tty 2, 14 Jan 1 02:00 ptype

crw-rw-rw- 1 root tty 2, 15 Jan 1 02:00 ptypf

brw-rw---- 1 root disk 1, 0 Jan 1 02:00 ram0

brw-rw---- 1 root disk 1, 1 Jan 1 02:00 ram1

brw-rw---- 1 root disk 1, 10 Jan 1 02:00 ram10

brw-rw---- 1 root disk 1, 11 Jan 1 02:00 ram11

brw-rw---- 1 root disk 1, 12 Jan 1 02:00 ram12

brw-rw---- 1 root disk 1, 13 Jan 1 02:00 ram13

brw-rw---- 1 root disk 1, 14 Jan 1 02:00 ram14

brw-rw---- 1 root disk 1, 15 Jan 1 02:00 ram15

brw-rw---- 1 root disk 1, 2 Jan 1 02:00 ram2

brw-rw---- 1 root disk 1, 3 Jan 1 02:00 ram3

brw-rw---- 1 root disk 1, 4 Jan 1 02:00 ram4

brw-rw---- 1 root disk 1, 5 Jan 1 02:00 ram5

brw-rw---- 1 root disk 1, 6 Jan 1 02:00 ram6

brw-rw---- 1 root disk 1, 7 Jan 1 02:00 ram7

brw-rw---- 1 root disk 1, 8 Jan 1 02:00 ram8

brw-rw---- 1 root disk 1, 9 Jan 1 02:00 ram9

crw-rw-rw- 1 root root 1, 8 Jan 1 02:00 random

drwxrwxrwt 2 root root 40 Jan 1 02:00 shm

lrwxrwxrwx 1 root root 24 Jan 1 02:00 sndstat → /proc/asound/oss/sndstat

lrwxrwxrwx 1 root root 15 Jan 1 02:00 stderr → /proc/self/fd/2

lrwxrwxrwx 1 root root 15 Jan 1 02:00 stdin → /proc/self/fd/0

lrwxrwxrwx 1 root root 15 Jan 1 02:00 stdout → /proc/self/fd/1

crw-rw-rw- 1 root root 5, 0 Jan 1 02:00 tty

crw-rw---- 1 root root 4, 0 Jan 1 02:00 tty0

crw-rw---- 1 root root 4, 1 Jan 1 02:00 tty1

crw-rw---- 1 root root 4, 10 Jan 1 02:00 tty10

crw-rw---- 1 root root 4, 11 Jan 1 02:00 tty11

crw-rw---- 1 root root 4, 12 Jan 1 02:00 tty12

crw-rw---- 1 root root 4, 13 Jan 1 02:00 tty13

crw-rw---- 1 root root 4, 14 Jan 1 02:00 tty14

crw-rw---- 1 root root 4, 15 Jan 1 02:00 tty15

crw-rw---- 1 root root 4, 16 Jan 1 02:00 tty16

crw-rw---- 1 root root 4, 17 Jan 1 02:00 tty17

crw-rw---- 1 root root 4, 18 Jan 1 02:00 tty18

crw-rw---- 1 root root 4, 19 Jan 1 02:00 tty19

crw-rw---- 1 root root 4, 2 Jan 1 02:00 tty2

crw-rw---- 1 root root 4, 20 Jan 1 02:00 tty20

crw-rw---- 1 root root 4, 21 Jan 1 02:00 tty21

crw-rw---- 1 root root 4, 22 Jan 1 02:00 tty22

crw-rw---- 1 root root 4, 23 Jan 1 02:00 tty23

crw-rw---- 1 root root 4, 24 Jan 1 02:00 tty24

crw-rw---- 1 root root 4, 25 Jan 1 02:00 tty25

crw-rw---- 1 root root 4, 26 Jan 1 02:00 tty26

crw-rw---- 1 root root 4, 27 Jan 1 02:00 tty27

crw-rw---- 1 root root 4, 28 Jan 1 02:00 tty28

crw-rw---- 1 root root 4, 29 Jan 1 02:00 tty29

crw-rw---- 1 root root 4, 3 Jan 1 02:00 tty3

crw-rw---- 1 root root 4, 30 Jan 1 02:00 tty30

crw-rw---- 1 root root 4, 31 Jan 1 02:00 tty31

crw-rw---- 1 root root 4, 32 Jan 1 02:00 tty32

crw-rw---- 1 root root 4, 33 Jan 1 02:00 tty33

crw-rw---- 1 root root 4, 34 Jan 1 02:00 tty34

crw-rw---- 1 root root 4, 35 Jan 1 02:00 tty35

crw-rw---- 1 root root 4, 36 Jan 1 02:00 tty36

crw-rw---- 1 root root 4, 37 Jan 1 02:00 tty37

crw-rw---- 1 root root 4, 38 Jan 1 02:00 tty38

crw-rw---- 1 root root 4, 39 Jan 1 02:00 tty39

crw-rw---- 1 root root 4, 4 Jan 1 02:00 tty4

crw-rw---- 1 root root 4, 40 Jan 1 02:00 tty40

crw-rw---- 1 root root 4, 41 Jan 1 02:00 tty41

crw-rw---- 1 root root 4, 42 Jan 1 02:00 tty42

crw-rw---- 1 root root 4, 43 Jan 1 02:00 tty43

crw-rw---- 1 root root 4, 44 Jan 1 02:00 tty44

crw-rw---- 1 root root 4, 45 Jan 1 02:00 tty45

crw-rw---- 1 root root 4, 46 Jan 1 02:00 tty46

crw-rw---- 1 root root 4, 47 Jan 1 02:00 tty47

crw-rw---- 1 root root 4, 48 Jan 1 02:00 tty48

crw-rw---- 1 root root 4, 49 Jan 1 02:00 tty49

crw-rw---- 1 root root 4, 5 Jan 1 02:00 tty5

crw-rw---- 1 root root 4, 50 Jan 1 02:00 tty50

crw-rw---- 1 root root 4, 51 Jan 1 02:00 tty51

crw-rw---- 1 root root 4, 52 Jan 1 02:00 tty52

crw-rw---- 1 root root 4, 53 Jan 1 02:00 tty53

crw-rw---- 1 root root 4, 54 Jan 1 02:00 tty54

crw-rw---- 1 root root 4, 55 Jan 1 02:00 tty55

crw-rw---- 1 root root 4, 56 Jan 1 02:00 tty56

crw-rw---- 1 root root 4, 57 Jan 1 02:00 tty57

crw-rw---- 1 root root 4, 58 Jan 1 02:00 tty58

crw-rw---- 1 root root 4, 59 Jan 1 02:00 tty59

crw-rw---- 1 root root 4, 6 Jan 1 02:00 tty6

crw-rw---- 1 root root 4, 60 Jan 1 02:00 tty60

crw-rw---- 1 root root 4, 61 Jan 1 02:00 tty61

crw-rw---- 1 root root 4, 62 Jan 1 02:00 tty62

crw-rw---- 1 root root 4, 63 Jan 1 02:00 tty63

crw-rw---- 1 root root 4, 7 Jan 1 02:00 tty7

crw-rw---- 1 root root 4, 8 Jan 1 02:00 tty8

crw-rw---- 1 root root 4, 9 Jan 1 02:00 tty9

crw------- 1 root tty 4, 64 Jan 1 02:08 ttyS0

crw-rw---- 1 root dialout 4, 65 Jan 1 02:00 ttyS1

crw-rw---- 1 root dialout 4, 66 Jan 1 02:00 ttyS2

crw-rw-rw- 1 root tty 3, 0 Jan 1 02:00 ttyp0

crw-rw-rw- 1 root tty 3, 1 Jan 1 02:00 ttyp1

crw-rw-rw- 1 root tty 3, 2 Jan 1 02:00 ttyp2

crw-rw-rw- 1 root tty 3, 3 Jan 1 02:00 ttyp3

crw-rw-rw- 1 root tty 3, 4 Jan 1 02:00 ttyp4

crw-rw-rw- 1 root tty 3, 5 Jan 1 02:00 ttyp5

crw-rw-rw- 1 root tty 3, 6 Jan 1 02:00 ttyp6

crw-rw-rw- 1 root tty 3, 7 Jan 1 02:00 ttyp7

crw-rw-rw- 1 root tty 3, 8 Jan 1 02:00 ttyp8

crw-rw-rw- 1 root tty 3, 9 Jan 1 02:00 ttyp9

crw-rw-rw- 1 root tty 3, 10 Jan 1 02:00 ttypa

crw-rw-rw- 1 root tty 3, 11 Jan 1 02:00 ttypb

crw-rw-rw- 1 root tty 3, 12 Jan 1 02:00 ttypc

crw-rw-rw- 1 root tty 3, 13 Jan 1 02:00 ttypd

crw-rw-rw- 1 root tty 3, 14 Jan 1 02:00 ttype

crw-rw-rw- 1 root tty 3, 15 Jan 1 02:00 ttypf

crw-rw-rw- 1 root root 1, 9 Jan 1 02:02 urandom

crw-rw---- 1 root root 189, 0 Jan 1 02:00 usb1

crw-rw---- 1 root root 253, 0 Jan 1 02:00 usbdev1.1_ep00

crw-rw---- 1 root root 253, 1 Jan 1 02:00 usbdev1.1_ep81

crw-rw---- 1 root root 253, 2 Jan 1 02:04 usbdev1.2_ep00

crw-rw---- 1 root root 253, 3 Jan 1 02:04 usbdev1.2_ep81

crw-rw---- 1 root root 7, 0 Jan 1 02:00 vcs

crw-rw---- 1 root root 7, 128 Jan 1 02:00 vcsa

prw-r----- 1 root adm 0 Jan 1 02:04 xconsole

crw-rw-rw- 1 root root 1, 5 Jan 1 02:00 zero

sam9-l9260:~#

so which of these one is the webcam and which one the SD ?

Thank you very much.

Is the webcam still connected?

Previously you had it as device 6 but now it is gone and another device 2 appeared.

and which one the SD ?

SD as in secure digital card?

Yes , the webcam has been disconnected and then reconnected.

Yes I mean a secure digital by 1GB connected to the board.