This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fixed IP address when connected to wifi network.
#6
Paddy let me add a bit more information to that I provided earlier which was incomplete.

I am absolutely certain that this is how Openplotter sets up it's Wifi. There is nothing Wifi specific in openplotter.conf, it uses the base Linux facilities.

Setting a fixed IP address (OP uses this to set up the fixed ip address for the AP as you can see)

Edit /etc/dhcpcd.conf, adding the lines at the bottom of the file (here I am fixing wlan0):

interface wlan0
static ip_address=192.168.1.199/24 (obviously you have to set this to an address that is within the range of addresses that the AP you are connecting to can give out)

After rebooting then as expected you will see whatever interface you amended (here wlan0) has the address specified.

You can also specify default gateway of DNS servers in the same entry if you wish, such as:

static routers=192.168.1.254
static domain name servers=192.168.1.254 8.8.8.8



Changing the default 10.10.10.1 Openplotter AP address

If you look in /etc/dhcpcd.conf on your Openplotter device you should see that OpenPlotter AP address of 10.10.10.1 is defined in exactly the way I mention above (static ip_address=) so in answer to your second question then no there is no reason why you can't change it to something else.

To do that you need to make the following changes (Here I use 10.10.99.x as an example instead of the default 10.10.10.1):

In /etc/dhcpcd.conf


interface wlan9
denyinterfaces wlan9
metric 510
static ip_address=10.10.99.1/24 < Change 10.10.10.1 to your preferred address eg 10.10.99.1
static routers=10.10.99.1 <And again as above
static domain_name_servers=8.8.8.8
nohook wpa_supplicant

You also need to change the range of addresses the AP gives out to make sure they’re in the same range as the AP itself now you’ve changed it. So instead of giving out addresses in the range 10.10.10.50 to 10.10.10.200 it will now give addresses in the 10.10.99.50-200 range in this example.

in /etc/dnsmasq.conf (again this is a file provided by OP)

interface=wlan9
no-dhcp-interface=wlan0,wlan1,wlan2,usb0,eth0
dhcp-range=10.10.99.50,10.10.99.200,12h < Change this line

All we have done is to change two files that are provided by OP as default, there is no further OP specific magic. Why would there be when Linux has all the capabilities required although as ever I am willing to be corrected?
Reply


Messages In This Thread
RE: Fixed IP address when connected to wifi network. - by baltika_no_9 - 2022-04-12, 09:39 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)