The Raspberry Pi is a great IoT platform and it's even better with a cellular internet connection.
NOTE: The Huawei E303 is no longer in production.(Though can still be found on eBay or Amazon if needed.) An updated tutorial using the Hologram Nova can be found here: Add Cellular to a Raspberry Pi with Hologram Nova
Having cellular connectivity on your Raspberry Pi can open up a whole world of other cool projects for you. Anywhere where wifi may not be feasible you can now have an internet connection.
Just follow these simple instructions:
- Install the latest version of Raspbian by following the instructions on the Raspberry Pi site.
- Insert the Hologram SIM card into the Huawei modem by sliding the cover off and then inserting it with the contacts down. Note that it takes a mini SIM card size. See this image:
- Plug the modem into the Raspberry Pi and boot up the Pi
- Open up a terminal window and type
ifconfig. You should see an entry for eth1 as shown:
sudo dhclient eth1to assign an internal IP address to the modem.
- Open up the web browser on the Pi and go to http://192.168.1.1
- Go to the profile management page in the modem settings and create a new profile. You'll want to set the APN to “hologram” and leave the username and password blank as shown:
- Then go to the Mobile Connection page and make sure the network is set to “Auto” and that roaming is enabled.
- The modem should now connect to the cellular network (you'll see the LED on the modem light up when it connects successfully)
- Try pinging something or going to a website (like http://hologram.io/test.html )
You should now be able to do anything you want over the internet.
The modem will save your APN settings so you don't need to configure it again.
Newer versions of Raspbian shouldn't need any extra configuration to automatically bring the connection up when the board is plugged in but if you have any trouble, add these lines to
allow-hotplug eth1 iface eth1 inet dhcp