Announcement

Collapse
No announcement yet.

Webcam not found on USB scan...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Webcam not found on USB scan...

    Working with a Logitech c310, Anker powered USB hub, and iKits 5V battery/charger for the USB Hub with a Moto Play G4 and Rev Expansion Hub. AutoRun is disabled
    Except for the battery, these are the specific devices mentioned in the recent FTC blog post on using a Webcam.

    Symptom is that the webcam doesn't show up on the USB scan from the Robot Controller app. Both batteries (usb hub and rev hub) are 90%+. Rev hub does show up and connects through the USB hub. Webcam has been tested on a PC and is functional.

    Interestingly, an nice android app called "USB Device Info" reports that the web cam is present on the USB bus, but only "detects" it via accessing the underlying Linux info, as opposed to using the android API.

    Also interesting, the USB Device Info app reports the expected USB Sub-class of 2, but a USB Class of 239 (which is "misc") instead of 14 (which is "video").

    I've also tried creating a device_filter.xml file in teamcode/res/xml with the reported class and sub-class above and also with the specific vendor Id and product id for the webcam...no good.

    But I don't actually suspect the usb filter, this looks more like the device is being "hidden" by android and isn't getting "found" by the FTC code using the android usb manager libraries...

    Many thanks in advance for any ideas on how to proceed at this point...and happy holidays!

    PS I would also be grateful for the couple lines of xml code that "should" be in robot configuration xml file, I could modify and inject that through Android Studio and see if the RC can connect even though the scan is failing...

  • #2
    Interestingly, an nice android app called "USB Device Info" reports that the web cam is present on the USB bus, but only "detects" it via accessing the underlying Linux info, as opposed to using the android API.
    Well that's actually to be expected. Android doesn't have a built-in webcam driver. Besides, the webcam driver uses libusb to communicate with the webcam which uses the low-level linux calls anyway.

    Here's an example config with a webcam for you:
    Code:
    <?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
    <Robot type="FirstInspires-FTC">
        <Webcam name="Webcam 1" serialNumber="03FA436F" />
    </Robot>

    Comment


    • #3
      Thanks much for that. With the xml added to the config file and the serial number modified to match our webcam, still no luck. RC reports "Webcam 1" is "not attached", and, when the code is run, it fails to attach. Thus, still looking for ideas...wondering if that USB Class code issue might be involved (e.g. Are the FTC libraries relying on the device USB class code to be 14 in places other than device_filter.xml?)

      Comment


      • #4
        I do not know how to fix the problem. However, as a workaround, you may want to try plugging in the webcam before starting the RC app. Sometimes this works for us when we are having similar problems.

        Comment


        • #5
          Thanks. We have tried a number of different

          Comment


          • #6
            Hmmm...odd truncation on last post. Anyways...

            We have tried a number of different power on sequences including powering and connecting all USB devices and the USB host before connecting the phone and starting the RC app. No luck.

            Comment


            • #7
              Connect the Logitech webcam directly to RC phone and test with a webcam app. Then try connecting webcam to RC phone through a different USB hub.

              Comment


              • #8

                New results...still no luck:
                - Confirmed USB OTG enabled in Android (even though I suspect its not needed here)
                - Tried using CameraFi to directly connect from phone to webcam. CameraFi can't see the webcam.
                - Tried a different usb hub (non-powered this time), same results as previous hub.

                A couple of other details:
                - Android 6.0.1
                - FTC SDK 4.3 (lib version 18.10.31)

                Given that "USB Device Info" can detect the logitech webcam on the usb bus by digging around in Linux, I'm still thinking this is a config issue of some kind. However, that USB Device class of USB Class of 239 (which is "misc") instead of 14 (which is "video") makes me wonder if the camera itself is "bad" in that it is reporting the wrong device class?

                If someone reading this happens to have a logitech c310 webcam and the willingness to use an android app that can inspect the USB bus (like USB Device Info), I would be very interested to know what USB Device Class is reported for your c310, or any USB webcam connected to your phone for that matter...

                Other ideas also much appreciated...

                Comment


                • #9
                  UPDATE: Ordered a new logitech c920pro and everything is working great. Apparently the c310 was either defective or there is some more subtle issue. When we get some time, we'll see what we can find out and report back here. thanks again for the help.

                  Comment

                  Working...
                  X