LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-18-2017, 05:22 AM   #1
e.u.mikhailov
LQ Newbie
 
Registered: Apr 2017
Posts: 2

Rep: Reputation: Disabled
Configfs Composite Gadget - uvc and g_webcam


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?
 
Old 07-02-2018, 08:46 AM   #2
Tcc
LQ Newbie
 
Registered: Jul 2018
Posts: 2

Rep: Reputation: Disabled
Hi

Have you ever solved it?
 
Old 07-02-2018, 09:14 AM   #3
e.u.mikhailov
LQ Newbie
 
Registered: Apr 2017
Posts: 2

Original Poster
Rep: Reputation: Disabled
Nope
 
Old 07-06-2018, 03:52 AM   #4
Tcc
LQ Newbie
 
Registered: Jul 2018
Posts: 2

Rep: Reputation: Disabled
Unhappy dummy-hcd does not support isochronous transfers (uvc case)

I know it's late, but just for anyone else that tries to use g_webcam or the uvc configfs with dummy_hcd, according to this: https://www.spinics.net/lists/linux-usb/msg160903.html

Quote:
dummy-hcd does not support isochronous transfers.
and UVC functions use isochronous transfers, so it won't work.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[gadget driver] HOST turns unresponsive to gadget driver niroop Linux - Embedded & Single-board computer 4 04-22-2015 08:30 AM
UVC Cross Compile beyern Linux - Newbie 2 05-01-2010 05:17 PM
[SOLVED] Streaming UVC webcam Koppie Linux - Software 1 09-05-2009 03:32 PM
UVC Webcam Ubuntu j0eh4x Linux - Hardware 5 01-05-2009 09:33 PM
ocfs2 Unable to load module "configfs" pjohnson Linux - Newbie 1 06-19-2008 04:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration