Hi!
I'm trying to use
g_webcam module on Ubuntu Linux 4.8.0-32-generic #34-Ubuntu SMP Tue Dec 13 14:30:43 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux.
But when i bound module to UDC or insert g_webcam system is freezing.
I used following commangs:
Code:
cd /eml
modprobe vivid
modprobe dummy_hcd
modprobe libcomposite
modprobe -v configfs
modprobe -v libcomposite
sleep 2
mount none loop -t configfs
cd loop/usb_gadget
mkdir g2
cd g2
echo "0x1d6b" > idVendor
echo "0x0104" > idProduct
mkdir strings/0x409
echo "0123456789" > strings/0x409/serialnumber
echo "TI Inc." > strings/0x409/manufacturer
echo "MS+UVC gadget" > strings/0x409/product
modprobe -v usb_f_mass_storage
mkdir functions/mass_storage.ms0
# create backing store(s): in this example 2 LUN's 16MB each
dd bs=1M count=16 if=/dev/zero of=/tmp/lun0.img # 16MB
chmod 777 /tmp/lun0.img
modprobe -v usb_f_uvc
mkdir functions/uvc.usb0
mkdir configs/c.1
mkdir configs/c.1/strings/0x409
echo "mass-storage + uvc" > configs/c.1/strings/0x409/configuration
echo 120 > configs/c.1/MaxPower
mkdir functions/uvc.usb0/control/header/h
cd functions/uvc.usb0/control/
ln -s header/h class/fs
ln -s header/h class/ss
cd ../../../
mkdir -p functions/uvc.usb0/streaming/uncompressed/u/360p
cat <<EOF > functions/uvc.usb0/streaming/uncompressed/u/360p/dwFrameInterval
666666
1000000
5000000
EOF
mkdir functions/uvc.usb0/streaming/header/h
cd functions/uvc.usb0/streaming/header/h
ln -s ../../uncompressed/u
cd ../../class/fs
ln -s ../../header/h
cd ../../class/hs
ln -s ../../header/h
cd ../../../control
cd ../../../
echo /tmp/lun0.img > functions/mass_storage.ms0/lun.0/file
echo 1 > functions/mass_storage.ms0/lun.0/removable
ln -s functions/mass_storage.ms0 configs/c.1/
ln -s functions/uvc.usb0 configs/c.1/
echo dummy_udc.0 > UDC
And dmesg -Tw:
Code:
[Вт апр 18 13:00:53 2017] udc dummy_udc.0: registering UDC driver [g2]
[Вт апр 18 13:00:53 2017] configfs-gadget dummy_udc.0: binding UDC
[Вт апр 18 13:00:53 2017] configfs-gadget gadget: adding 'Mass Storage Function'/ffff8c6273b62000 to config 'c'/ffff8c6276f0a520
[Вт апр 18 13:00:53 2017] configfs-gadget gadget: I/O thread pid: 1834
[Вт апр 18 13:00:53 2017] configfs-gadget gadget: adding 'uvc'/ffff8c62766a15e0 to config 'c'/ffff8c6276f0a520
[Вт апр 18 13:00:53 2017] configfs-gadget gadget: uvc_function_bind
[Вт апр 18 13:00:53 2017] configfs-gadget dummy_udc.0: starting UDC
[Вт апр 18 13:00:53 2017] configfs-gadget dummy_udc.0: connecting to UDC
[Вт апр 18 13:00:53 2017] configfs-gadget dummy_udc.0: UDC KOBJ_CHANGE
[Вт апр 18 13:00:53 2017] dummy_udc dummy_udc.0: This device can perform faster if you connect it to a super-speed port...
[Вт апр 18 13:00:53 2017] dummy_hcd dummy_hcd.0: port status 0x00010101 has changes
[Вт апр 18 13:00:53 2017] usb usb1: dummy_bus_resume
[Вт апр 18 13:00:53 2017] dummy_hcd dummy_hcd.0: port status 0x00010101 has changes
What is wrong?