Sending text messages from a Raspberry Pi with Nerves

submited by
Style Pass
2021-07-28 14:00:09

I recently got to play around with a Raspberry Pi Zero W and a Waveshare GSM/GPRS/GNSS Hat, a relatively low-cost module (~30USD) for sending text messages, making phone calls, using mobile internet, and tracking your geolocation. In the following, I will walk you through how to set up the hardware and create a simple project for sending out text messages using Nerves and Elixir.

I struggled with this a bit (because I didn’t read the manual), so let me explain how you install the SIM card on the Waveshare Hat.

You first need to slide down the SIM card tray towards the battery holder. The tray has “Open” and “Closed” markings, which indicate in which direction you need to slide the tray. After you opened the tray, put in the SIM card, preferably in the largest SIM card plastic holding form in which it came. Otherwise, your SIM card might move around and lose connection to the Waveshare Hat. Close the tray and slide the tray into the “Closed” direction.

Use the 40 PIN GPIO Header to connect the Waveshare Hat with the Raspberry Pi. I stuck the long end of the pins into the Waveshare hat and the short ones into the Raspberry Pi. This way, it is easier to solder the pins onto the Raspberry Pi, and the Waveshare Hat has a good distance to the Raspberry Pi.

Leave a Comment