add notes on troubleshooting cameras on bb
[challenge-bot] / bbb / notes.org
index 930d96cf3b88427eed6057e2dee2e8d19a83cf0d..f62804ef93e61b3a8f5d77a40f7218b3e3e4e529 100644 (file)
     * sudo aptitude install -y v4l-utils # for v4l2-ctl
     * sudo aptitude install pkg-config # for compiling
     * for opencv:
-      * sudo aptitude install -y
+      * sudo aptitude install -y libopencv-dev
+      * check whether libopencv-dev is the only package necessary
   * add ssh key to bbb image to make sshing easier
+** trying to compile grabber.c from derek molloy
+*** problem
+**** what i did
+gcc -O2 -Wall `pkg-config --cflags --libs libv4l2` grabber.c -o grabber
+
+**** what i expected
+compilation finishes and i can run grabber
+
+**** what actually happened
+Package libv4l2 was not found in the pkg-config search path.
+
+**** potential solution
+    sudo aptitude install -y libv4l-dev
+
+***** did it work?
+      * retrying compile
+      * compile finished, created grabber!
+
+** another problem, getting image from camera failed
+*** problem
+**** what i did
+after compiling grabber, tried to run it
+
+**** what i expected
+grab images and maybe there would be a picture in the current directory
+
+**** what actually happened
+grabber ran for a bit and output the following:
+
+"Warning: driver is sending image at 1280x720"
+
+after waiting for a bit, killed grabber with C-c. no picture in the
+current directory
+
+**** possible solution
+     * read source of grabber.c and look for anything out of
+      ordinary.
+     * saw that frame size was hard coded to 1920x1080
+     * redid code to 640x480. recompiled the code
+     * ran it, got no terminal output
+     * killed it with C-c after a bit
+     * saw grabber000.ppm
+
+* TODO test out all cameras
+** TODO test out c920 logitech hd pro webcam
+*** TODO test out c920 on laptop
+    * testing with laptop!
+    * cheese shows video feed from device
+    * when run streamer -c /dev/video1 -o foobar.ppm, next image from
+      opencv-hello-world is messed up
+      * when run multiple times in a row, opencv-hello-world gets correct
+        image second time
+*** TODO test out c920 on bbb
+**** TODO test with debian 8.3 image
+     unable to connect via debian@arm.local or ping 192.168.7.2
+**** TODO test with debian 8.2 image
+     * able to connect with debian@arm.local!
+     * run full-update.bash
+     * got it working by adding usbcore.autosuspend=-1 to cmdline in uEnv.txt
+       * still need to throw away first image
+     * trying kernel linux-{image,headers}-4.4.1-bone5
+*** TODO test out c920 on bbg
+**** TODO test with debian 8.3 image
+     unable to connect via debian@arm.local or ping 192.168.7.2
+**** TODO test with debian 8.2 image
+** DOING testing thinkpenguin basic webcam on bbg
+*** /boot/uEnv.txt cmdline usbcore.autosuspend=-1
+     tried with and without this option.  always select timeout
+*** reloading uvcvideo with options
+     * modprobe -r uvcvideo
+     * modprobe uvcvideo nodrop=1 timeout=5000
+     * did not get 'select timeout' but images were solid green with a
+       thin line at the top of real image
+** TODO recompile kernel with CONFIG_MUSB_PIO_ONLY=y
+   might solve usb problems
+   "This happens due to the not well working USB DMA mode in the
+    Beaglebone. I disabled the DMA mode in the kernel (Cameras use
+    USB ISO mode) and it worked well so far."
+* TODO make sure license doesn't say "GNU Affero Emacs is distributed ..."
 * doing
   * maybe just go with debian 8.2
   * systematically try all the images on all the boards