PiAnyWhere 4G & LTE Hat for the Raspberry Pi

4G (100 mbps down/ 50 mbps up) – Ultra fast internet connectivity for your raspberry pi, excellent for large downloads and video streaming.

The Pi Anywhere 4G & LTE Hat for the Raspberry Pi Beta provides 4G mobile data for the Raspberry Pi mini computer. Our intelligent HAT module provides your Raspberry Pi with mobile data, GPS positioning information and battery support. This is the perfect module for hackers, scientists, and creators as it gives your Pi powerful connectivity wherever you are. Simple plug out module into your Raspberry Pi and start playing.

Find out more & order at http://www.pianywhere.com

The HAT can integrate easily with the software on your operating system giving you access to general internet data through the mobile network. Using our API this hat gives you the ability to send SMS (text) messages. We also give easy access to the GPS onboard which exposes location data.

HAT Features

  • Supports any nano sim. Slot your sim card in and get going
  • 4G Mobile Data for the Raspberry Pi
  • Easy set-up, with a single terminal command setup our software to streamline Pi Anywhere with your Raspberry Pi.
  • Wake up your Pi or trigger events with text messages.
  • Optional external antenna for better reception.
  • High-efficiency power regulation up to 3 amps.
  • Use for external projects with a solar panel and battery pack.
  • It can be used in conjunction with our Sensly gas monitoring HAT

Step 1: Whats in the Box?

Step 1: Parts in the box

  • GPS Antenna
  • 1 4G antenna,
  • 1 3G antenna.
  • USB cable to connect to the Raspberry Pi.

