From 48859bf902de0d21b51e79935a8f7c07e435443d Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Sat, 29 Jun 2019 11:29:52 +0200 Subject: [PATCH] first try at emulating uvc camera --- README | 3 ++- uvc-gadget.sh | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) mode change 100644 => 100755 uvc-gadget.sh diff --git a/README b/README index 6db5b7d..6620a6f 100644 --- a/README +++ b/README @@ -29,4 +29,5 @@ http://github.com/wismna/raspberry-pi/hackpi https://github.com/torvalds/linux/blob/master/Documentation/usb/gadget-testing.txt - +https://gist.github.com/kbingham/c39c4cc7c20882a104c08df5206e2f9f +https://github.com/wlhe/uvc-gadget diff --git a/uvc-gadget.sh b/uvc-gadget.sh old mode 100644 new mode 100755 index 4b8a4f1..00fd4ee --- a/uvc-gadget.sh +++ b/uvc-gadget.sh @@ -1,6 +1,17 @@ #!/bin/sh # https://gist.github.com/kbingham/c39c4cc7c20882a104c08df5206e2f9f +# needs user-space part https://github.com/wlhe/uvc-gadget + +if [ ! -d uvc-gadget ] ; then + git clone https://github.com/wlhe/uvc-gadget + cd uvc-gadget && make + cd - +fi + + +# load module +cd /sys/kernel/config/usb_gadget/ || modprobe libcomposite set -e #set -x -- 2.20.1