Raspberry Pi - Initial Setup

Setting up a Raspberry Pi is pretty easy, and since there are hundreds of tutorials on how to install NOOBS (Raspberry Pi's operating system manager), and from there Raspbian, I won't go into that part here.  What I will go through are the additional steps I needed to do to get it working for my setup.

The first things I needed to do was connect to WiFi.  The network I was connecting to is secured with PEAP and MSCHAPv2.  The Raspberry Pi 3 isn't set up for this, and a few changes needed to be made.

Depending on the version of Raspbian, wpa_supplicant may or may not be included.  This is quickly remedied by plugging in an ethernet cable, opening a terminal (ctrl-alt-t), in inputting

~$ sudo apt-get install wpa_supplicant

once installed, I edited the wpa_supplicant file:

~$ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

add:

network={
        ssid="yournetworkname"
        key_mgmt=WPA-EAP
        eap=PEAP
        identity="domain\username"
        password="password"
        phase1="peapver=0"
        phase2="auth=MSCHAPV2"
}

save and exit.

From here I also needed to edit the network interfaces configuration:

~$ sudo nano /etc/network/interfaces

I changed:
allow-hotplug wlan0
iface wlan0 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

to:
allow-hotplug wlan0
iface wlan0 inet dhcp
    pre-up wpa_supplicant -B -Dwext -i wlan0 -c/etc/wpa_supplicant/wpa_supplica$
    post-down killall -q wpa_supplicant

save and exit.

Once that was done, a quick down/up cycle of the wireless network interface set the changes I made into motion:

~$ sudo ifdown wlan0
~$ sudo ifup wlan0

And suddenly, I had WiFi!

Now that I had WiFi, and could plug the ethernet cable back into the computer I had taken it from, I could start downloading some additional Python libraries that I needed to use.  In no particular order:

matplotlib
mpl_toolkits
pybluez
bluez
numpy

Apt-get helped with that, again:

~$ sudo apt-get install python-<packagename>

If you're trying to do this at home, be warned that the package names sometimes change, as the repository changes.  To check the repository for a particular package, use apt search:

~$ sudo apt search <packagename>

A list of all packages matching that character string, and a brief description of each will appear, and you can scroll through to determine what the package has been renamed to.  Generally this isn't an issue, but with each python release, new libraries are written/adapted for that version, and you may need to use something other than what I specify for your project.

Comments

Popular posts from this blog