I'm currently working on my Raspberry Pi, running Raspbian, trying to connect to a network without password using iwconfig.
ifconfig wlan0 results : ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr b8:27:eb:33:09:43 inet addr:10.0.0.1 Bcast:10.0.0.255 Mask:255.255.255.0 inet6 addr: fe80::74f6:3f1d:f617:df31/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:1089 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:154874 (151.2 KiB)
and my iwconfig wlan0
wlan0 IEEE 802.11 Mode:Master Tx-Power=31 dBm Retry short limit:7 RTS thr:off Fragment thr:off Power Management:off
My script is quite simple (and the wifi's ESSID is "aaa"):
#!/bin/bash ifconfig wlan0 iwconfig wlan0 essid aaa dhclient wlan0
When I try to connect just by using sudo iwconfig wlan0 essid aaa i got an error:
Error for wireless request "Set ESSID" (8B1A) : SET failed on device wlan0 ; Operation not supported.
I can see with the GUI that the symbol of the wifi start to blink, like the Raspberry was trying to connect to the network, but it stay like the previous state (unconnected/connected to another essid) At the end of the script I get a message "RTNETLINK answers: File exists". I already did
sudo ip addr flush dev wlan0
to erase it, the message disapears but I'm still not connected
Do you have any idea to help me?