I have been fighting during the last two days with my Beaglebone Black and ArchLinux and Debian in order to configure the WiFi connection with an extremely cheap, unsupported and non compilable driver USB WiFi 802.11n Stick. I failed, it beat me, too many hours reading, testing and finally... I decided to try another USB WiFi stick and it worked at the first try!!! XD So... we will talk today about how to configure our Beaglebone Black WiFi and no to die trying!
The first thing we will need is to connect our BBB through Ethernet and install a Linux shell in our PC to access through SSH. I think this way to work is easy than a direct connection with a keyboard. There are many terminals over there, if you are in Windows i would recommend you to Install Cgywin: LINK
By default Arch/Debian had SSH enabled so nothing is requested to be installed, we will need to know which one is the IP of our BBB (for example you can check it on your Router active connections), launch Cgywin and write this command (change it to your IP accordingly!):
ssh -p 22 root@192.168.1.106
If everything is OK and is the first time you request access, the fingerprint should be accepted, after that the BBB 'root' password will be asked, by default 'root' too (Arch&Debian). Congrats you have SSH access to BBB!
We will setting up our WiFi connection on Arch and Debien, they are using slightly different commands so come on, let´s start the thing!
It is always recommended to keep your system updated, so let´s do it on first place:
Arch:
Additionally on Arch, if you didn´t it before, update your BBB Bootloader:
After that we will enable NTP (Network Time Protocol) as Service and will change TimeZone:
Arch:
We will install 'wpa_supplicant' to negotiate the authentication on your network.
Arch:
In our next step we are going to find out which is our WiFi interface (typ: wlan0) supposing was not any driver problem and your device is automatically detected by the Linux Kernel! After that we will edit the device interface file were configuration about connection will be inserted.
Arch:
Change information according with your connection info (this sample is for a WPA2)
Arch:
And finally we will set our wlan up, we will connect to it and put it like a service that will be auto-executed after our BBB reset.
Arch:
That´s all! You should now be connected to your WiFi! Check the assigned IP Addr and try to connect through a SSH to finally detach your Ethernet cable! I took the information from this two sites: Arch and Debian so take a look in there to amply your knowledge.
Thanks for reading me and remember that a journey of a thousand miles begins with a single step... enjoy stepping! :-)
It is always recommended to keep your system updated, so let´s do it on first place:
Arch:
pacman -Syyu
Debian:
apt-get update
apt-get upgrade
Additionally on Arch, if you didn´t it before, update your BBB Bootloader:
pacman -S uboot-beaglebone
After that we will enable NTP (Network Time Protocol) as Service and will change TimeZone:
Arch:
systemctl enable ntpd
timedatectl set-timezone Europe/Madrid
Debian:
apt-get install ntp
echo "Europe/Madrid" > /etc/timezone
dpkg-reconfigure -f noninteractive tzdata
We will install 'wpa_supplicant' to negotiate the authentication on your network.
Arch:
pacman -S wpa_supplicant
Debian:
apt-get install wireless-tools wpasupplicant
In our next step we are going to find out which is our WiFi interface (typ: wlan0) supposing was not any driver problem and your device is automatically detected by the Linux Kernel! After that we will edit the device interface file were configuration about connection will be inserted.
Arch:
ip addr
cp /etc/netctl/examples/wireless-wpa /etc/netctl/wlan0
nano /etc/netctl/wlan0
Debian:
ip a
nano /etc/network/interfaces
Change information according with your connection info (this sample is for a WPA2)
Arch:
Description='My WiFi Device'
Interface=wlan0
Connection=wireless
Security=wpa
ESSID=YourWiFiNameHere
IP=dhcp
Key=YourPasswordHere
Debian:
auto wlan0
iface wlan0 inet dhcp
wpa-ssid "YourWiFiNameHere"
wpa-psk "YourPasswordHere"
And finally we will set our wlan up, we will connect to it and put it like a service that will be auto-executed after our BBB reset.
Arch:
ip link set wlan0 up
netctl start wlan0
netctl enable wlan0
Debian:
ifup wlan0
That´s all! You should now be connected to your WiFi! Check the assigned IP Addr and try to connect through a SSH to finally detach your Ethernet cable! I took the information from this two sites: Arch and Debian so take a look in there to amply your knowledge.
Thanks for reading me and remember that a journey of a thousand miles begins with a single step... enjoy stepping! :-)
No comments :
Post a Comment