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

ModalAI Forum

RobertoR

Roberto

@Roberto
Unfollow Follow
About
Posts
9
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to set up a static IP in RB5
    RobertoR Roberto

    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!

    Qualcomm Flight RB5 5G Drone

  • How to set up a static IP in RB5
    RobertoR Roberto

    @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?

    Qualcomm Flight RB5 5G Drone

  • How to set up a static IP in RB5
    RobertoR Roberto

    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?

    Qualcomm Flight RB5 5G Drone

  • How to set up a static IP in RB5
    RobertoR Roberto

    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!

    Qualcomm Flight RB5 5G Drone

  • How to set up a static IP in RB5
    RobertoR Roberto

    @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

    Qualcomm Flight RB5 5G Drone

  • How to set up a static IP in RB5
    RobertoR Roberto

    @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?

    Qualcomm Flight RB5 5G Drone

  • How to set up a static IP in RB5
    RobertoR Roberto

    @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

    Qualcomm Flight RB5 5G Drone

  • How to set up a static IP in RB5
    RobertoR Roberto

    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

    Qualcomm Flight RB5 5G Drone
  • Login

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