ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Home
    2. Roberto
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 9
    • Best 0
    • Controversial 0
    • Groups 0

    Roberto

    @Roberto

    0
    Reputation
    2
    Profile views
    9
    Posts
    0
    Followers
    0
    Following
    Joined Last Online
    Website sky53.com

    Roberto Unfollow Follow

    Latest posts made by Roberto

    • RE: How to set up a static IP in RB5

      FINALLY SOLVED: Thanks to @tom
      (added chmod and complete procedure for other users)

      1. First create a script:
      vi /usr/bin/rb5-wifi-static-ip.sh 
      

      Content of rb5-wifi-static-ip.sh script (with sample IP):

      #!/bin/bash
      
      rb5_net='192.168'
      drone_IP='192.168.178.201'
      router_IP='192.168.178.1'
      netmask_IP='255.255.255.0'
      network_interface='wlan0'
      
      # wait for wlan to get it's initial IP from router
      rb5-net-check $network_interface $rb5_net
      
      # set new IP
      sudo ifconfig $network_interface $drone_IP netmask $netmask_IP
      sudo route add default gw $router_IP $network_interface
      
      1. Give permission to script (if not, will give you message "Permission denied"):
      chmod u+x /usr/bin/rb5-wifi-static-ip.sh
      
      1. Create a service:
      vi /etc/systemd/system/rb5-wifi-static-ip.service
      

      Content of rb5-wifi-static-ip.service file:

      [Unit]
      Description=WLAN0 Static IP Service
      After=wlan_daemon.service
      
      [Service]
      ExecStart=/usr/bin/rb5-wifi-static-ip.sh
      
      [Install]
      WantedBy=multi-user.target
      
      1. Enable this service when RB5 boots:
      systemctl enable rb5-wifi-static-ip.service
      

      Restart RB5 and you will have a static IP!

      posted in Qualcomm Flight RB5 5G Drone
      RobertoR
      Roberto
    • RE: How to set up a static IP in RB5

      @tom & @Eric-Katzfey

      List of services: (command to show active services)

      systemctl list-units --type=service
      

      Screenshot 2022-03-10 alle 17.56.18.png

      Some services are down like:
      ā— dnsmasq.service loaded failed failed dnsmasq - A lightweight DHCP and caching DNS server
      ā— lunch-make-scripts.service loaded failed failed lunch make scripts
      ā— mystatic-ip.service loaded failed failed My static IP

      Somebody could please help me?

      posted in Qualcomm Flight RB5 5G Drone
      RobertoR
      Roberto
    • RE: How to set up a static IP in RB5

      NOT RESOLVED šŸ˜– @Eric-Katzfey & @tom

      Works on Reboot but not if I turn RB5 OFF wait a wile and afterwards I turn it ON

      Sometimes work and sometimes doesn't

      Somebody could please help me?

      posted in Qualcomm Flight RB5 5G Drone
      RobertoR
      Roberto
    • RE: How to set up a static IP in RB5

      RESOLVED: Thanks to @Eric-Katzfey & @tom

      1. First create a script:
      vi /etc/sudoers.d/mystatic-ip.sh
      

      Content of mystatic-ip.sh script:

      #!/bin/bash
      sudo ifconfig wlan0 192.168.178.201 netmask 255.255.255.0
      sudo route add default gw 192.168.178.1 wlan0
      
      1. Create a service:
      vi /etc/systemd/system/mystatic-ip.service
      

      Content of mystatic-ip.service file (that starts after wlan daemon):

      [Unit]
      Description=My static IP
      After=wlan_daemon.service
      
      [Service]
      ExecStart=/etc/sudoers.d/mystatic-ip.sh start
      
      [Install]
      WantedBy=multi-user.target
      

      To enable this service when the RB5 boots:

      systemctl enable mystatic-ip
      

      Reboot and you will have a static IP!

      posted in Qualcomm Flight RB5 5G Drone
      RobertoR
      Roberto
    • RE: How to set up a static IP in RB5

      @Eric-Katzfey
      Thank you for help, what would you suggest? Perhaps a delay in the script or something similar?
      how do you suggest to do the startup log? and how could this sequence be organized correctly?
      Do you have a RB5 to test? Thank you for any help

      posted in Qualcomm Flight RB5 5G Drone
      RobertoR
      Roberto
    • RE: How to set up a static IP in RB5

      @tom
      Thank you for reply, yes If I run:

      sudo ifconfig wlan0 192.168.178.201 netmask 255.255.255.0
      sudo route add default gw 192.168.178.1 wlan0
      

      works, but if I restart RB5 the script does not do his work, perhaps a chmod is needed?

      posted in Qualcomm Flight RB5 5G Drone
      RobertoR
      Roberto
    • RE: How to set up a static IP in RB5

      @tom Thank you
      But perhaps i did something wrong creating a script:

      vi /etc/sudoers.d/mystatic-ip.sh
      

      Content of mystatic-ip.sh file:

      #!/bin/bash
      sudo ifconfig wlan0 192.168.178.201 netmask 255.255.255.0
      sudo route add default gw 192.168.178.1 wlan0
      

      Then i created a service:

      vi /etc/systemd/system/mystatic-ip.service
      

      Content of mystatic-ip.service file:

      [Unit]
      Description=My static IP
      
      [Service]
      ExecStart=/etc/sudoers.D/mystatic-ip.sh start
      
      [Install]
      WantedBy=multi-user.target
      

      To enable this service when startup I did:

      systemctl enable mystatic-ip
      

      I don't know what I did wrong. Could you please help me?
      Robert

      posted in Qualcomm Flight RB5 5G Drone
      RobertoR
      Roberto
    • How to set up a static IP in RB5

      I would like to set a static IP.
      I thought that maybe in UBUNTU you could set it as follows:

      sudo vi /etc/dhcpcd.conf
      

      I tried with the WiFi network wlan0 and set an IP compatible with my network: 192.168.178.201

      # on the server to actually work
      option rapid_commit
      
      # A list of options to request from the DHCP server
      option domain_name_servers, domain_name, domain_search, host_name
      option classless_static_routes
      # Most distributions have NTP support.
      option ntp_servers
      # Respect the network MTU. This is applied to DHCP routes.
      option interface_mtu
      
      # A ServerID is required by RFC2131.
      require dhcp_server_identifier
      
      # Generate Stable Private IPv6 Addresses instead of hardware based ones
      slaac private
      
      # ==== Test of static IP configuration: ======
      interface wlan0
      static ip_address=192.168.178.201/24
      static routers=192.168.178.1
      static domain_name_servers=8.8.8.8
      

      But when I turn RB5 off and on again sometimes it works with right static IP 192.168.178.201 and sometimes with a random IP, I don't know what I did wrong. Could you please help me?
      Robert

      posted in Qualcomm Flight RB5 5G Drone
      RobertoR
      Roberto