Rede Wireless com IP FIXO
O conteudo abaixo é para configurar um raspberry com IP FIXO na rede Wifi.
Editar o arquivo abaixo com as seguintes configurações:
sudo nano /etc/network/interfaces
auto wlan0
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.1.102 #IP do Raspberry
netmask 255.255.255.0 #Netmask
network 192.168.1.0 #Igual ao IP do Raspberry com 0 no fim
broadcast 192.168.1.255 #Igual ao IP do Raspberry com 255 no fim
gateway 192.168.1.1 #IP do Gateway, normalmente o ip do Router
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
Agora vamos editar o arquivo /etc/wpa_supplicant/wpa_supplicant.conf
Deixando da seguinte forma:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid=”Nome da sua rede wifi”
psk=”Sua senha de Wifi”
proto=WPA
key_mgmt=WPA-PSK
pairwise=TKIP
group=TKIP WEP104 WEP40
auth_alg=OPEN
}
Feito isso é só salvar o arquivo.
De um reboot
Se der algum problema siga as instruções abaixo:
After that, you will need to bring up the “wlan0″ interface using “ifup”:
# sudo ifup wlan0
You may have to bring the interface down and then back up:
# sudo ifdown wlan0
# sudo ifup wlan0
You may see messages like this:
# sudo ifup wlan0
ioctl[SIOCSIWAP]: Operation not permitted
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
While the messages are annoying, the adapter will still connect and transmit and receive data.
You can check your wireless connection using iwconfig:
# iwconfig
lo no wireless extensions.
eth1 no wireless extensions.
wlan0 IEEE 802.11bg ESSID:"Your SSID Here" Nickname:"<WIFI@REALTEK>"
Mode:Managed Frequency:2.442 GHz Access Point: NN:NN:NN:NN:NN:NN
Bit Rate:54 Mb/s Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Power Management:off
Link Quality=100/100 Signal level=95/100 Noise level=0/100
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
eth0 no wireless extensions.
If there are errors in your “/etc/wpa_supplicant/wpa_supplicant.conf” file or you have some other problem, you can start wpa_supplicant manually using the following command:
# sudo /sbin/wpa_supplicant -P /var/run/wpa_supplicant.wlan0.pid -i wlan0 \
-D nl80211,wext -c /etc/wpa_supplicant/wpa_supplicant.conf
The backslash above is used to break the long line into two lines.
















