Raspberry Pi with CentOS – Setting up WiFi (Headless)

Easy way….

To start with, download the CentOS Raspberry Pi image and write it to a micro-SD card. Insert it in to your Pi 3 micro-SD slot and get ready to go..  ( I’m using Raspberry Pi 3 device which has built in WiFi, please don’t get confused.)

First connect the PI to your WiFi device (Home WiFi router is the easiest) with a Ethernet cable. Obviously, this is not with WiFi. CentOS  image is DHCP enabled by default.

Now the next question is how to find the newly assigned IP to your PI.
One option is to log into your ADSL/Wi-Fi Modem Router (This is easy if you are using Home WiFi).
The second and easy option is to use a tool like “nmap” or Advanced IP Scanner (http://www.advanced-ip-scanner.com/) for windows.

Then log into your PI ( Default credentials User: root Password: centos)

Now you can start the real job.

First follow the README in /root

[root@centos-rpi3 ~]# cat /root/README

For WiFi on the RPi3, just proceed with those steps :

[root@centos-rpi3 ~]# curl –location https://github.com/RPi-Distro/firmware-nonfree/raw/54bab3d6a6d43239c71d26464e6e10e5067ffea7/brcm80211/brcm/brcmfmac43430-sdio.bin > /usr/lib/firmware/brcm/brcmfmac43430-sdio.bin

[root@centos-rpi3 ~]# curl –location https://github.com/RPi-Distro/firmware-nonfree/raw/54bab3d6a6d43239c71d26464e6e10e5067ffea7/brcm80211/brcm/brcmfmac43430-sdio.txt > /usr/lib/firmware/brcm/brcmfmac43430-sdio.txt

[root@centos-rpi3 ~]# systemctl reboot

(FYI: If this is the first time you boot your Pi with CentOS image you can use the first step in this guide to resize your / partition. BUT THIS IS NOT RELEVANT TO NETWORK CONFIGURATION)

Now install Network Manager TUI. I suggest this because it it the easiest I found.

[root@centos-rpi3 ~]# yum install NetworkManager-tui

Start Network Manager:

[root@centos-rpi3 ~]# nmtui

Select Activate a connection using down arrow. In the WiFi section select your SSID (WiFi ID) and “Activate”

That’s it…

Now you can verify with:

[root@centos-rpi3 ~]# ifconfig

This should give you an output with something like below:

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255

Then try ping to the gateway or any other active IP to get the connectivity confirmed.

 

 

Advertisements
Raspberry Pi with CentOS – Setting up WiFi (Headless)