1

I'm using Ubuntu 16.04 on my laptop and I can't connect specifically to public Wifi. The hardware and driver work fine because I can connect to my personal pocket wifi. But when I try to switch to public wifi, for example the wifi in macdonald free wifi or the wifi in the hotel, I can't not connect to those public wifi. Those public wifi also set up fine because I can connect them with my ipad. When I try to connect to public wifi, it shows "Active connection removed before it was initialized" and just back to the status of no wifi connection.

Any hint about what may be happening?

The output of ifconfig:

ens5f5 Link encap:Ethernet HWaddr 48:5b:39:83:b9:28
UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:34

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:1365 errors:0 dropped:0 overruns:0 frame:0 TX packets:1365 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:142052 (142.0 KB) TX bytes:142052 (142.0 KB)

wls1 Link encap:Ethernet HWaddr 1c:4b:d6:f8:47:a5
inet6 addr: fe80::e8db:4062:360c:59b4/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:37646 errors:0 dropped:0 overruns:0 frame:0 TX packets:22379 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:47101326 (47.1 MB) TX bytes:2898127 (2.8 MB)

The output of iwconfig:

ens5f5 no wireless extensions.

lo no wireless extensions.

wls1 IEEE 802.11bgn ESSID:"00_MCD-FREE-WIFI"
Mode:Managed Frequency:2.417 GHz Access Point: 12:09:B4:69:4B:2A
Bit Rate=65 Mb/s Tx-Power=17 dBm
Retry short limit:7 RTS thr:off Fragment thr:off Power Management:off Link Quality=54/70 Signal level=-56 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:38 Missed beacon:0

  • This may sound completely weird but I fixed a similar problem a while ago with a friends notebook by opening it and reattach the loose antenna cable of the wifi card. You did some service work on your hardware lately? – FredFoo Sep 22 '16 at 4:09
  • @FredFoo it is unlikely to be a hardware issue since ShihYen is able to connect to personel pocket wifi. – Dhaval Simaria Sep 22 '16 at 7:29
  • @Dhaval You would think so, but that is the funny thing about a loose cable: it works and not :) Simply because of the weak nature of the wifi signal. Sometimes the signal power sufficient, even without the cable, sometimes its not. – FredFoo Sep 22 '16 at 8:48
  • Could you please edit your question to include the output of iwconfig and ifconfig (while logged associate with such a network)? This kind of public networks often have "landing pages" that require you to agree to something before you can use the network. This is achieved by having the local DNS server redirect you to said landing page upon your first DNS request. If configured DNS manually and not automatically (through DHCP), this technique doesn't work and all your requests are blocked. So, please set DNS back to automatic and try again. – David Foerster Sep 22 '16 at 9:44
  • Thank you guys so much. It was the problem that local DNS server doesn't direct me to the landing page. I set up my IP manually and everything works! – ShihYen Sep 26 '16 at 1:47
1

Well in this case I suggest to set up your IP manually, following these steps:

sudo iwconfig [INTERFACE] mode managed key open
sudo iwconfig [INTERFACE] essid [ESSID]

Now set your IP address:

sudo ifconfig [INTERFACE] [IP ADDRESS] netmask [SUBNETMASK] 

Then add your IP of router as default gateway:

sudo route add default gw [ROUTER GATEWAY]

Finally, configure DNS:

sudo echo nameserver [DNS]  >>  /etc/resolve.conf
  • Thanks really a lot. This works absolutely fine with my situation. – ShihYen Sep 26 '16 at 1:44

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.