Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse
Brand Logo

ModalAI Forum

  1. ModalAI Support Forum
  2. VOXL Compute & Autopilot
  3. VOXL Flight
  4. USB tethering with VOXL

USB tethering with VOXL

Scheduled Pinned Locked Moved VOXL Flight
9 Posts 3 Posters 2.7k Views 2 Watching
  • 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.
  • S Offline
    S Offline
    skl1g14
    Contributor
    wrote on last edited by
    #1

    Hi,

    I have been following this thread https://forum.modalai.com/topic/851/rndis-connection?_=1704780402514.

    I have a Jetson nano and a Voxl flight deck with the base Linux Yocto Jethro with 3.18 kernel System Image but my jetson nano does not have any Ethernet port and wireless adapter.
    I was planning to reverse USB tether so that the network from voxl can extend to the jetson nano.

    By default, the jetson nano have a usb0 virtual Ethernet interface and I verify it by connecting my PC (host) and jetson nano (device).
    https://jetbot.org/master/software_setup/wifi_setup.html.

    However, there is no interface when i try to connect my voxl (host) to jetson nano (device).
    From the guide, https://docs.modalai.com/voxl-as-usb-host , i suspect it is my OTG cable being incompatible.

    With that, i am considering setting up rndis for the voxl flight such that i can do jetson nano (host) and voxl (device) instead.
    Is there a guide on how to do so? Or will it be less pain to just get different cables and retry.

    ModeratorM 1 Reply Last reply
    0
    • S skl1g14

      Hi,

      I have been following this thread https://forum.modalai.com/topic/851/rndis-connection?_=1704780402514.

      I have a Jetson nano and a Voxl flight deck with the base Linux Yocto Jethro with 3.18 kernel System Image but my jetson nano does not have any Ethernet port and wireless adapter.
      I was planning to reverse USB tether so that the network from voxl can extend to the jetson nano.

      By default, the jetson nano have a usb0 virtual Ethernet interface and I verify it by connecting my PC (host) and jetson nano (device).
      https://jetbot.org/master/software_setup/wifi_setup.html.

      However, there is no interface when i try to connect my voxl (host) to jetson nano (device).
      From the guide, https://docs.modalai.com/voxl-as-usb-host , i suspect it is my OTG cable being incompatible.

      With that, i am considering setting up rndis for the voxl flight such that i can do jetson nano (host) and voxl (device) instead.
      Is there a guide on how to do so? Or will it be less pain to just get different cables and retry.

      ModeratorM Offline
      ModeratorM Offline
      Moderator
      ModalAI Team
      wrote on last edited by
      #2

      @skl1g14 it might be easier to just use a UART between the two?

      S 1 Reply Last reply
      0
      • ModeratorM Moderator

        @skl1g14 it might be easier to just use a UART between the two?

        S Offline
        S Offline
        skl1g14
        Contributor
        wrote on last edited by
        #3

        Dear @Moderator,

        That is true but we are expecting a data rate much higher than what UART is able to provide.

        Alex KushleyevA 1 Reply Last reply
        0
        • S skl1g14

          Dear @Moderator,

          That is true but we are expecting a data rate much higher than what UART is able to provide.

          Alex KushleyevA Offline
          Alex KushleyevA Offline
          Alex Kushleyev
          ModalAI Team
          wrote on last edited by
          #4

          @skl1g14 , can you please confirm that you are using VOXL1 or VOXL2?

          S 1 Reply Last reply
          0
          • Alex KushleyevA Alex Kushleyev

            @skl1g14 , can you please confirm that you are using VOXL1 or VOXL2?

            S Offline
            S Offline
            skl1g14
            Contributor
            wrote on last edited by
            #5

            @Alex-Kushleyev
            voxl1

            Alex KushleyevA 1 Reply Last reply
            0
            • S skl1g14

              @Alex-Kushleyev
              voxl1

              Alex KushleyevA Offline
              Alex KushleyevA Offline
              Alex Kushleyev
              ModalAI Team
              wrote on last edited by
              #6

              @skl1g14 , thank you for confirming

              Yes if you would like to use VOXL1 as host via OTG connector, you need to have a special cable.

              A few other options:

              • since VOXL1 has on-board wifi, can you just plug in a wifi dongle into your Jetson Nano (VOXL1 can be a wifi AP or station)
                • this seems like the option requiring least amount of adapters!
              • using USB expander board (https://docs.modalai.com/usb-to-ethernet-with-voxl/) you could add USB-to-ethernet adapter to VOXL and plug in another USB-ethernet adapter into Jetson Nano .. and connect it all together using an ethernet cable.. too many adapters though!

              I don't think we ever tried to do USB tethering with VOXL. That would also require enabling a usb gadget kernel module : https://linuxlink.timesys.com/docs/wiki/engineering/HOWTO_Use_USB_Gadget_Ethernet

              S 1 Reply Last reply
              0
              • Alex KushleyevA Alex Kushleyev

                @skl1g14 , thank you for confirming

                Yes if you would like to use VOXL1 as host via OTG connector, you need to have a special cable.

                A few other options:

                • since VOXL1 has on-board wifi, can you just plug in a wifi dongle into your Jetson Nano (VOXL1 can be a wifi AP or station)
                  • this seems like the option requiring least amount of adapters!
                • using USB expander board (https://docs.modalai.com/usb-to-ethernet-with-voxl/) you could add USB-to-ethernet adapter to VOXL and plug in another USB-ethernet adapter into Jetson Nano .. and connect it all together using an ethernet cable.. too many adapters though!

                I don't think we ever tried to do USB tethering with VOXL. That would also require enabling a usb gadget kernel module : https://linuxlink.timesys.com/docs/wiki/engineering/HOWTO_Use_USB_Gadget_Ethernet

                S Offline
                S Offline
                skl1g14
                Contributor
                wrote on last edited by
                #7

                @Alex-Kushleyev

                Hi Alex, thanks for the quick response.
                For now we are going option A with a wifi adapter. That works well.

                In the meantime I am moving on to other stuff.
                I tried recompiling the kernel with https://gitlab.com/voxl-public/system-image-build/meta-voxl/-/tree/master?ref_type=heads enabling the usb_gadget flag but no luck so far.
                Apparently yocto does not have a simple way to just "make menuconfig"

                Will keep this post updated if i manage to get it.

                S 1 Reply Last reply
                0
                • S skl1g14

                  @Alex-Kushleyev

                  Hi Alex, thanks for the quick response.
                  For now we are going option A with a wifi adapter. That works well.

                  In the meantime I am moving on to other stuff.
                  I tried recompiling the kernel with https://gitlab.com/voxl-public/system-image-build/meta-voxl/-/tree/master?ref_type=heads enabling the usb_gadget flag but no luck so far.
                  Apparently yocto does not have a simple way to just "make menuconfig"

                  Will keep this post updated if i manage to get it.

                  S Offline
                  S Offline
                  skl1g14
                  Contributor
                  wrote on last edited by
                  #8

                  Here is the hack if anyone needs it.

                  The latest platform image have the RNDIS host flag set. https://gitlab.com/voxl-public/system-image-build/meta-voxl/-/blob/master/recipes-kernel/linux-quic/files/enable_RNDIS_HOST.cfg?ref_type=heads

                  1. First step is to get a compatible OTG cable. I got an off-brand one that works. Run dmesg -wH on your jetson carrier board. If there are the usb0/rndis0/l4tbr0 means the connection is solid.
                    8ccd6bd4-54ac-4b90-af91-7c199e23b565-image.png

                  2. In voxl, save the following script somewhere. /home/root/usb_tethering.sh is a good choice.

                  #!/bin/bash
                  
                  # Enable IP forwarding
                  echo 1 > /proc/sys/net/ipv4/ip_forward
                  
                  # Bring up usb0 interface
                  ifconfig usb0 up
                  
                  # Assign IP address to usb0
                  ifconfig usb0 192.168.55.2 netmask 255.255.255.0
                  
                  # Add route for USB network
                  route add -net 192.168.55.0 netmask 255.255.255.0 dev usb0
                  
                  # Set up iptables rules for NAT
                  iptables -A FORWARD -o wlan0 -i usb0 -s 192.168.55.0/24 -m conntrack --ctstate NEW -j ACCEPT
                  iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
                  iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
                  
                  1. Make it persistent by creating a systemd service. Save it at /etc/systemd/system/tethering.service
                  [Unit]
                  Description=USB Tethering Service
                  After=network.target
                  
                  [Service]
                  Type=simple
                  ExecStart=/home/root/usb_tethering.sh
                  
                  [Install]
                  WantedBy=default.target
                  
                  1. Run the following
                  sudo systemctl daemon-reload
                  sudo systemctl enable tethering.service
                  
                  1. Check with ifconfig on voxl (should have a static addr 192.168.55.2 for usb0 interface)
                    7f3df687-cb2b-4e84-b657-15965453d5d0-image.png

                  2. Check with ifconfig on jetson carrier board (the l4tbr0 default addr should be 192.168.55.1)
                    e36c7c92-a5ac-4813-a6ba-6873d993a456-image.png

                  3. Try pinging each other (optional)

                  4. In voxl, set to station mode and connect to a access point. For jetson carrier board, check if it is possible to connect to a public web.

                  ping google.com
                  

                  8d2deb76-5669-4746-878a-84c54e39394e-image.png

                  • In jetson, the dns nameserver for the l4tbr0 interface may need to change to 8.8.8.8.
                    Check with
                  systemd-resolve --status
                  
                  • Alternatively, change globally by modifying the nameserver address to 8.8.8.8 at /etc/resolv.conf

                  Bandwidth ~ 265 Mbps which should be expected from a usb2.0 controller (max 480 Mbps) and the overhead from the interfaces.
                  5090762d-76b9-47f3-9d81-a24e2e3e7af6-image.png
                  20a2f942-8713-4007-b7cd-709ece27b3bd-image.png

                  Alex KushleyevA 1 Reply Last reply
                  0
                  • S skl1g14

                    Here is the hack if anyone needs it.

                    The latest platform image have the RNDIS host flag set. https://gitlab.com/voxl-public/system-image-build/meta-voxl/-/blob/master/recipes-kernel/linux-quic/files/enable_RNDIS_HOST.cfg?ref_type=heads

                    1. First step is to get a compatible OTG cable. I got an off-brand one that works. Run dmesg -wH on your jetson carrier board. If there are the usb0/rndis0/l4tbr0 means the connection is solid.
                      8ccd6bd4-54ac-4b90-af91-7c199e23b565-image.png

                    2. In voxl, save the following script somewhere. /home/root/usb_tethering.sh is a good choice.

                    #!/bin/bash
                    
                    # Enable IP forwarding
                    echo 1 > /proc/sys/net/ipv4/ip_forward
                    
                    # Bring up usb0 interface
                    ifconfig usb0 up
                    
                    # Assign IP address to usb0
                    ifconfig usb0 192.168.55.2 netmask 255.255.255.0
                    
                    # Add route for USB network
                    route add -net 192.168.55.0 netmask 255.255.255.0 dev usb0
                    
                    # Set up iptables rules for NAT
                    iptables -A FORWARD -o wlan0 -i usb0 -s 192.168.55.0/24 -m conntrack --ctstate NEW -j ACCEPT
                    iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
                    iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
                    
                    1. Make it persistent by creating a systemd service. Save it at /etc/systemd/system/tethering.service
                    [Unit]
                    Description=USB Tethering Service
                    After=network.target
                    
                    [Service]
                    Type=simple
                    ExecStart=/home/root/usb_tethering.sh
                    
                    [Install]
                    WantedBy=default.target
                    
                    1. Run the following
                    sudo systemctl daemon-reload
                    sudo systemctl enable tethering.service
                    
                    1. Check with ifconfig on voxl (should have a static addr 192.168.55.2 for usb0 interface)
                      7f3df687-cb2b-4e84-b657-15965453d5d0-image.png

                    2. Check with ifconfig on jetson carrier board (the l4tbr0 default addr should be 192.168.55.1)
                      e36c7c92-a5ac-4813-a6ba-6873d993a456-image.png

                    3. Try pinging each other (optional)

                    4. In voxl, set to station mode and connect to a access point. For jetson carrier board, check if it is possible to connect to a public web.

                    ping google.com
                    

                    8d2deb76-5669-4746-878a-84c54e39394e-image.png

                    • In jetson, the dns nameserver for the l4tbr0 interface may need to change to 8.8.8.8.
                      Check with
                    systemd-resolve --status
                    
                    • Alternatively, change globally by modifying the nameserver address to 8.8.8.8 at /etc/resolv.conf

                    Bandwidth ~ 265 Mbps which should be expected from a usb2.0 controller (max 480 Mbps) and the overhead from the interfaces.
                    5090762d-76b9-47f3-9d81-a24e2e3e7af6-image.png
                    20a2f942-8713-4007-b7cd-709ece27b3bd-image.png

                    Alex KushleyevA Offline
                    Alex KushleyevA Offline
                    Alex Kushleyev
                    ModalAI Team
                    wrote on last edited by
                    #9

                    @skl1g14 , very nice!! Thank you for documenting your configuration and results!!

                    1 Reply Last reply
                    0

                    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                    With your input, this post could be even better 💗

                    Register Login
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    ModalAI
                    Categories Recent Tags ModalAI.com Docs
                    © 2026 ModalAI® · Accelerating autonomy for smaller, smarter, safer drones · Powered by NodeBB
                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups