How to send SMSs with an 8x modem and Ubuntu 

Why start an SMS "farm" ? 

SMS messages are super expensive in France.

0.06€ / message on Twilio, Vonage, etc...

So I've resorted to sending SMSs using private phone plans. They are super cheap in france, 2€/month for unlimited SMSs.

I'm using one such plan to send SMSs today, with an old android phone and an SMS gateway app that's not very reliable. I'm sending low volumes of SMS, so it's doing ok, but i'm getting ready to send way more SMSs for many additional users.

I could try to send all the sms from one phone, but the "unlimited SMS" plans actually have an undisclosed hard limit on how much you can send. 

So i'm planning to pool a bunch of SIM cards, SMS farm style, to send the SMSs of

Picking a modem (95€)

Picture of the modem

The first step was buying a modem pool, i got this one on aliexpress : FIMT 1/8/16/32/64 ports USB modem pool/GSM sms modem /gsm modem pool edge gprs modem driver

It took about 10 days to arrive in France.

The ad only talked about how it would work on Windows, so it was a bit of a gamble to try to use it on an Ubuntu server.

The modem looks alright, the only problem that i see is that the USB and power adaptor look like cheap stuffs, and easily get disconnected. That's in contrast with the very "pro" looking gadget itself.

Sending your first SMS with Ubuntu

It took me forever to understand that this modem didn't need any extra drivers, I was just doing it wrong.

I'm only using one sim card for now, i'll buy more as the needs arise.

First, make sure you disable the SIM PIN code, using any compatible phone.

Then insert the sim in any of the bays, make sure the switch for that bay is on,and turn all the empty slots off.

Connect the antenna because it looks cool (not sure if it does anything really). 

The glorious modem with its sim card

The modem


Close up to show the direction of the sim card

Close up of the sim bay, with the sim card half out to show in which direction to insert it.

Connect the power adapter, the usb cable, turn the device on. The blue led next to the sim should blink shortly every ~5 seconds. 

Turn on your Ubuntu computer.

Let's first install our tools 

sudo apt-get install wvdial screen minicom smstools

Type yes when/if needed


Next, we need to find out modem, run 

sudo wvdialconf

It will scan the various ports to try to find a modem that answers to its requests, and then try to detect the best transfer rate to use.

Edit : wvdialconf stopped working for me a few months after writing the original article. There seem to have been a driver change, and my device, originally listed as /dev/ttyACM6 is now /dev/ttyXRUSB6. wvdialconf could not find it, but it still works fine with different tools. go figure.

It might fail on the first try, then run it again, until you get something like this

Found an USB modem on /dev/ttyACM6.
Modem configuration written to /etc/wvdial.conf.
ttyACM6<Info>: Speed 38400; init "ATQ0 V1 E1 S0=0 &C1 &D2"

We found our modem. Next we'll need to talk directly to it with AT commande, to send our first message. 

The difficulty is that AT commands are a super old standard, and require at some point to send the control character "ctrl+z". If you do that in a normal prompt, it will be recognised as a keyboard shortcut and not be sent as a character.

So we have to connect to the modem using a very low level interface.

sudo screen /dev/ttyACM6 38400

Edit: if wvdialconf didn't work, try to connect using mincom : minicom -D /dev/ttyXRUSB6 . To type the ctrl+z character sequence in minicom, type ctrl+v, then ctrl+z

You need to replace the arguments with the corresponding values returned at the last step.

This opens a blank screen, type AT then press enter, the screen should display an "OK" answer from the modem. 

To go to sms mode, type AT+CMGF=1 and validate with enter. It should reply "OK"

To start an sms, type AT+CMGS="+3362XXXXXXX" (replace the XXX with your actual phone number) and press enter. It should go to the next line and show a ">" character. 

Type the content of your message (possibly on multiple lines) then validate with ctrl+Z

It should lag for a second or two then display something like "+CMGS: 6 OK"

You should then receive the sms on your phone. 

Exit the "screen" command by pressing "ctrl+A" followed by pressing "d".

Summary of the commands :

> Hey there
+CMGS: 6


Once this works, you can investigate SMS servers like smstools 

The basics are to edit the configuration file for smstools to indicate your device location:

sudo nano /etc/smsd.conf

#init = 
device = /dev/ttyXRUSB6
incoming = yes
#pin = 
baudrate = 19200

And then create a file in /var/spool/sms/outgoing/ (the sms outbox) with the sms to send :

To: 33628350XXXX

Hey this is a message from smstools