<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/rss-style.xsl" type="text/xsl"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	     xmlns:dc="http://purl.org/dc/elements/1.1/"
	   xmlns:atom="http://www.w3.org/2005/Atom"
	     xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	  xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>frontlinesms &#8211; Terence Eden’s Blog</title>
	<atom:link href="https://shkspr.mobi/blog/tag/frontlinesms/feed/" rel="self" type="application/rss+xml" />
	<link>https://shkspr.mobi/blog</link>
	<description>Regular nonsense about tech and its effects 🙃</description>
	<lastBuildDate>Tue, 24 Jun 2025 12:25:36 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://shkspr.mobi/blog/wp-content/uploads/2023/07/cropped-avatar-32x32.jpeg</url>
	<title>frontlinesms &#8211; Terence Eden’s Blog</title>
	<link>https://shkspr.mobi/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title><![CDATA[Raspberry Pi and Frontline SMS]]></title>
		<link>https://shkspr.mobi/blog/2012/06/raspberry-pi-and-frontline-sms/</link>
					<comments>https://shkspr.mobi/blog/2012/06/raspberry-pi-and-frontline-sms/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Sun, 24 Jun 2012 00:00:56 +0000</pubDate>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[frontlinesms]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[ota12]]></category>
		<category><![CDATA[Raspberry Pi]]></category>
		<category><![CDATA[sms]]></category>
		<guid isPermaLink="false">http://shkspr.mobi/blog/?p=5963</guid>

					<description><![CDATA[(I think I&#039;m the first person to try this - so I decided to document the process.)  A few weeks ago, I won a Raspberry Pi at the #OTA12 hackday. It arrived on Friday, so I thought I would turn it into an SMS server using the incredible FrontlineSMS.  0. Setting up the Pi  This is the easy part. Follow the excellent guide on the eLinux wiki. Essentially, download the Debian image, extract, and dd…]]></description>
										<content:encoded><![CDATA[<p>(I think I'm the first person to try this - so I decided to document the process.)</p>

<p>A few weeks ago, <a href="https://shkspr.mobi/blog/2012/06/over-the-air-2012/">I won a Raspberry Pi at the #OTA12 hackday</a>. It arrived on Friday, so I thought I would turn it into an SMS server using the incredible <a href="https://web.archive.org/web/20120625055522/https://www.frontlinesms.com/">FrontlineSMS</a>.</p>

<h2 id="0-setting-up-the-pi"><a href="https://shkspr.mobi/blog/2012/06/raspberry-pi-and-frontline-sms/#0-setting-up-the-pi">0. Setting up the Pi</a></h2>

<p>This is the easy part. Follow the <a href="http://elinux.org/RPi_Easy_SD_Card_Setup">excellent guide on the eLinux wiki</a>. Essentially, download the Debian image, extract, and dd it onto an SD card.</p>

<p>The hardest part was <em>finding</em> a full sized SD! In the end, I found an old adapter and stuck in a 2GB micro SD card.</p>

<h1 id="1-first-boot"><a href="https://shkspr.mobi/blog/2012/06/raspberry-pi-and-frontline-sms/#1-first-boot">1. First Boot</a></h1>

<p>My first boot was a failure. Nothing appeared on the screen.  So, I switched off the power, unplugged every lead, plugged them back in, and powered it on.  Success!
<img src="https://shkspr.mobi/blog/wp-content/uploads/2012/06/raspberry-pi-first-boot.jpg" alt="raspberry pi first boot" title="raspberry pi first boot" width="600" height="450" class="aligncenter size-full wp-image-5964"></p>

<p>The first thing I did was ensure the operating system was up to date.</p>

<p>Check for updates:</p>

<pre>sudo apt-get update</pre>

<p>Then, apply those updates</p>

<pre>sudo apt-get upgrade</pre>

<p>This took a few minutes.</p>

<p>Finally, set up <a href="https://web.archive.org/web/20120628112331/http://fusionstrike.com/2012/setting-ssh-ftp-raspberry-pi-debian">SSH</a> or <a href="http://elinux.org/RPi_VNC_Server">VNC</a> if you plan on using the machine remotely.</p>

<h2 id="2-dongle-hardware"><a href="https://shkspr.mobi/blog/2012/06/raspberry-pi-and-frontline-sms/#2-dongle-hardware">2. Dongle Hardware</a></h2>

<p><a href="https://web.archive.org/web/20120710022223/http://www.frontlinesms.com/the-software/requirements/">FrontlineSMS maintains a list of USB dongles which work with its service</a>.  I used a Vodafone branded Huawei E220. Sold as <a target="_blank" href="http://www.amazon.co.uk/mn/search/?_encoding=UTF8&amp;x=0&amp;tag=shkspr-21&amp;linkCode=ur2&amp;y=0&amp;camp=1634&amp;creative=19450&amp;field-keywords=%20K3565&amp;url=search-alias%3Delectronics" rel="noopener">Vodafone K3565</a><img src="https://www.assoc-amazon.co.uk/e/ir?t=shkspr-21&amp;l=ur2&amp;o=2" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;">
<img src="https://shkspr.mobi/blog/wp-content/uploads/2012/06/3G-Dongle-Raspberry-Pi.jpg" alt="3G Dongle Raspberry Pi" title="3G Dongle Raspberry Pi" width="512" height="384" class="aligncenter size-full wp-image-5968">
The Raspberry Pi only has 2 USB slots - the dongle was slim enough not to interfere with the other USB cable, but it did mean I could only run either a keyboard <em>or</em> a mouse without using a hub.  It's recommended that you use a powered USB hub - although my keyboard and mouse didn't seem to draw too much power.</p>

<h2 id="3-frontline-sms"><a href="https://shkspr.mobi/blog/2012/06/raspberry-pi-and-frontline-sms/#3-frontline-sms">3. Frontline SMS</a></h2>

<p>Downloading Frontline SMS via the commandline (using v1.6 because v2 isn't ready for Linux yet)</p>

<pre>wget http://frontlinesms.com/download/secure/FrontlineSMS-distribution-1.6.16.3-linux_i686-dist.zip</pre>

<p>Unzip</p>

<pre>unzip FrontlineSMS-distribution-1.6.16.3-linux_i686-dist.zip</pre>

<p>Run</p>

<pre>cd FrontlineSMS-distribution-1.6.16.3
./FrontlineSMS.sh</pre>

<p>Gave an error - FrontlineSMS requires Java.</p>

<h2 id="4-installing-java"><a href="https://shkspr.mobi/blog/2012/06/raspberry-pi-and-frontline-sms/#4-installing-java">4. Installing Java</a></h2>

<p>The Java install takes about 140MB of disk space.  After downloading and extracting FrontlineSMS, I only had about 220MB of free space. I deleted the FrontlineSMS zip file and had 234MB free.  Just about enough room!</p>

<pre>sudo apt-get install openjdk-6-jdk</pre>

<p>Wait several minutes and you'll be good to go.</p>

<h2 id="5-running-for-the-first-time"><a href="https://shkspr.mobi/blog/2012/06/raspberry-pi-and-frontline-sms/#5-running-for-the-first-time">5. Running for the First Time</a></h2>

<p>Frontline SMS requires a GUI.</p>

<p>Running a GUI is as easy as typing</p>

<pre>startx</pre>

<p>The resolution was set at the slightly odd dimensions of 1264*672 - which meant there was a large black border around the screen.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2012/06/Raspberry-Pi-Resolution.jpg" alt="Raspberry Pi Resolution" title="Raspberry Pi Resolution" width="512" height="384" class="aligncenter size-full wp-image-5965"></p>

<p>Open a terminal (Start, Accessories, LXTerminal, then type</p>

<pre>cd FrontlineSMS-distribution-1.6.16.3
./FrontlineSMS.sh</pre>

<p>After several minutes of waiting, FrontlineSMS started!
<img src="https://shkspr.mobi/blog/wp-content/uploads/2012/06/Frontline-SMS-Raspberry-Pi.jpg" alt="Frontline SMS Raspberry Pi" title="Frontline SMS Raspberry Pi" width="512" height="384" class="aligncenter size-full wp-image-5970"></p>

<p>However, no matter what I tried, I couldn't get FrontlineSMS to detect the dongle.  The OS could see it fine (using "lsusb" and "dmesg"), but it just didn't appear to be detected by FrontlineSMS.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2012/06/FrontlineSMS-unable-to-connect.jpg" alt="FrontlineSMS unable to connect" title="FrontlineSMS unable to connect" width="512" height="295" class="aligncenter size-full wp-image-5973"></p>

<p>A delve into the commandline, showed this error:
<img src="https://shkspr.mobi/blog/wp-content/uploads/2012/06/FrontlineSMS-ARM.jpg" alt="FrontlineSMS ARM" title="FrontlineSMS ARM" width="512" height="384" class="aligncenter size-full wp-image-5974"></p>

<pre>librxtxSerial.so: cannot open shared object file: No such file or directory
(Possible cause: can't load IA 32-bit .so on a ARM-bit platform)
thrown while loading gnu.io.RXTXCommDriver</pre>

<h2 id="6-installing-the-correct-libraries"><a href="https://shkspr.mobi/blog/2012/06/raspberry-pi-and-frontline-sms/#6-installing-the-correct-libraries">6. Installing the Correct Libraries</a></h2>

<p>We need to load the correct (ARM) version of rxtx.</p>

<pre>sudo apt-get install librxtx-java</pre>

<p>Find where the install process has dumped it</p>

<pre>find . -name "librxtxSerial.so"</pre>

<p>It should show you two location - the first being where the correct version is, the second where the FrontlineSMS version is.</p>

<pre>./usr/lib/jni/librxtxSerial.so
./home/pi/Desktop/FrontlineSMS-distribution-1.6.16.3/librxtxSerial.so</pre>

<p>All we need to do is overwrite the incorrect version.</p>

<pre>cp /usr/lib/jni/librxtxSerial.so /home/pi/Desktop/FrontlineSMS-distribution-1.6.16.3/</pre>

<p>Then, run</p>

<pre>./FrontlineSMS.sh</pre>

<p>And, after some warnings and waitings, you should see
<img src="https://shkspr.mobi/blog/wp-content/uploads/2012/06/Raspberry-Pi-Frontline-SMS-Success.jpg" alt="Raspberry Pi Frontline SMS Success" title="Raspberry Pi Frontline SMS Success" width="395" height="226" class="aligncenter size-full wp-image-5976"></p>

<p>Hey Presto! FrontlineSMS up and running on a Raspberry Pi!</p>

<p>(Oh! I finally worked out how to do screenshots! install scrot and run "scrot -d 10" to take a screenshot after 10 seconds.)</p>

<h2 id="7-manually-sending-an-sms"><a href="https://shkspr.mobi/blog/2012/06/raspberry-pi-and-frontline-sms/#7-manually-sending-an-sms">7. Manually Sending an SMS</a></h2>

<p>Running FrontlineSMS via Java on a 700MHz ARM device is <strong>very slow</strong>.  It is possible to talk directly to the dongle and manually tell it to send SMS.</p>

<p>First, I installed picocom.</p>

<pre>sudo apt-get install picocom</pre>

<p>To find out where the dongle has been installed, type:</p>

<pre>dmesg</pre>

<p>Which will give an long output, which should contain some text like this like this:</p>

<pre>option 1-1.2:1.1: GSM modem (1-port) converter detected
usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB0
option 1-1.2:1.0: GSM modem (1-port) converter detected
usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB1
</pre>

<p>The dongle installs itself in two places - ttyUSB0 &amp; 1.  It's the first one we want.</p>

<p>Connect by issuing this command</p>

<pre>picocom /dev/ttyUSB0 -b 115200 -l</pre>

<p>Which will give you the output</p>

<pre>port is        : /dev/ttyUSB0
flowcontrol    : none
baudrate is    : 115200
parity is      : none
databits are   : 8
escape is      : C-a
noinit is      : no
noreset is     : no
nolock is      : yes
send_cmd is    : ascii_xfr -s -v -l10
receive_cmd is : rz -vv

Terminal ready
</pre>

<p>From now on in, we're typing commands directly into the dongle. You cannot press the delete key! Copy &amp; paste, or be careful when typing!</p>

<p>First, to make sure everything is working, we type</p>

<pre>AT</pre>

<p>We should see this response</p>

<pre>OK</pre>

<p>Next, set the dongle to text mode</p>

<pre>AT+CMGF=1</pre>

<p>Again, the response should be</p>

<pre>OK</pre>

<p>Let's send our first SMS!</p>

<pre>AT+CMGS="+447700900123"</pre>

<p>This will <em>not</em> say "OK", rather, it will prompt us to type a message</p>

<pre>&gt; </pre>

<p>Type your message, so the screen looks like</p>

<pre>&gt; This is a test</pre>

<p><strong>DO NOT HIT ENTER</strong>.  Instead, hit CTRL and Z at the same time.</p>

<p>You should see a response like</p>

<pre>+CMGS: 193

OK</pre>

<p>The number is the "sent items" reference.  Within a few moments, the SMS should have been received.</p>

<p>You can send an SMS to the dongle.  To check for messages, type the command</p>

<pre>AT+CMGL="ALL"</pre>

<p>You should see all the messages in the inbox</p>

<pre>+CMGL: 0,"REC READ","+447700900000",,"12/06/19,13:53:19+04"
Received
+CMGL: 1,"REC READ","+447700900321",,"12/06/23,17:16:29+04"
Testing
+CMGL: 2,"REC UNREAD","+447700900555",,"12/06/23,23:27:48+04"
This is another test</pre>

<p>To quit picocom, hold down CTRL, then hold down A, then hold down X.</p>

<h2 id="useful-links"><a href="https://shkspr.mobi/blog/2012/06/raspberry-pi-and-frontline-sms/#useful-links">Useful Links</a></h2>

<p>A collection of links I found useful when writing this blog post</p>

<ul>
<li><a href="http://designbuildtestrepeat.wordpress.com/2008/04/29/huawei-e220-on-linux-for-sms/">http://designbuildtestrepeat.wordpress.com/2008/04/29/huawei-e220-on-linux-for-sms/</a></li>
<li><a href="http://www.diafaan.com/sms-tutorials/gsm-modem-tutorial/">http://www.diafaan.com/sms-tutorials/gsm-modem-tutorial/</a></li>
<li><a href="https://web.archive.org/web/20120127031258/https://www.shapeshifter.se/2008/04/30/list-of-at-commands/">http://www.shapeshifter.se/2008/04/30/list-of-at-commands/</a></li>
<li><a href="https://web.archive.org/web/20120604060936/http://raspberrypi.homelabs.org.uk/raspberrypi-the-arduino-development-tool/">http://raspberrypi.homelabs.org.uk/raspberrypi-the-arduino-development-tool/</a></li>
<li><a href="https://web.archive.org/web/20120523234431/http://developer.vodafone.com/labs/opensource/linux-connection-manager/operating-systems/ubuntu-linux-setup/">http://developer.vodafone.com/labs/opensource/linux- connection-manager/operating-systems/ubuntu-linux-setup/</a></li>
<li><a href="https://web.archive.org/web/20120623222301/https://wintechmobiles.com/tools/huawei-code-calculator/">For unlocking Huawei modems</a></li>
</ul>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=5963&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2012/06/raspberry-pi-and-frontline-sms/feed/</wfw:commentRss>
			<slash:comments>14</slash:comments>
		
		
			</item>
	</channel>
</rss>
