I try to connect a public password-less wifi network. My /etc/network/interfaces file is
auto wlan0
iface wlan0 inet dhcp
wireless-essid asd
I did
# ifup wlan0
But i couldn't get ip from dhcp, it says as: No DHCPOFFERS received. I can connect with wpa_supplicant to my wpa2 home network, but i couldn't connect my school's public network.
--Edit-- I can see the network with :
# iwlist scan
--Edit2-- After restart, it connected the network and internet, but after 10 minutes, disconnected from internet but not from the network(I can see the gateway IP).