Wireless networking is something that we really take for granted. Nearly every device that we own has some form of technology to wireless connection. Wireless is getting cheaper and we this is evident in the proliferation of new components such as the esp 8266, a $3 hackable WIFI device with limited GPIO (General Purpose Input Output).
When the Raspberry Pi first hit the world in 2012 it came with a 100MB Ethernet connection for wired network access. Thanks to the Raspberry Pi Community and the Raspberry Pi’s sound Linux foundation, WIFI dongles were quickly tested with the Pi and with varying degrees of success. The issues faced were mainly based upon the chipsets used for the radio transceivers that make WIFI possible. On a typical Linux system there will be many different firmwares to cope with the myriad of chipsets on offer. But for the Raspberry Pi and it’s reduced storage capacity, a number of these had to be removed.
Popular chipsets such as Ralink and Broadcom were retained and this is where we start our look at the WIFI dongle.
The Wi-Pi wireless dongle uses the common Ralink rt5370usb chipset which provides b,g, and n WIFI certifications which means that this dongle can connect to many different types of access points.
We ran the “lshw” terminal command to list the hardware attached to our Raspberry Pi and we found the following information.
lshw is not installed as standard but can be installed via a terminal by typing sudo apt-get install lshw but it is not required to install the W-Pi dongle.
description: Wireless interface
physical id: 2
bus info: usb@2:1.1
logical name: wlan7
capabilities: ethernet physical wireless
configuration: broadcast=yes driver=rt2800usb driverversion=3.13.0-24-generic firmware=0.29 ip=192.168.1.132 link=yes multicast=yes wireless=IEEE 802.11bgn
Which is where we learnt about the firmware used for this chipset.
We also used “lsusb” to list the USB devices attached to our Raspberry Pi and found the Wi-Pi dongle listed as
Bus 002 Device 010: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter
As you can see the lshw and lsusb information conficts, with lshw reporting an RT2800 device, this is just the driver used and the real chipset is RT5370. This information is not really necessary for everyday use, but using lshw and lsusb is an invaluable tool in diagnosing hardware issues, so keep it in mind for any future projects.
Installing the dongle
Installation of the dongle is a breeze using the latest version of Raspbian from the Raspberry Pi Foundation. With their new and improved user interface, courtesy of the remarkable Simon Long and his relentless quest to refine and simplify the interface, we now have an easier method of connecting to WIFI, rather than using the of WIFI Utility that was found in the Internet sub menu.
To install Wi-Pi on all models of Raspberry Pi using the latest Raspbian release.
With your Raspberry Pi powered down insert Wi-Pi into a spare USB port.
Insert your keyboard, mouse, HDMI and lastly the insert the power to turn on your Raspberry Pi.
Your Raspberry Pi will boot as normal and you should login to your Pi and then start the desktop environment using “startx” if your Pi is not configured to boot directly to the desktop.
With your Pi at the desktop, look to the top right of the screen and you will see the WIFI icon.
Left click on the icon and the application will scan for nearby access points, this will take a few seconds.
Click on the access point name that matches your router.
A dialog box will appear and ask for your pre shared key, this is the password for your router. Enter it and press Ok.
After a few seconds your Raspberry Pi will be connected to the router and in turn will have a connection to the Internet.
To test your connection open a new browser window and head over to element14.com, after a few seconds the page will load. You can also test your connection via the terminal. Open a new terminal session and type
This will send a ping of data to the IP address 18.104.22.168, which just happens to be one of Google’s DNS (Domain Name Server) this will produce output like this.
PING 22.214.171.124 (126.96.36.199) 56(84) bytes of data. 64 bytes from 188.8.131.52: icmp_seq=1 ttl=50 time=981 ms 64 bytes from 184.108.40.206: icmp_seq=2 ttl=50 time=31.6 ms 64 bytes from 220.127.116.11: icmp_seq=3 ttl=50 time=99.1 ms 64 bytes from 18.104.22.168: icmp_seq=4 ttl=50 time=73.5 ms 64 bytes from 22.214.171.124: icmp_seq=5 ttl=50 time=37.7 ms 64 bytes from 126.96.36.199: icmp_seq=6 ttl=50 time=39.8 ms 64 bytes from 188.8.131.52: icmp_seq=7 ttl=50 time=80.2 ms --- 184.108.40.206 ping statistics --- 7 packets transmitted, 7 received, 0% packet loss, time 6007ms rtt min/avg/max/mdev = 31.621/191.971/981.560/323.197 ms
What’s important is that we sent 7 packets of data to the IP address, and that we received 7 replies which is 0% loss, in other words we are connected to the Internet.
With the Wi-Pi wireless dongle you can finally untether your projects and truly go mobile!
The Raspberry Pi comes with two methods of displaying video on a compatible screen. Firstly we can use the HDMI connection along with an HDMI lead connected to a compatible TV or monitor. Or we can secondly use the composite connection which is the yellow jack on the Model A and B Raspberry Pi, but for the Models A+, B+ and Pi 2 this is integrated into the 3.5mm headphone jack.
What you will not find on the Raspberry Pi is a VGA connection, but why? To be honest VGA is an old standard and it is slowly reaching end of life. So why incorporate a legacy connection which will undoubtedly increase the cost of manufacturing which would be passed on to the buyer. The Foundation took the decision to invest in the more modern HDMI standard as this can handle HD video and audio via one cable and so the Raspberry Pi started to come off the production line with this common connection.
HDMI is a great connection but the biggest issue faced is that schools, clubs and home users have access to many VGA screens so how can we connect our Raspberry Pi to these screens? In steps one of the first Raspberry Pi Foundation approved components. Pi-View is an adapter between the digital HDMI signal and the analogue VGA signal. Using Pi-View we can easily attach our Raspberry Pi to many different types of VGA monitor and the circuitry inside Pi-View will automatically detect the monitor resolution ensuring that your Pi is ready to go. Pi-View is unable to transmit the audio from the HDMI to VGA as VGA is a video only connection. To play audio on your Raspberry Pi you will need to connect headphones or a speaker to the 3.5mm jack, and then select the audio output via the new audio menu, present in the top right of the Raspbian desktop. Just hover your mouse over the icon and right click to bring up the menu.
Pi-View is a very handy piece of kit for any school, club or group that have access to cheap VGA monitors and wants to get their team hacking quickly.