Set static IP on ModalAI M500
-
Hi!
I'm trying to set a static IP for a WiFi interface on my ModalAI M500. To do that I've been checking the forum because I didn't know how to start.
I have experience doing this in other OS like Ubuntu 20.04, in which I just have to create a new interface using nmtui, setting the static and the gateway. However, to do that in yocto I'm facing some issues.
I tried to do it like in this post:- I have voxl-wifi set on station mode. Should change the mode or is it ok? It is not clear to me on the post I have been looking.
- I have created the folder network and script interfaces in /etc because I didn't have it on my drone by default.
- I have set up my interface like this:
iface wlan0 inet static address 10.42.0.25 netmask 255.255.255.0 gateway 10.42.0.1
- I rebooted the drone to see the changes but wlan0 interface is not set with the static IP.
I also tried doing a ifconfig wlan0 down and then ifconfig wlan0 up.
Maybe this is not the way to go, so I would really appreciate some advise on this. Thank you in advance! -
-
@vmassague Another thing to look at is
/etc/systemd/system/wlan_daemon.service
which is default linux service that controls WiFi. You can look there to see if anything is hardcoded WiFi-wise. -
@Eric-Katzfey
It works following the steps of the tutorial. Thank you! -
@Eric-Katzfey said in Set static IP on ModalAI M500:
@vmassague You can try this: https://www.howtogeek.com/118337/stupid-geek-tricks-change-your-ip-address-from-the-command-line-in-linux/
Is there a way to set the static IP permanently?
I saw that in the WiFi guide you recommend reserving the IP in the WiFi router, unfortunately that's not an option for me.