{"id":2769,"date":"2017-11-27T21:53:09","date_gmt":"2017-11-28T05:53:09","guid":{"rendered":"https:\/\/digitalnigel.com\/wordpress\/?p=2769"},"modified":"2017-11-27T21:54:02","modified_gmt":"2017-11-28T05:54:02","slug":"cellular-iot-connectivity","status":"publish","type":"post","link":"https:\/\/digitalnigel.com\/wordpress\/?p=2769","title":{"rendered":"Cellular IoT Connectivity"},"content":{"rendered":"<p>With the recent interest in &#8220;Internet of Things&#8221; devices, most of the major cellular carriers have started offering very affordable plans targeted at this market.<\/p>\n<ul>\n<li>AT&amp;T is offering prepaid data, and $1\/month\/sim card at\u00a0<a href=\"https:\/\/marketplace.att.com\/iot-connectivity\">https:\/\/marketplace.att.com\/iot-connectivity<\/a><\/li>\n<li>T-Mobile is offering unlimited data (speed restricted) with a minimum of 2 SIMs at $5\/month each, plus $25\/yr for the plan. Assuming you can even get started. Unlike AT&amp;T, they require you to speak with a sales rep, and I haven&#8217;t been able to get them to respond to me more than once. A friend has had a similar experience trying to get started.\u00a0<a href=\"http:\/\/iot.t-mobile.com\/\">http:\/\/iot.t-mobile.com\/<\/a><\/li>\n<li>Verizon seems to be the laggard of the bunch, with very expensive plans. Their model may work alright if you had a large number of devices to use on the pool, but for one or two, the price difference is massive.\u00a0<a href=\"https:\/\/www.verizonwireless.com\/biz\/plans\/m2m-business-plans\/\">https:\/\/www.verizonwireless.com\/biz\/plans\/m2m-business-plans\/<\/a><\/li>\n<\/ul>\n<p>I was interested in setting up a Raspberry Pi with some cellular connectivity for use in a number of potential projects. Some quick ideas might be:<\/p>\n<ul>\n<li>An OOB (Out Of Band) connection to your servers if your main internet link dies, you can still manage them.<\/li>\n<li>A portable iGate for mobile packet operations. This could be useful for example with the high altitude balloon flights I participate in, to have a ground station set up with connectivity.<\/li>\n<li>Add a solar panel, some power management, and a camera for a wilderness webcam. Find a forest\/mountain\/beach\/whatever with a bit of cell service, and set up a webcam.<\/li>\n<\/ul>\n<p>I was looking around at various options for the modem itself, and happened upon a module set up for use with embedded systems from Adafruit (<a href=\"https:\/\/www.adafruit.com\/product\/3147\">https:\/\/www.adafruit.com\/product\/3147<\/a>) and decided to give it a try paired with a Raspberry Pi Zero W.<\/p>\n<p>This module, which supports 3G and 2G networks, I decided to pair with AT&amp;T&#8217;s IoT plans, one because AT&amp;T has a 3G network whereas T-Mobile&#8217;s network is 2G, and because I couldn&#8217;t get T-Mobile&#8217;s sales staff to respond in a timely manner.<\/p>\n<p>The setup is pretty straightforward, and Adafruit has put together a nice tutorial on how to hook up the module to the Raspberry Pi&#8217;s GPIO pins.\u00a0<a href=\"https:\/\/learn.adafruit.com\/fona-tethering-to-raspberry-pi-or-beaglebone-black\/wiring?view=all\">https:\/\/learn.adafruit.com\/fona-tethering-to-raspberry-pi-or-beaglebone-black\/wiring?view=all<\/a><\/p>\n<p>Note that their tutorial is based around their older modules that don&#8217;t support 3G connectivity, so they make some warnings about carrier selection, but if you chose the 3G capable module I listed above, the instructions are just the same. You&#8217;ll wire the module to the Pi&#8217;s serial GPIO pins, ground, and 3.3V power to set the voltage levels.<\/p>\n<p>At this point, it&#8217;s just configuring the software as described in the tutorial. I&#8217;ll add a note of caution here, the serial device naming scheme on the Pis has changed in the Pi3 and PiZero families versus the older Pis. On the newer Pis, \/dev\/ttyAMA0 is not the hardware UART by default, and instead you should be using \/dev\/serial0. So in the PPP peers file you create, make sure to update it appropriately for the right serial device.<\/p>\n<p>Add a little script to startup a reverse SSH tunnel to a device you control when the Pi boots up, and now you&#8217;ve got a device you can drop anywhere with cell service, and remotely manage it.<\/p>\n<p><a href=\"https:\/\/digitalnigel.com\/wordpress\/wp-content\/uploads\/2017\/11\/IMG_5351.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2771\" src=\"https:\/\/digitalnigel.com\/wordpress\/wp-content\/uploads\/2017\/11\/IMG_5351-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"https:\/\/digitalnigel.com\/wordpress\/wp-content\/uploads\/2017\/11\/IMG_5351-300x225.jpg 300w, https:\/\/digitalnigel.com\/wordpress\/wp-content\/uploads\/2017\/11\/IMG_5351-150x113.jpg 150w, https:\/\/digitalnigel.com\/wordpress\/wp-content\/uploads\/2017\/11\/IMG_5351-768x576.jpg 768w, https:\/\/digitalnigel.com\/wordpress\/wp-content\/uploads\/2017\/11\/IMG_5351-1024x768.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Here&#8217;s a quick shot of my setup in development. Bottom row from left to right is some batteries, the FONA cell module, a Arduino Pro Mini, and a small boost regulator to power the Pi. The top row is the Pi Zero W with attached camera, and a proto board to control power on\/off to the Pi and handle voltage translation between the Pi and the Arduino Pro Mini.<\/p>\n<p>The arduino controls power to the Pi, so we can shut down the pi and the cell module for a very low draw sleep, wake up occasionally to take a picture or perform some other task, then go back to sleep again. I plan to add some solar charging to the current setup, and it should be about done at that point.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>With the recent interest in &#8220;Internet of Things&#8221; devices, most of the major cellular carriers have started offering very affordable plans targeted at this market. AT&amp;T is offering prepaid data, and $1\/month\/sim card at\u00a0https:\/\/marketplace.att.com\/iot-connectivity T-Mobile is offering unlimited data (speed &hellip; <a href=\"https:\/\/digitalnigel.com\/wordpress\/?p=2769\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,6],"tags":[],"class_list":["post-2769","post","type-post","status-publish","format-standard","hentry","category-electronics","category-technology"],"_links":{"self":[{"href":"https:\/\/digitalnigel.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2769","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digitalnigel.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digitalnigel.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digitalnigel.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/digitalnigel.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2769"}],"version-history":[{"count":2,"href":"https:\/\/digitalnigel.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2769\/revisions"}],"predecessor-version":[{"id":2773,"href":"https:\/\/digitalnigel.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2769\/revisions\/2773"}],"wp:attachment":[{"href":"https:\/\/digitalnigel.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2769"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digitalnigel.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2769"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digitalnigel.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2769"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}