Rb5 static IP
-
Hello, I am trying to set up an static IP from an script; I automatically set an static IP once the drone is set to a new WiFi. In few lines, the script what it does is:
- Connect the drone to a new WiFi (with adb shell voxl-wifi station <ssid> <password> command
- reboot the drone with adb reboot to gain a new IP address
- ask the new IP for the network, ask netmask and default gateway, set this new values into the file for the voxl-static-ip service (/usr/bin/voxl-static-ip)
- reboot to see the changes
The thing is that I manage to set an static IP for the drone. Once it reboots , the drone gets this new static IP but I cannot ping the drone from another device until few minutes passes. Once it gets the first ping, the connection never stops but I wonder if you could see why it lasts too many minutes to set the static IP for the new WiFi.
I see, once rebooted, the new static IP in the wlan0 interface (192.168.1.141), but I cannot reach it; instead, I can reach the IP address that appears here when putting 'ip route' into the terminal (192.168.1.198):from the drone I can ping to 8.8.8.8 and my laptop; Any help would be appreciated.
Thanks!