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

ModalAI Forum

  1. ModalAI Support Forum
  2. Ask your questions right here!
  3. Voxl 2 Mini Static IP

Voxl 2 Mini Static IP

Scheduled Pinned Locked Moved Ask your questions right here!
11 Posts 3 Posters 2.6k Views
  • 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.
  • B bendraper

    Link Preview Image
    VOXL 2 Mini Shell Access

    ModalAI technical documentation for VOXL and VOXL 2 Companion Computers for PX4 and ArduPilot Obstacle Avoidance and GPS-denied navigation, assembled in the USA

    favicon

    ModalAI Technical Docs (docs.modalai.com)

    The bottom of this doc says "If using wired ethernet, set up a static IP address." but I've tried doing ifconfig eth0 ~ip address~ netmask ~subnet~ to no avail. I've also tried ip addr add xxx.xxx.xxx.xxx/yy dev eth0 to no avail (always sets ip to 169.254.4.1). I know the Voxl 2 wasn't able to have a static ip set so if it is the same for the mini then so be it, the doc just made it seem like it may be possible so I was just curious

    wilkinsafW Offline
    wilkinsafW Offline
    wilkinsaf
    ModalAI Team
    wrote on last edited by
    #2

    @bendraper It is possible to set a static ip on both the voxl2 and voxl2 mini.

    It is just ubuntu OS. What modem/router are you connecting to?

    B 1 Reply Last reply
    0
    • wilkinsafW wilkinsaf

      @bendraper It is possible to set a static ip on both the voxl2 and voxl2 mini.

      It is just ubuntu OS. What modem/router are you connecting to?

      B Offline
      B Offline
      bendraper
      Regular
      wrote on last edited by
      #3

      @wilkinsaf I was just connecting to my laptop for now. Laptop set with a static IP

      wilkinsafW 1 Reply Last reply
      0
      • B bendraper

        @wilkinsaf I was just connecting to my laptop for now. Laptop set with a static IP

        wilkinsafW Offline
        wilkinsafW Offline
        wilkinsaf
        ModalAI Team
        wrote on last edited by
        #4

        @bendraper

        Here is what one of my guys uses

        ip addr flush dev eth0
        ip link set dev eth0 up
        ip addr add 192.168.1.100/255.255.255.0 dev eth0
        
        wilkinsafW 1 Reply Last reply
        0
        • wilkinsafW wilkinsaf

          @bendraper

          Here is what one of my guys uses

          ip addr flush dev eth0
          ip link set dev eth0 up
          ip addr add 192.168.1.100/255.255.255.0 dev eth0
          
          wilkinsafW Offline
          wilkinsafW Offline
          wilkinsaf
          ModalAI Team
          wrote on last edited by
          #5

          i would make sure that the ethernet is the only thing connected that is supplying network connectivity. (no modem, 4g/5g hat, etc...)
          otherwise you willl need to do some extra configuration with voxl-modem

          B 3 Replies Last reply
          0
          • wilkinsafW wilkinsaf

            i would make sure that the ethernet is the only thing connected that is supplying network connectivity. (no modem, 4g/5g hat, etc...)
            otherwise you willl need to do some extra configuration with voxl-modem

            B Offline
            B Offline
            bendraper
            Regular
            wrote on last edited by
            #6

            @wilkinsaf This worked! Thank you

            1 Reply Last reply
            0
            • wilkinsafW wilkinsaf

              i would make sure that the ethernet is the only thing connected that is supplying network connectivity. (no modem, 4g/5g hat, etc...)
              otherwise you willl need to do some extra configuration with voxl-modem

              B Offline
              B Offline
              bendraper
              Regular
              wrote on last edited by
              #7

              @wilkinsaf Actually it seems these settings don't stick after rebooting the voxl... Any ideas?

              1 Reply Last reply
              0
              • wilkinsafW wilkinsaf

                i would make sure that the ethernet is the only thing connected that is supplying network connectivity. (no modem, 4g/5g hat, etc...)
                otherwise you willl need to do some extra configuration with voxl-modem

                B Offline
                B Offline
                bendraper
                Regular
                wrote on last edited by
                #8

                @wilkinsaf google seems to suggest changing a /etc/network/interfaces file may do the trick but this file does not exist in the voxl filesystem

                wilkinsafW blueB 2 Replies Last reply
                0
                • B bendraper

                  @wilkinsaf google seems to suggest changing a /etc/network/interfaces file may do the trick but this file does not exist in the voxl filesystem

                  wilkinsafW Offline
                  wilkinsafW Offline
                  wilkinsaf
                  ModalAI Team
                  wrote on last edited by
                  #9

                  @bendraper

                  If you make a script to do this, you might want to make it monitor eth0 state so if eth0 goes down and back up, the IP doesn't get removed.
                  Here's a bash example of what I do to check the IP address of ethernet and put it back if it goes down and back up

                  while true
                  do  
                     if [[ -e "/sys/class/net/$eth_dongle_interface" ]]; then
                           eth_dongle_ip=$(ip -4 addr show $eth_dongle_interface | grep -oP '(?<=inet\s)\d+(\.\d+){3}' | head -1)
                     else
                           eth_dongle_ip=""
                     fi
                  
                     if [[ "$eth_dongle_ip" != *"$ETHERNET_IP"* &&  -e "/sys/class/net/$eth_dongle_interface" ]]; then
                                  echo "setting IP address to: $ETHERNET_IP"
                                  ip addr flush dev $eth_dongle_interface
                                  sleep 1
                                  ip link set dev $eth_dongle_interface up
                                  sleep 1
                                  ip addr add $ETHERNET_IP/255.255.255.0 dev $eth_dongle_interface
                      fi
                      sleep 1
                  done
                  

                  Of course, this is in my modified voxl-modem with custom variables for the interface (eth0 or eth1) and variables for the IP address. You might just want to hard code those when testing.

                  1 Reply Last reply
                  0
                  • B bendraper

                    @wilkinsaf google seems to suggest changing a /etc/network/interfaces file may do the trick but this file does not exist in the voxl filesystem

                    blueB Offline
                    blueB Offline
                    blue
                    wrote on last edited by
                    #10

                    @tom @wilkinsaf @Moderator I am hoping you can help shed some light on an issue with setting up the VOXL2 Mini with a static IP. I have seen mention of utilizing a customized version of voxl-modem for a static IP so perhaps I am missing something but I have tried every approach to setting a static IP and more than I have ever used with no avail. It seems there is a service that is enabled by default to clear the IP address of the VOXL2 Mini and messes with the routing of the eth0 interface because anything I implement does not function properly. I must be missing something here if you would please enlighten me 🙂

                    Goal:
                    Set a persistent static IP on VOXL2 Mini that is maintained after reboots and during operation, then access the VOXL2 Mini with an ssh connection via a Ethernet to USB adapter.

                    Overview of Approaches:
                    -Approach #1: Does NOT Work- Use commands to flush and wipe the eth0 interface and set a new IP as shown below. This works temporarily but is overwritten typically within 30 seconds while running. After a reboot, the IP address defaults back to 169.254.4.1 and VOXL2 Mini cannot be accessed via ssh on eth0.

                    -Approach #2: Does NOT Work- Use system.d file to set eth0 interface with a new IP as shown below. This works temporarily but is overwritten typically within 30 seconds while running. After a reboot, the IP address defaults back to 169.254.4.1 and VOXL2 Mini cannot be accessed via ssh on eth0.

                    -Approach #3: Does NOT Work- Use bash script to constantly check and set the IP. This works to set the IP but the VOXL2 Mini cannot be accessed via ssh on eth0.


                    Approach #1
                    Steps to Reproduce:

                    1. adb into VOXL2 Mini
                    2. Run:
                    ip addr flush dev eth0
                    ip link set dev eth0 up
                    ip addr add 192.168.1.100/255.255.255.0 dev eth0 
                    ifconfig
                    
                    1. Wait 2 minutes and run:
                    ifconfig
                    

                    Actual Result:
                    -IP address changes back to 169.254.4.1.
                    -Device no longer available via ssh on eth0 at 169.254.4.1.

                    Expected Result:
                    -IP should not change after being set.


                    Approach #2
                    Steps to Reproduce:

                    1. adb into VOXL2 Mini
                    2. Run: sudo mkdir -p /etc/systemd/network
                    3. Run: sudo vi /etc/systemd/network/10-eth0-static.network
                    4. Add the following to the file created above:
                    [Match]
                    Name=eth0
                    
                    [Network]
                    Address=192.169.144.15/24
                    Gateway=192.169.144.1
                    DNS=8.8.8.8
                    
                    1. Run:
                    sudo systemctl restart systemd-networkd
                    sudo systemctl enable systemd-networkd
                    ip addr show eth0
                    sudo systemctl status systemd-networkd
                    
                    1. Wait 2 minutes and run:
                    ifconfig
                    

                    Actual Result:
                    -IP address changes back to 169.254.4.1.
                    -Device no longer available via ssh on eth0 at 169.254.4.1.

                    Expected Result:
                    -IP should not change from 192.169.144.15 after being set.


                    Approach #3
                    Steps to Reproduce:

                    1. adb into VOXL2 Mini
                    2. Run:
                      vi /usr/local/bin/set-eth-dongle-ip.sh
                    3. Add the following to the file created above:
                    #!/bin/bash
                    
                    eth_dongle_interface="eth0" # Replace with your dongle interface name
                    ETHERNET_IP="192.168.144.15" # Replace with your desired IP address
                    BROADCAST_IP="192.168.144.255" # Replace with the correct broadcast address
                    
                    while true; do
                        if [[ -e "/sys/class/net/$eth_dongle_interface" ]]; then
                            eth_dongle_ip=$(ip -4 addr show $eth_dongle_interface | grep -oP '(?<=inet\s)\d+(\.\d+){3}' | head -1)
                        else
                            eth_dongle_ip=""
                        fi
                    
                        if [[ "$eth_dongle_ip" != "$ETHERNET_IP" && -e "/sys/class/net/$eth_dongle_interface" ]]; then
                            echo "Setting IP address to: $ETHERNET_IP"
                            ip addr flush dev $eth_dongle_interface
                            sleep 1
                            ip link set dev $eth_dongle_interface up
                            sleep 1
                            ip addr add $ETHERNET_IP/24 broadcast $BROADCAST_IP dev $eth_dongle_interface
                        fi
                        sleep 1
                    done
                    
                    1. make service file executeable, run:
                      sudo chmod +x /usr/local/bin/set-eth-dongle-ip.sh
                    2. create systemd service file, run:
                      vi etc/systemd/system/set-eth-dongle-ip.service
                    3. Add the following to the file created above:
                    [Unit]
                    Description=Set Ethernet Dongle IP Address
                    After=network.target
                    
                    [Service]
                    ExecStart=/usr/local/bin/set-eth-dongle-ip.sh
                    Restart=always
                    User=root
                    
                    [Install]
                    WantedBy=multi-user.target
                    
                    1. Run:
                    #reload the systemd daemon to recognize the new service 
                    sudo systemctl daemon-reload
                    
                    # enable the service so that it runs on boot
                    sudo systemctl enable set-eth-dongle-ip.service
                    
                    # start service immediately
                    sudo systemctl start set-eth-dongle-ip.service
                    
                    # verify service has started properly
                    sudo systemctl status set-eth-dongle-ip.service
                    
                    1. Wait 2 minutes and run:
                    ifconfig
                    

                    Actual Result:
                    -IP address changes back to 169.254.4.1.
                    -Device no longer available via ssh on eth0 at 169.254.4.1.

                    Expected Result:
                    IP should not change from 192.169.144.15 after being set.

                    Thank you,

                    Aaron

                    blueB 1 Reply Last reply
                    0
                    • blueB blue

                      @tom @wilkinsaf @Moderator I am hoping you can help shed some light on an issue with setting up the VOXL2 Mini with a static IP. I have seen mention of utilizing a customized version of voxl-modem for a static IP so perhaps I am missing something but I have tried every approach to setting a static IP and more than I have ever used with no avail. It seems there is a service that is enabled by default to clear the IP address of the VOXL2 Mini and messes with the routing of the eth0 interface because anything I implement does not function properly. I must be missing something here if you would please enlighten me 🙂

                      Goal:
                      Set a persistent static IP on VOXL2 Mini that is maintained after reboots and during operation, then access the VOXL2 Mini with an ssh connection via a Ethernet to USB adapter.

                      Overview of Approaches:
                      -Approach #1: Does NOT Work- Use commands to flush and wipe the eth0 interface and set a new IP as shown below. This works temporarily but is overwritten typically within 30 seconds while running. After a reboot, the IP address defaults back to 169.254.4.1 and VOXL2 Mini cannot be accessed via ssh on eth0.

                      -Approach #2: Does NOT Work- Use system.d file to set eth0 interface with a new IP as shown below. This works temporarily but is overwritten typically within 30 seconds while running. After a reboot, the IP address defaults back to 169.254.4.1 and VOXL2 Mini cannot be accessed via ssh on eth0.

                      -Approach #3: Does NOT Work- Use bash script to constantly check and set the IP. This works to set the IP but the VOXL2 Mini cannot be accessed via ssh on eth0.


                      Approach #1
                      Steps to Reproduce:

                      1. adb into VOXL2 Mini
                      2. Run:
                      ip addr flush dev eth0
                      ip link set dev eth0 up
                      ip addr add 192.168.1.100/255.255.255.0 dev eth0 
                      ifconfig
                      
                      1. Wait 2 minutes and run:
                      ifconfig
                      

                      Actual Result:
                      -IP address changes back to 169.254.4.1.
                      -Device no longer available via ssh on eth0 at 169.254.4.1.

                      Expected Result:
                      -IP should not change after being set.


                      Approach #2
                      Steps to Reproduce:

                      1. adb into VOXL2 Mini
                      2. Run: sudo mkdir -p /etc/systemd/network
                      3. Run: sudo vi /etc/systemd/network/10-eth0-static.network
                      4. Add the following to the file created above:
                      [Match]
                      Name=eth0
                      
                      [Network]
                      Address=192.169.144.15/24
                      Gateway=192.169.144.1
                      DNS=8.8.8.8
                      
                      1. Run:
                      sudo systemctl restart systemd-networkd
                      sudo systemctl enable systemd-networkd
                      ip addr show eth0
                      sudo systemctl status systemd-networkd
                      
                      1. Wait 2 minutes and run:
                      ifconfig
                      

                      Actual Result:
                      -IP address changes back to 169.254.4.1.
                      -Device no longer available via ssh on eth0 at 169.254.4.1.

                      Expected Result:
                      -IP should not change from 192.169.144.15 after being set.


                      Approach #3
                      Steps to Reproduce:

                      1. adb into VOXL2 Mini
                      2. Run:
                        vi /usr/local/bin/set-eth-dongle-ip.sh
                      3. Add the following to the file created above:
                      #!/bin/bash
                      
                      eth_dongle_interface="eth0" # Replace with your dongle interface name
                      ETHERNET_IP="192.168.144.15" # Replace with your desired IP address
                      BROADCAST_IP="192.168.144.255" # Replace with the correct broadcast address
                      
                      while true; do
                          if [[ -e "/sys/class/net/$eth_dongle_interface" ]]; then
                              eth_dongle_ip=$(ip -4 addr show $eth_dongle_interface | grep -oP '(?<=inet\s)\d+(\.\d+){3}' | head -1)
                          else
                              eth_dongle_ip=""
                          fi
                      
                          if [[ "$eth_dongle_ip" != "$ETHERNET_IP" && -e "/sys/class/net/$eth_dongle_interface" ]]; then
                              echo "Setting IP address to: $ETHERNET_IP"
                              ip addr flush dev $eth_dongle_interface
                              sleep 1
                              ip link set dev $eth_dongle_interface up
                              sleep 1
                              ip addr add $ETHERNET_IP/24 broadcast $BROADCAST_IP dev $eth_dongle_interface
                          fi
                          sleep 1
                      done
                      
                      1. make service file executeable, run:
                        sudo chmod +x /usr/local/bin/set-eth-dongle-ip.sh
                      2. create systemd service file, run:
                        vi etc/systemd/system/set-eth-dongle-ip.service
                      3. Add the following to the file created above:
                      [Unit]
                      Description=Set Ethernet Dongle IP Address
                      After=network.target
                      
                      [Service]
                      ExecStart=/usr/local/bin/set-eth-dongle-ip.sh
                      Restart=always
                      User=root
                      
                      [Install]
                      WantedBy=multi-user.target
                      
                      1. Run:
                      #reload the systemd daemon to recognize the new service 
                      sudo systemctl daemon-reload
                      
                      # enable the service so that it runs on boot
                      sudo systemctl enable set-eth-dongle-ip.service
                      
                      # start service immediately
                      sudo systemctl start set-eth-dongle-ip.service
                      
                      # verify service has started properly
                      sudo systemctl status set-eth-dongle-ip.service
                      
                      1. Wait 2 minutes and run:
                      ifconfig
                      

                      Actual Result:
                      -IP address changes back to 169.254.4.1.
                      -Device no longer available via ssh on eth0 at 169.254.4.1.

                      Expected Result:
                      IP should not change from 192.169.144.15 after being set.

                      blueB Offline
                      blueB Offline
                      blue
                      wrote on last edited by
                      #11

                      After having some issues with a static IP on the VOXL2 Mini above it ended up being an issue with being on the wrong subnet for the host computer to communicate.

                      We ended up fixing the issue by changing the subnet for the host computer once we changed the IP on the VOXL2 Mini.

                      e.g VOXL2 Mini IP of 192.168.144.15 will require a host computer on the same subnet e.g. 192.168.144.98.

                      Thank you,

                      Aaron

                      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