1

I configured my RPi (running Raspian Stretch Lite) as an access point to create a local private network (no connection to internet). Laptops and mobile phones connect fine to the AP and I can navigate to my local private domain (mypi.com) I configured in dnsmasq.conf. However, when I connect from Android 9 phones, they get a wrong IP address.

So, for example, my Ubuntu laptop and my Android 8 phone get 192.168.220.7 and 192.168.220.8 respectively, however, my Android 9 phone gets 10.176.17.147

I also noticed that the Android 9 phone doesn't get a IPv6 address (Android 8 does)

This is my dnsmasq.conf file:

bogus-priv
server=/local/192.168.220.1
address=/mypi.com/192.168.220.1
local=/mypi.com/
interface=wlan0
domain=mypi.com
expand-hosts
dhcp-range=192.168.220.2,192.168.220.10,2h
dhcp-option=3,192.168.220.1
dhcp-option=6,192.168.220.1
dhcp-authoritative

Any idea why Android 9 gets this IP?

Thanks!

  • 2
    This looks like the Android 9 device is NOT getting an IP address from the access point. You are sure you connected it to the WIFI ? Also, this has little to do with raspberry pi, superuser.com or unix.stackexchange.com – thecarpy Jun 7 at 11:05
  • I don't have an Android to test, but if you have data over cellular (which is pretty much any smart phone) your cellular connection will have an IP address. I wonder if you're failing to connect to the access point, as suggested by @thecarpy, and seeing your cellular-assigned IP? – Brick Jun 7 at 15:43
  • @thecarpy I'm completely sure it is connected to the AP wifi but I suspect it may be what Brick suggests...since this AP is not connected to the internet, the Android phone, while connected to the AP, gets the IP from then data plan as a fallback. I posted this here since I thought it was a problem with the RPi dnsmasq but it seems to be more an Android problem indeed – xtian777x Jun 7 at 15:59
  • @Brick 100% sure it's connected to the wifi. It may be using the data plan IP as fallback since the wifi is not connected to the internet – xtian777x Jun 7 at 15:59
  • I figured out the problem is the one I mentioned before. Android uses the data plan IP since there's no internet connection. This is then an Android issue, not a RPi one. Case closed! – xtian777x Jun 7 at 18:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.