1 2 Previous Next 16 Replies Latest reply on Dec 5, 2014 2:12 AM by SLK

    Support for Webcams in Edison

    SLK

      I am trying to use a webcam in my Intel Edison. Following that thread (https://communities.intel.com/message/247757#247757) I created a new kernel and flashed it to the device. I know that the camera is using uvcvideo and gspca_main kernel modules and I have them loaded with modprobe.  After loading the modules I attached the camera to the normal USB and shifted the switch in the direction of this USB. But listing the usb devices shows only this:

       

      lsusb

      Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

      Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

       

      I do not see also any /dev/video* device.

       

      What else do I need to do in order to make this camera accessible?

       

      Appreciate your help and suggestions.

        • 1. Re: Support for Webcams in Edison
          JPMontero_Intel

          I’m not sure on this but I believe the driver is the one that create the device /dev/video. Did you already install it? I know it is also possible by doing it manually but I’m not sure how, but I found this guide http://www.tldp.org/HOWTO/Webcam-HOWTO/dev-intro.html . I hope you find this helpful.

           

          Regards,

          JPMontero_Intel

          • 2. Re: Support for Webcams in Edison
            AlexT_Intel

            Just to make sure - you have to flip the switch before you connect the webcam to the port, or you need to flip it back and forth once if you connect it after. Is that what you're doing?

            lsusb should show the entry even without the driver, I think.

             

            Which specific model of the webcam do you have?

             

            If you're able to connect it to the usual PC with Linux on it, what does "dmesg |tail -40" command show you after connecting?

            • 3. Re: Support for Webcams in Edison
              SLK

              I have Intel Edison plugged in the power and the switch moved in direction the power socket.

               

              I plugged a mouse to test if there will be at least some indication. And I can see that the mouse has light. So at least the physical connection  exists.  But there is nothing in the dmesg logs showing up. Calling lsusb reveals the following:

               

              Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

              Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

               

              Just to be sure I moved the switch on the other side and ran lsusb. That gave me the following result:

               

              unable to initialize libusb: -99

               

              Which should be normal, I guess.  After that I moved again the switch to the correct side and executing "dmesg |tail -40" showed me the following:

              [   14.110997] wl_bss_connect_done succeeded with 00:0f:a3:39:db:8b

              [   14.136195] wl_bss_connect_done succeeded with 00:0f:a3:39:db:8b

              [   14.966737] ip (288) used greatest stack depth: 5436 bytes left

              [13283.334494] pmic_ccsm pmic_ccsm: USB ID Removed. Notifying OTG driver

              [13283.400074] dwc3-host dwc3-host.2: remove, state 84

              [13283.401016] usb usb2: USB disconnect, device number 1

              [13283.401655] xHCI xhci_drop_endpoint called for root hub

              [13283.401677] xHCI xhci_check_bandwidth called for root hub

              [13283.402580] dwc3-host dwc3-host.2: USB bus 2 deregistered

              [13283.405487] dwc3-host dwc3-host.2: remove, state 4

              [13283.405533] usb usb1: USB disconnect, device number 1

              [13283.406140] xHCI xhci_drop_endpoint called for root hub

              [13283.406161] xHCI xhci_check_bandwidth called for root hub

              [13283.407994] pmic_ccsm pmic_ccsm: USB VBUS Detected. Notifying OTG driver

              [13283.408711] dwc3-host dwc3-host.2: USB bus 1 deregistered

              [13283.813223] pmic_ccsm pmic_ccsm: USB VBUS Removed. Notifying OTG driver

              [13308.655097] pmic_ccsm pmic_ccsm: USB ID Detected. Notifying OTG driver

              [13309.517373] dwc3-host dwc3-host.2: xHCI Host Controller

              [13309.518063] dwc3-host dwc3-host.2: new USB bus registered, assigned bus number 1

              [13309.518315] dwc3-host dwc3-host.2: irq 34, io mem 0xf9100000

              [13309.518461] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002

              [13309.518484] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1

              [13309.518504] usb usb1: Product: xHCI Host Controller

              [13309.518523] usb usb1: Manufacturer: Linux 3.10.17-poky-edison+ dwc-xhci

              [13309.518541] usb usb1: SerialNumber: dwc3-host.2

              [13309.519311] xHCI xhci_add_endpoint called for root hub

              [13309.519332] xHCI xhci_check_bandwidth called for root hub

              [13309.519596] hub 1-0:1.0: USB hub found

              [13309.519641] hub 1-0:1.0: 1 port detected

              [13309.520242] dwc3-host dwc3-host.2: xHCI Host Controller

              [13309.520626] dwc3-host dwc3-host.2: new USB bus registered, assigned bus number 2

              [13309.520790] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003

              [13309.520814] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1

              [13309.520834] usb usb2: Product: xHCI Host Controller

              [13309.520853] usb usb2: Manufacturer: Linux 3.10.17-poky-edison+ dwc-xhci

              [13309.520871] usb usb2: SerialNumber: dwc3-host.2

              [13309.521506] xHCI xhci_add_endpoint called for root hub

              [13309.521526] xHCI xhci_check_bandwidth called for root hub

              [13309.521785] hub 2-0:1.0: USB hub found

              [13309.521830] hub 2-0:1.0: 1 port detected

               

              But lsusb shows again the same results:

              Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

              Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

               

              And no USB mouse seems to be detected. I am using the edison-src-weekly-68.tgz. And I am getting the feeling that it is not only this special USB camera but all USB devices that are not seen from the kernel and initialized. Can it be that the USB host utilities are not loaded at all? Or I need to compile something more in the kernel?

              I have the following kernel modules on the edison:

               

              root@edison:/lib/modules/3.10.17-poky-edison+# find -name *.ko

              ./kernel/arch/x86/kernel/test_nx.ko

              ./kernel/drivers/media/i2c/msp3400.ko

              ./kernel/drivers/media/i2c/tvp5150.ko

              ./kernel/drivers/media/i2c/saa7115.ko

              ./kernel/drivers/media/i2c/mt9v011.ko

              ./kernel/drivers/media/v4l2-core/videobuf2-vmalloc.ko

              ./kernel/drivers/media/v4l2-core/videobuf2-core.ko

              ./kernel/drivers/media/v4l2-core/videobuf-vmalloc.ko

              ./kernel/drivers/media/v4l2-core/tuner.ko

              ./kernel/drivers/media/v4l2-core/videobuf2-memops.ko

              ./kernel/drivers/media/v4l2-core/videobuf-core.ko

              ./kernel/drivers/media/common/tveeprom.ko

              ./kernel/drivers/media/usb/zr364xx/zr364xx.ko

              ./kernel/drivers/media/usb/sn9c102/sn9c102.ko

              ./kernel/drivers/media/usb/stkwebcam/stkwebcam.ko

              ./kernel/drivers/media/usb/cpia2/cpia2.ko

              ./kernel/drivers/media/usb/pwc/pwc.ko

              ./kernel/drivers/media/usb/uvc/uvcvideo.ko

              ./kernel/drivers/media/usb/gspca/gspca_main.ko

              ./kernel/drivers/media/usb/em28xx/em28xx-rc.ko

              ./kernel/drivers/media/usb/em28xx/em28xx-alsa.ko

              ./kernel/drivers/media/usb/em28xx/em28xx.ko

              ./kernel/drivers/media/usb/s2255/s2255drv.ko

              ./kernel/drivers/misc/bcm-lpm/bcm_bt_lpm.ko

              ./kernel/drivers/usb/gadget/g_multi.ko

              ./kernel/drivers/usb/gadget/usb_f_acm.ko

              ./kernel/drivers/usb/gadget/u_serial.ko

              ./kernel/drivers/usb/gadget/libcomposite.ko

              ./kernel/drivers/staging/iio/trigger/iio-trig-sysfs.ko

              ./kernel/net/mac80211/mac80211.ko

              ./extra/bcm4334x.ko

               

              And these are the loaded modules:

              root@edison:/lib/modules/3.10.17-poky-edison+# lsmod

              Module                  Size  Used by

              usb_f_acm              14335  1

              u_serial               18582  6 usb_f_acm

              g_multi                70540  0

              libcomposite           39245  2 usb_f_acm,g_multi

              bcm_bt_lpm             13676  0

              bcm4334x              578947  0

               

              If needed I can attach also the .config used to compile the kernel.

               

              I saw the same issue on another Edison at the Intel Roadshow in Munich.

               

              Thanks in advance.

              • 4. Re: Support for Webcams in Edison
                SLK

                > And I can see that the mouse has light. So at least the physical connection  exists.

                Correction: the light just blinked for less than a second and then it went off.

                • 5. Re: Support for Webcams in Edison
                  AlexT_Intel

                  Okay,that looks like a somewhat broken build to me. On my one, even devices for which it doesn't have the driver are at least shown in the lsusb output and mouse works just fine (it uses a generic driver which is there even in the official image and is built into the kernel).

                  root@edison:~# lsusb

                  Bus 001 Device 004: ID 1733:0910 Cellink Technology Co., Ltd

                  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

                  Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

                   

                  root@edison:~# dmesg|tail

                  [  806.838894] usb 1-1: Product: Plantronics USB Headset

                  [  806.838912] usb 1-1: Manufacturer: Plantronics

                  [  806.855438] hid-generic 0003:047F:DA41.0001: hiddev0,hidraw0: USB HID v1.00 Device [Plantronics Plantronics USB Headset] on usb-dwc3-host.2-1/input3

                  [  830.637326] usb 1-1: USB disconnect, device number 3

                  [  883.955900] usb 1-1: new low-speed USB device number 4 using dwc3-host

                  [  883.986806] usb 1-1: New USB device found, idVendor=1733, idProduct=0910

                  [  883.986838] usb 1-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0

                  [  883.986860] usb 1-1: Product: Optical USB+PS/2 Mouse

                  [  884.006464] input: Optical USB+PS/2 Mouse as /devices/pci0000:00/0000:00:11.0/dwc3-host.2/usb1/1-1/1-1:1.0/input/input3

                  [  884.007742] hid-generic 0003:1733:0910.0002: input,hidraw0: USB HID v1.10 Mouse [Optical USB+PS/2 Mouse] on usb-dwc3-host.2-1/input0

                   

                  root@edison:~# lsmod

                  Module                  Size  Used by

                  usb_f_acm              14335  1

                  u_serial               18582  1 usb_f_acm

                  g_multi                70540  0

                  libcomposite           39245  2 usb_f_acm,g_multi

                  bcm_bt_lpm             13676  0

                  bcm4334x              574851  0

                   

                   

                  Let's see what's in the kernel config file you've used for your build, maybe there's some option that got modified unnecessarily...

                  • 6. Re: Support for Webcams in Edison
                    SLK

                    Hi Alex, please take a look at the attached file.

                    If that helps: I had the same issues with the original image that was on the device and I thought that flashing will fix it. The same problem appeared also on another edison device that was given to the guy next to me in the Intel Roadshow in Munich.

                    • 7. Re: Support for Webcams in Edison
                      SLK

                      To make things easier to test can someone with working Usb for his Edison share his/her kernel config and the generated toFlash folder used to flash the device?

                      • 8. Re: Support for Webcams in Edison
                        AlexT_Intel

                        Attached are my .config and the diff between it and your file. To be honest I don't see anything apparently incorrect there. My image is a bit modified too (added uvcvideo and gspca_pac207 modules + prerequisites) but it shouldn't affect this piece of recognizing USB devices.

                         

                        By the way, I think I haven't seen your reply - which webcam do you have and what do you see in dmesg if you conect it to a PC (not to Edison) with a usual Linux distro?

                        • 9. Re: Support for Webcams in Edison
                          SLK

                          The camera is Microsoft Corp. LifeCam VX-1000. When I plugged it to my Linux desktop I get the following from dmesg:

                           

                          .. [ 2025.000209] usb 3-2: new full speed USB device using uhci_hcd and address 3

                          .. [ 2025.162401] usb 3-2: configuration #1 chosen from 1 choice

                          .. [ 2025.165269] gspca: probing 045e:00f7

                          .. [ 2025.171135] sonixj: Sonix chip id: 11

                          .. [ 2025.174642] gspca: probe ok

                          .. [ 2025.174824] gspca: probing 045e:00f7

                           

                          lsusb on the desktop  prints the following:

                          Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

                          Bus 003 Device 003: ID 045e:00f7 Microsoft Corp. LifeCam VX-1000

                          Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

                          Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

                          Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

                           

                          But if lsusb works without drivers then there should be at least correct output in the Edison, right? 

                          • 10. Re: Support for Webcams in Edison
                            AlexT_Intel

                            Right, that's what I would expect to see.

                             

                            By the way, your webcam doesn't seem to be supported by the uvcvideo driver, based on their HCL: Linux UVC driver & tools and the dmesg output above. It's rather one of the gspca family, namely gspca-sonixj. But again, I'd expect you to see the device in lsusb output.

                             

                            I'd suggest you to try to step back and start with a known good image, which is the currently released official one. Flash it and try lsusb (it has no uvcvideo or gspca drivers, so these two won't work).

                            • 11. Re: Support for Webcams in Edison
                              SLK

                              Alex, can you give me a URL to an image that you can recommend?

                              • 12. Re: Support for Webcams in Edison
                                AlexT_Intel

                                Try this one (which was just posted BTW, it's an update to thw previously released WW36 one): http://downloadmirror.intel.com/24389/eng/edison-image-rel1-maint-rel1-ww42-14.zip

                                • 13. Re: Support for Webcams in Edison
                                  SLK

                                  I flashed the new image with --keep-data option and the USB does hub does not seem recognize plugged USB devices as before . My last hope is to flush it without the --keep-data option, but I will have to backup the data before that. Or do I have to use -b or some other options?

                                  • 14. Re: Support for Webcams in Edison
                                    AlexT_Intel

                                    Just use the flashall script without arguments or the OTA method, that will overwrite everything  - so backup is needed, yes, and you'll get a clean system which would be a good reference point for step-by-step troubleshooting.

                                    1 2 Previous Next