1

I am trying to connect my android phone with wifi ubuntu.

Things I have tried:

1) ap-hotspot -> , phone stuck in obtaining ip address, then avoided due to poor internet

2) manually configured hostapd and dnsmasq (and also isc-dhcp-server from here)

But nothing worked. I can only conncect if I use a static ip in my android phone I can connect easily. So I think the problem is in dhcp server.

Being said that , I only need to connect my android to this wifi , no other device is necessary. So I am willing to avoid the dhcp server as it is what i think creating the problem.

Here are the steps I followed while assigning a static IP to my phone, in my laptop

sudo ifconfig 10.0.0.1

and in my android phone

1) show advanced settings
2) IP settings = static
3) IP address  = 10.0.0.2
4) Network prefix length = 24
5) DNS1 = 8.8.8.8
6) DNS2 = 8.8.4.4

Now I can ping my android phone from my laptop. ping 10.0.0.2

PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=173 ms
64 bytes from 10.0.0.2: icmp_seq=2 ttl=64 time=195 ms

Now , the last thing I need to share internet is Port forwarding and this is the step I am stuck at. So , can someone tell me how to do these steps so that I can use internet in my android ?

For reference here is the hostapd.conf file

interface=wlan0
driver=nl80211
ssid=test
hw_mode=g
channel=1
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=3
wpa_passphrase=1234567890
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
Unbound
  • 117
  • 1
  • 9

0 Answers0