Saturday 7 June 2014

Getting Raspberry Pi N150 WiFi to work with BT HomeHub 3.0

The Maplin Raspberry Pi Kit comes with a N150 Wi Fi USB Nano dongle.
I have a BT HomeHub 3.0 Broadband Network router (for BT Infinity).

I followed the instructions that came with the kit.
The scan found my Wi Fi Network for the HomeHub, but didn't connect properly.
It seemed to get into a loop of repeatedly connecting and disconnecting.

I found a lot of advice of the internet with slightly different ways and file settings to fix this. In the end this worked for me. (Sorry, but I can't remember the page where I got this advice from).

This file contained these settings:


sudo cat /etc/wpa_supplicant/wpa_supplicant.conf


ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
        ssid="Id of my HomeHub a bit like this BTHub3-1ABC, in double quotes"
        psk="My WiFi Password in double quotes"
}

I saved the file (just in case)


sudo cp /etc/wpa_supplicant/wpa_supplicant.conf /etc/wpa_supplicant/wpa_supplicant.save

Then I edited the file as follows:



sudo vi /etc/wpa_supplicant/wpa_supplicant.conf


ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
        ssid="Id of my HomeHub a bit like this BTHub3-1ABC, in double quotes"
        psk="My WiFi Password in double quotes"
        proto=WPA
        key_mgmt=WPA-PSK
        pairwise=TKIP
        group=TKIP
}

network={
        ssid="id of HomeHub as above"
        psk="WiFi Password as above"
        proto=RSN
        key_mgmt=WPA-PSK
        pairwise=TKIP
        auth_alg=OPEN
}

I also edited this file

sudo cp /etc/network/interfaces /etc/network/interfaces.save


and commented out the line
iface eth0 inet dhcp


i.e.

sudo vi /etc/network/interfaces


auto lo

iface lo inet loopback
#iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

Then I did this to take down eth0, and restart networking


sudo ifdown eth0
sudo /etc/init.d/networking restart

I wasn't aware that this had worked until another time that I was using the RPi, so perhaps a reboot at this stage finally gets thing working

sudo reboot

When I next followed the instructions to run the wpa_gui tool and scan for a WiFi network, I connected to my HomeHub Wi Fi and to the internet OK.








No comments:

Post a Comment