Step 2: Put PiAnywhere Together With the Raspberry Pi

  • Raspberry Pi wall plug Into Pianywhere to power both Pianywhere and Raspberry Pi. ( You don't need to also plug in the rasberry Pi.
  • Put the 2 antennas and the GPS antenna into Pianywhere.
  • Sim card into the PiAnywhere (which you can buy from any major sim provider )
  • USB into the modem to connect to the Raspberry Pi.

Step 3: Setting Up the Raspberry Pi

Components needed for the Raspberry Pi to be operational:

  • Raspberry Pi 2 or 3.
  • Monitor.
  • Mouse and keyboard.
  • HDMI Cable.
  • Raspberry Pi Charger.
  • SD card (more than 8GB is required) with the latest version of Raspbian Jessie.

The guide to setup the Raspberry Pi software can be found at https://www.raspberrypi.org/learning/hardware-guide/

The latest version of the Raspbian Jessie can be found at https://www.raspberrypi.org/downloads/

Step 4: Connect the PiAnywhere With Your Raspberry Pi

  • Connect the 40-pin of the PiAnywhere with the 40-pin of the Raspberry Pi.
  • Connect the USB from the modem of the PiAnywhere to the USB Slot of the Raspberry Pi.
  • Connect the Raspberry Pi charger to the power pin of the PiAnywhere, the PiAnywhere will power your Rasberry Pi.

  • For the PiAnywhere to power, the Raspberry Pi, press the button that states PWR (power) in the PiAnywhere.

Step 5: Pianywhere Easy Setup

There are multiple ways to get this up and running. The first is to download the disk image and flash it using Win32 Disk Imager. You will need an SD card that is 8GB or bigger. The link for the download is below:


To use turn on the PiAnywhere by plugging in the power cable to the USB port labelled 5V Power. Next, we press the button marked btn to turn on the modem. We then connect the other USB port to the raspberry pi and finally turn on the raspberry pi by pressing the pwr button.

Also, you can use PiAnywhere on a windows system. All you have to do is use these drivers and install them: https://drive.google.com/file/d/0B4StAjolU_LeVjRx...

Step 6: Downoad and Install the Software.

Once the 2 boards are connected successfully and the power LED is on. The next task is to download the correct software for the PiAnywhere to work with the Raspberry Pi. Using the latest version of Raspbian Jessie is recommended.

Open the terminal and type:

This should take around 30 minutes to complete as installing the kernel headers takes a long time. But once this is completed and your PiAnywhere is connected via USB to the Raspberry Pi you should be able to run

  • lsusb | grep Qualcomm

And see a Qualcomm device connected. As a final check you can also run

  • ls /dev/ttyUSB*

And see 5 usb devices connected these are the virtual com ports for the modem.


Step 7: Set Up Wvdial and Connecting to the Internet

One of the important features of the PiAnywhere 4G is its ability to connect to the internet using the mobile network, but for that, it needs to be configured to do so. This step will cover the link between the PiAnywhere and the internet using the sim card information.

Now we need to configure the wvdial.conf file to enable PiAnywhere to connect to the internet using your sim card. You will need the USSD code used to fetch the sim cards registered number. For example, on giffgaff this code is *99#. Or you can just use the sim cards phone number if you can't find the USSD code but just remember you will have to edit the file to change the number if you change the sim.

So we will need to open the file found in the PiAnywhere_Install folder called wvdial.conf using a text editor of your choice.

  • sudo nano /home/pi/Pianywhere_Install/wvdial.conf

Then add to the file your USSD code or phone number in the 'Phone =' field. Then save and exit the file by pressing ctrl+x then y

We now need to move this file to the correct place to the system can find it.

  • sudo mv /etc/wvdial.conf /etc/wvdial.conf.bak
  • sudo mv /home/pi/PiAnywhere_Install/wvdial.conf /etc/wvdial.conf

  • sudo wvdial

This last step takes around 30 seconds. If successful, you should be connected to the internet with your Raspberry Pi. Congratulations!

Step 8: Setting Up the Network Interface to Use the Modem Automatically

To enable the Pi to connect PiAnywhere to the internet using the mobile network automatically, we use the following steps.

First, open the file called interfaces using:

  • sudo nano /etc/network/interfaces

Then add the following lines at the bottom of the file:

  • auto ppp0
  • iface ppp0 inet wvdial

Then reboot the Pi, ensuring that the PiAnywhere is on and the Modem USB port is connected to the Pi.

  • sudo reboot

If successful when the Raspberry Pi boots you should be able to connect to the internet using your PiAnywhere.

Step 9: Enable the GPS

The PiAnywhere has the GPS feature, but it needs to be activated. First minicom needs to be installed in order to test the GPS. This is done by using the following command:

$sudo apt-get install minicom

This is a terminal that operates in the command window, enter the minicom terminal using:

minicom –D /dev/ttyUSB2

In order to operate the minicom press CTRL+A and then Z, this will show all the different options that can be used. The echo local will need to be enabled. This is done by pressing CTRL+A then E. Once this is enabled you can enable the GPS this is done by typing inside the minicom terminal:


It will show a message of Ok!
The to get the information of the GPS location use the following command:


Step 10: Congratulations!!!!

You have now gotten Pianywhere working, and you can do some amazing experiments with it. We are also running competitions for Instructables. If you buy a Pianywhere from us Pianywhere.com and you write an instructable about your project then we will give you up to 100% of your money back depending on the quality.

When you finish just tag us in it so we can take a look.

Got the hardware setup today and was getting the same error as a couple other comments "Error bad init". After flipping the Sim around that fixed the error bad init problem. Now I'm just getting a NO CARRIER over and over. Not sure why. I'm just using my T-Mobile SIM, so maybe that is why. Anyone have a list of carriers/plans that are currently working with this modem in the US?
<p>So I finally got my modem working. A few things.</p><p>First I just use my t-mobile unlimited sim card, I also bought a pure internet sim card (just data like what you would buy for a tablet) and that did not work. The normal cell phone sim worked, while the internet sim did not. </p><p>Second, the command sudo<br>nano /home/pi/Pianywhere_Install/wvdial.conf should be sudo nano /home/pi/PiAnywhere_Install/wvdial.conf (notice the capitalized A), but even with that the file was empty, I used the image provided by piAnywhere, so not sure why this was empty. So I just ran sudo nano /etc/wvdial.conf and that file had the dialer defaults as seen above. I changed the *99# to my phone number ##########, and then after saving ran sudo wvdial. This resulted in the No Carrier error again and again.</p><p>So I went back into the wvdial.conf file and change the phone = line back to *99# and after saving I again ran sudo wvdial and this time the modem connected almost immediately. I tried to use the internet browser on my Pi , but nothing seemed to load. So after exiting using cntrl+c I tried unplugging the wifi dongle I had plugged in and executing the sudo wvdial again, this resulted in the browser working.</p><p>So if you are having some trouble try some of those hints. Hope it helps.</p>
<p>Hello,</p><p>I have bought the HW and connected to both raspberry pi 2 and 3 and I have downloaded the operating system image you have suggested in the guide. Unfortunately, it does not work because when I do &quot;sudo wvdial&quot; I have an error from the beginning with the simple command &quot;ATZ&quot;</p>
<p>Hi,</p><p>Could you please send us a screenshot so we can debug the problem. </p>
<p>I too see the error with the newest pre-built image (March 5, 2017)</p>
<p>I have the same issue with PiAnywhereDriversInstalled-05-03-17.img pre-built image.</p>
<p>Hi, any news on this? Also have the same problem.<br>Thanks!</p>
I wouldn't mind that this is really just a big product ad if there were at least some details on the product. Like what frequencies does it support? (ie will it work with my carrier in my country? )<br>And the menus on the linked website, at least on the mobile site, are nearly unviewable being they are white text on nearly white menu bars. So if the specs are hidden on the site somewhere, they're mighty hard to find.
<p>Has ANYONE got this to work recently? Working on a Raspberry Pi remote sensor project &amp; this product looks perfect. But there are too many &quot;don't work&quot; comments above to be confident. </p>
<p>Got mine working and connected last night! Used Google project Fi free data sim card. At first I had the sim in backwards, thanks to @ndelaet for posting troubleshooting steps below!</p>
<p>* Gps module everytime needs to be activated.<br>for myself, i fixed the issue by adding the following line to crontab.<br>echo &quot;AT+CGPS=1&quot; &gt; /dev/ttyUSB3<br><br>* Another poor thing, PiAnywhere always must be activated by manually pushing 'btn' button and then 'pwr' button. Its not useful for remote installation instances.<br>I hope there is a way to make it manually on power up. ?<br><br>* I bought pre-installed SD card. On advertisement, it was written that ''SAMPLES'' but there were no sample on it. No script. I couldn't find anything?<br><br>* GPS initiliazing very fast. As given instructions on the page for different model i see. For 4G/LTE, /dev/ttyUSB1 is GPS Echo for NMEA stream. You can see the stream basicly with &quot; $ cat /dev/ttyUSB1 &quot; command (without quotes) easily. ttyUSB2 is Modem, ttyUSB3 is GPS terminal for AT+ command/query.<br>Tested with gpsd and initialstate, works well.<br><br>* Preloaded SD card comes with hostapd and isc-dhcpd-server.<br>You can easily use it as WiFi - 3G/4G dongle by adding a conf file for hostapd and modify dhcpd.conf. Default on dhcpd.conf gateway written like, don't forget to change this otherwise you wont able to route default traffic trough raspi.<br><br>I am planning to write useful tutorials for the product. <br>But need more information about few things ;<br>- Auto boot/start option as i mentioned above ?<br>- Modem AT+ set, or at least more specific details about chipset to find out full list of commands. To enable disable 4G/3G function.<br>- More information about all virtual interfaces /dev/ttyUSB0,1 etc.<br><br>Also have few advice ;<br>- A housing for sale might be good.<br>- Given USB cable is simple ugly cable. A slim and nice one (as pictured above) would be more useful and looks nice.</p><p><br><br><br></p>
<p>If anyone want better LTE module, you should check out <a href="http://www.blink-r.io" rel="nofollow"> www.blink-r.io</a>. Blink'r smart LTE module is a affordable feature packed 4G module with powerful ARM A53 CPUs, WiFi, BLE, GPS and much more.</p>
<p>Hi, <a href="https://www.instructables.com/member/Baoguo_Wei" style="">Baoguo_Wei</a> We would love to test our product and yours together. Would you like to send us a sample unit. Hope you do well in your Kickstarter. </p>
<p>Looks like a nice piece of kit. I might want to use it in my next project.</p><p>How many digital I/O pins does it use ... or more precisely ... how many are still available?</p><p>Which QUALCOMM chip does it use?</p><p>Thanks!</p>
<p>Most pins are still available. The only one's that are reserved are the UART pins, GPIO 5 and GPIO 6. The I2C line is also used but you can connect multiple devices to this.</p>
Can you tell me what signals the GPIO pins 5 and 6 are user for?
<p>Hi everybody,</p><p>Regarding <strong>issue with ATZ command</strong>: following reply from PiAnywhere (thanks guys): <strong>checklist to solve the issue</strong>:</p><p>Answer to all the followings topics must be <u>&quot;yes&quot;:</u></p><p>1) are you using the official raspberry<br>pi charger to power the pianywhere and the pi? </p><p>2) The simcard you are using has been<br>activated? </p><p>3) Your pi isn't connected to the<br>WiFi? <em>(that was my issue nb1)</em></p><p>4) You sim is connected with the corner<br>that is slanted facing away from the pianywhere. <em>(that was my issue nb 2)</em></p><p>5) Are both the main and auxiliary<br>antenna attached? </p><p>--&gt; For me, id worked! PiAnywhere now fully functionnal :)</p>
<p>Hi,</p><p>I've tried several methods to make it work, but no success so far (still have the issue with the ATZ command)</p><p>Scanning serial ports, the system actually cannot detect any modem: </p><blockquote>pi@raspberrypi:~/PiAnywhere_Install $ sudo wvdialconf /etc/wvdial.conf</blockquote><blockquote>Editing `/etc/wvdial.conf'.</blockquote><blockquote>Scanning your serial ports for a modem.</blockquote><blockquote>ttyS0&lt;*1&gt;: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud</blockquote><blockquote>ttyS0&lt;*1&gt;: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud</blockquote><blockquote>ttyS0&lt;*1&gt;: ATQ0 V1 E1 -- and failed too at 115200, giving up.</blockquote><blockquote>ttyUSB0&lt;*1&gt;: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud</blockquote><blockquote>ttyUSB0&lt;*1&gt;: ATQ0 V1 E1 -- failed with 9600 baud, next try: 9600 baud</blockquote><blockquote>ttyUSB0&lt;*1&gt;: ATQ0 V1 E1 -- and failed too at 115200, giving up.</blockquote><blockquote>ttyUSB1&lt;*1&gt;: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud</blockquote><blockquote>ttyUSB1&lt;*1&gt;: ATQ0 V1 E1 -- failed with 9600 baud, next try: 9600 baud</blockquote><blockquote>ttyUSB1&lt;*1&gt;: ATQ0 V1 E1 -- and failed too at 115200, giving up.</blockquote><blockquote><strong>ttyUSB2&lt;*1&gt;: ATQ0 V1 E1 -- ERROR</strong></blockquote><blockquote><strong>ttyUSB2&lt;*1&gt;: failed with 2400 baud, next try: 9600 baud</strong></blockquote><blockquote><strong>ttyUSB2&lt;*1&gt;: ATQ0 V1 E1 -- ERROR</strong></blockquote><blockquote><strong>ttyUSB2&lt;*1&gt;: failed with 9600 baud, next try: 9600 baud</strong></blockquote><blockquote><strong>ttyUSB2&lt;*1&gt;: ATQ0 V1 E1 -- ERROR</strong></blockquote><blockquote><strong>ttyUSB2&lt;*1&gt;: and failed too at 115200, giving up.</strong></blockquote><blockquote><strong>ttyUSB3&lt;*1&gt;: ATQ0 V1 E1 -- ERROR</strong></blockquote><blockquote><strong>ttyUSB3&lt;*1&gt;: failed with 2400 baud, next try: 9600 baud</strong></blockquote><blockquote><strong>ttyUSB3&lt;*1&gt;: ATQ0 V1 E1 -- ERROR</strong></blockquote><blockquote><strong>ttyUSB3&lt;*1&gt;: failed with 9600 baud, next try: 9600 baud</strong></blockquote><blockquote><strong>ttyUSB3&lt;*1&gt;: ATQ0 V1 E1 -- ERROR</strong></blockquote><blockquote><strong>ttyUSB3&lt;*1&gt;: and failed too at 115200, giving up.</strong></blockquote><blockquote>ttyUSB4&lt;*1&gt;: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud</blockquote><blockquote>ttyUSB4&lt;*1&gt;: ATQ0 V1 E1 -- failed with 9600 baud, next try: 9600 baud</blockquote><blockquote>ttyUSB4&lt;*1&gt;: ATQ0 V1 E1 -- and failed too at 115200, giving up.</blockquote><blockquote>ttyUSB20&lt;*1&gt;: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud</blockquote><blockquote>ttyUSB20&lt;*1&gt;: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud</blockquote><blockquote>ttyUSB20&lt;*1&gt;: ATQ0 V1 E1 -- and failed too at 115200, giving up.</blockquote><blockquote><strong>Sorry, no modem was detected! Is it in use by another program?</strong></blockquote><blockquote>Did you configure it properly with setserial?</blockquote><blockquote>Please read the FAQ at <a href="http://alumnit.ca/wiki/?WvDial" rel="nofollow"> http://alumnit.ca/wiki/?WvDial</a></blockquote><p>--&gt; what can we do?</p><p>Thks to come with a solution quickly</p><p>br</p>
<p>Have you been able or thought of using &quot;gpsd&quot; as the software to speak with the gps module? It provides lots of gps tools.</p>
<p>Is there any answer to this? Mine is also failing at ATZ. I have 2 of these boards and both do the same. I hope I haven't wasted my money</p>
<p>Hi. I got the device to work (USB serial interfaces present), but the wvdial refuses:</p><p>pi@raspberrypi:~ $ wvdial<br>--&gt; WvDial: Internet dialer version 1.61<br>--&gt; Cannot set information for serial port.<br>--&gt; Initializing modem.<br>--&gt; Sending: ATZ<br>ERROR<br>--&gt; Bad init string.</p><p>Where can I find more information about supported AT commands and is it possible to use it without the USB (with lower speed)?</p>

About This Instructable




Bio: Altitude Tech LTD is founded by professionals and students in the area of robotics, electronics and product design, which makes the team the heart of ... More »
More by AltitudeTech:Plotly Graph for Sensly The Raspberry Pi Hat PiAnywhere 4G & LTE Hat for the Raspberry Pi  Sensly Hat For The Raspberry Pi Air Quality & Gas Detector  
Add instructable to: