ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    USB Gadget ConfigFS in VOXL

    Ask your questions right here!
    3
    9
    490
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Thomas MacNamaraT
      Thomas MacNamara
      last edited by

      I am trying to get the VOXL dev board to act as a HID device.

      I am trying to use the USB gadget feature of ConfigFS.

      As far as I can tell it doesn't look like the yocto build has this compiled in the Kernel.

      I was just wondering if I have missed something or I should look into the VOXL Open Source Kernel Build

      1 Reply Last reply Reply Quote 0
      • modaltbM
        modaltb ModalAI Team
        last edited by

        Hi @Thomas-MacNamara ,

        You're likely correct (not enabled). Let me double check our flags, and also what limitations you'd hit with the open source kernel build if any (where you could modify what you needed).

        1 Reply Last reply Reply Quote 0
        • Thomas MacNamaraT
          Thomas MacNamara
          last edited by

          Thanks mate that would be greatly appreciated!

          1 Reply Last reply Reply Quote 0
          • modaltbM
            modaltb ModalAI Team
            last edited by

            Hey @Thomas-MacNamara,

            Sorry for the lag, I'm new to the USB gadget, but here's some flags found on VOXL from our standard kernel, from adb shell zcat /proc/config.gz

            # CONFIG_USB_DWC3_GADGET is not set
            CONFIG_USB_GADGET=y
            # CONFIG_USB_GADGET_DEBUG is not set
            CONFIG_USB_GADGET_DEBUG_FILES=y
            CONFIG_USB_GADGET_DEBUG_FS=y
            CONFIG_USB_GADGET_VBUS_DRAW=500
            CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=4
            # CONFIG_USB_GADGET_XILINX is not set
            # CONFIG_USB_GADGETFS is not set
            # CONFIG_USB_MIDI_GADGET is not set
            

            I'm guessing the actually functionality isn't there though?

            Thomas MacNamaraT 1 Reply Last reply Reply Quote 0
            • Thomas MacNamaraT
              Thomas MacNamara @modaltb
              last edited by

              @modaltb I will have a look now.

              1 Reply Last reply Reply Quote 0
              • modaltbM
                modaltb ModalAI Team
                last edited by

                Just confirmed with a colleague that you should get the same functionality level as our 'normal' kernel.

                1 Reply Last reply Reply Quote 0
                • Thomas MacNamaraT
                  Thomas MacNamara
                  last edited by

                  Sorry for the lag here, it took a while to get everything building (and we had a COVID lockdown as well (Australia (Queensland (It worked, no local covid) ) ) )

                  I have been poking around in the build scripts but to be honest this is massively out of my wheelhouse, I'm primarily a VR and Robotics developer not a Linux wizard.

                  I just can't quite work out where i would need to add the flags to have GADGETFS and the HID GADGET stuff compiled into the image.

                  I have tryied a few time but to be honist the whole build pipeline is systems built upon systems and the main documentation for Linux is just "use menuconfig and type make and WHABAM you get Linux"

                  I know this usecase is WAY outside the norm but i figured I would at least ask 🙂

                  1 Reply Last reply Reply Quote 0
                  • Eric KatzfeyE
                    Eric Katzfey ModalAI Team
                    last edited by

                    Yes, the build environment is quite complex. The environment is Yocto and there is a concept of "layers" that are combined to make the full build. We have our own layer in the build where we add all of these kinds of kernel flags. The layer is the project https://gitlab.com/voxl-public/system-image-build/meta-voxl. In there you will find examples in https://gitlab.com/voxl-public/system-image-build/meta-voxl/-/blob/master/recipes-kernel/linux-quic/linux-quic_git.bbappend. That file includes a bunch of cfg files from the files sub-directory that include the actual flags. You can just add your flags to any of those cfg files or create your own.

                    1 Reply Last reply Reply Quote 0
                    • Thomas MacNamaraT
                      Thomas MacNamara
                      last edited by

                      After no small amount of playing around and Googling I think I have hit the wall.

                      If I set them as = y then the build won't boot when deployed through fastboot if I set them as =m then they just stay as unset

                      # CONFIG_USB_CONFIGFS is not set
                      # CONFIG_USB_GADGETFS is not set
                      

                      I did check to see if the WIFI was running on the failed boots just incase the change was breaking ADB but it seems the build just does not like those flags.

                      It is so frustrating to know the hardware is there and the implementation is possible (Rasberry-pi HID is pritty dang easy).
                      Especially seeing as the underwater stuff is working.

                      The non USB solution is just to go via ethernet but that is just a lot of things being bolted on to the poor thing.

                      Thanks for the help though.

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post
                      Powered by NodeBB | Contributors