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

    Utilize USB-C for Bulk Storage USB Device

    VOXL 2 IO
    3
    7
    486
    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.
    • Nathan SizemoreN
      Nathan Sizemore
      last edited by

      I've got a VOXL2, and I need a way to enable it to act as USB Device Mode as bulk storage. Currently have been trying to setup RNDIS, but it is failing when attaching the RNDIS function.

      Is it possible to utilize the USB-C connection used for adb and configure it as a USB bulk storage device?

      This is the setup script I am working against. It is failing here:

      func=functions/rndis.usb0
      mkdir -p "${func}"
      
      + mkdir functions/rndis.usb0
      mkdir: cannot create directory ‘functions/rndis.usb0’: No such file or directory
      
      1 Reply Last reply Reply Quote 0
      • Chad SweetC
        Chad Sweet ModalAI Team
        last edited by

        We don't know how to do this immediately, but we'll dig some and see if we can get anywhere.

        Nathan SizemoreN 1 Reply Last reply Reply Quote 0
        • Nathan SizemoreN
          Nathan Sizemore @Chad Sweet
          last edited by

          @Chad-Sweet Awesome, thank you!

          1 Reply Last reply Reply Quote 0
          • Chad SweetC
            Chad Sweet ModalAI Team
            last edited by

            We have dug into this a bit more, but have not had a chance to try anything. Passing along information in case you want to dig in more

            Note: please be comfortable reflashing a bricked VOXL 2. Changing USB composition could definitely put the board into a state you cannot access it any longer

            Default USB Composition:
            901D - DIAG + ADB

            USB Composition with Mass Storage:
            902B - RNDIS + ADB + Mass Storage
            90AD - DIAG + ADB + MODEM + NMEA + QMI_RMNET + Mass Storage + DPL
            90B0 - DIAG + DUN + NMEA + RMNET + Mass Storage + DPL
            F000 - Mass Storage

            The setting is configured in /sbin/start_usb

            That script though is confusing and we're not really sure which lines are taking effect and what is the right way to set USB composition.

            1 Reply Last reply Reply Quote 0
            • Nathan SizemoreN
              Nathan Sizemore
              last edited by

              No worries, and yeah I've already qdl'd a few things tickering around with trying to get it to work, so comfortable with taking it from bricked to workable is a process I'm comfortable with.

              That bash script is a bit more universal based on a few things, but essentially it is ran on boot and sets up bulk + rndis on a device, and then starts up a little C program as the ffs driver. It's for NVIDIA Tegra, but should be universal as long as the kernel has the modules it needs.

              I didn't know where the usb boot startup stuff on the VOXL2 was, but I'll poke around a bit with that and see if I can get that to work.

              Thanks,

              • Nate
              1 Reply Last reply Reply Quote 0
              • Nathan SizemoreN
                Nathan Sizemore
                last edited by

                @Chad-Sweet
                Following up, the USB-C connector is sending out 5v on VBUS. Is there anyway to turn this off?

                VinnyV 1 Reply Last reply Reply Quote 0
                • VinnyV
                  Vinny ModalAI Team @Nathan Sizemore
                  last edited by

                  Hi @Nathan-Sizemore
                  No, that is a behavior we know about, but does not impact peripheral mode (due to a diode "OR" inside the circuits).
                  We are taken steps to change this behavior on future designs to allow full OTG support.
                  However, Voxl2 M0054 does not have that, and can only function as device/peripheral on that port.
                  When a PC/Host plugs in, the VBUS from that host is then detected by the Power Mgmt ICs (PMICs) to enable proper peripheral mode. We know that this behavior of VBUS is not ideal, but as just mentioned we will improve it later.

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