
Show HN: Gosms – Your own local SMS gateway powered by Golang - Omie6541
http://haxpax.github.io/gosms/
======
Omie6541
A simple SMS gateway that uses GSM Modems to send SMS, can be deployed
locally, supports multiple devices and provides API over HTTP just like
internet based messaging gateways.

// we both are full stack developers looking for full time jobs :
[https://github.com/omie](https://github.com/omie),
[https://github.com/madhurjain](https://github.com/madhurjain)

~~~
lmg643
Very cool. I'm an existing twilio customer, wondering how cheaply I can
implement something like this. What are some recommended GSM modems to use?

~~~
madhurjain
Any generic 2G/3G USB Data Card from Hauwei or ZTE or Netgear or DLink which
shouldn't cost more than 30$ - 40$ Check this link
[http://www.flipkart.com/computers/network-components/data-
ca...](http://www.flipkart.com/computers/network-components/data-
cards/pr?sid=6bo%2C70k%2Co47&ref=8f1d55de-0c3d-4c7a-af50-02c787b1ef00)

~~~
UXDork
Thanks for the info! How much would the cell phone plan cost that allows
unlimited sms messaging?

Is there any reason to use twilio over something like this? Twilio costs
0.0075 / message

~~~
Omie6541
Choosing between twilio or this definitely depends on your use case. Gosms is
handy when you have no internet connection, you require total control over the
infrastructure and such. Use twilio when you don't want to worry about
anything and just send messages. There could be more scenarios too.

Twilio's pricing schemes change per country, for us in India (where 1 Rupee =
100 Paisa and USD 1 = ~62 Rupees), twilio charges 60 paisa per message. At the
same time, some tel-com providers have plans that cost only 5 paisa per
message. India has other limits and regulations but for personal/in-house use
they hardly matter.

~~~
madhurjain
To add to this, If you want to send fast worldwide SMS reliably and without
much hassle, use twilio or plivo or other such web sms gateways. If you want
to send SMS locally, for cheap and willing to hack your way around, give GoSMS
a shot. Given the time a modem takes to send an SMS, with a single modem
connected, the rate of sending SMS is low (~1 message / 5 second).

------
Animats
Nice. The next problem is finding an SMS service provider with good pricing.
Most mainstream cell providers will try to sell you some data/voice/SMS plan
at upwards of $40 a month. There are SMS-only services for which you can buy
SIM cards, but they're either in the price range of regular cell service[1] or
kind of sketchy.[2] Twilio may be more cost-effective. If you have a big
volume of SMS, Twilio or its competitors have more bandwidth (they're tied
directly to the SS7 network) than a single GSM modem.

SMS tends to be an expensive way to send data. There are lots of devices that
send and receive SMS. They're generally things like industrial air
conditioners reporting their status to a maintenance service every hour or so.
The data volume is thus low. If you need to send more than tiny amounts of
data, it's probably better to get a device that gives you an Internet
connection.

[1]
[http://www.embeddedworks.net/m2m-data.html](http://www.embeddedworks.net/m2m-data.html)
[2]
[http://www.mrsimcard.com/s-textsim.html](http://www.mrsimcard.com/s-textsim.html)

------
Yadi
It' so cool to see something like this in GO.

Few years back I tried to implement a prototype very similar to this in C#.

My startup was for sharing routes through out sms, however my tel-com company
was very cringe-y about the idea, so I decided to write one of my own.

Good job folks.

~~~
Omie6541
we too were fed up of tel-com companies over here, limitations like no more
200 messages per sim per day to prevent spam! but we really needed something
for internal uses, just built it. Multiple devices support takes care of per
sim limiataion :)

------
charlesnw
It's nice to have another alternative SMS implementation. The existing ones
(last I looked anyway) were a bit long in the tooth.

(I've been using pushover recently, but have been looking for a good local
(modern) sms gateway).

------
anilgulecha
Since golang can be compiled for android, have you considered wrapping this up
as an android app, which runs as a background api service? Technically you can
use the android provided SMS calls.

(or is there already such an app?).

~~~
Omie6541
golang support on android is very limited. in fact net package is still not
there, so won't be able to run on android as is for now. we thought of adding
android phones support in other way. simply expose the queue over http
endpoint and write an android app that will fetch-send-repeat when its
started. Just short on time, and contributions are welcome :)

------
foxpc
I'm not 100% sure how most people could use this service. While in Lithuania I
could get unlimited text messages (to send inside the country) for less than 5
euros (that's probably like $6), I doubt it would go for long since the text
messages would be one-way and they would block me.

Surely, all providers with cheapish text messaging plans would have clauses
for commercial uses?

~~~
Omie6541
\- This is not another messaging service, this is a software that powers such
services. \- People could host this on their own and use it for their
applications instead of opting for other such services if it suits their use
cases

~~~
foxpc
Thanks for the reply!

I do understand it - you stick your own SIM card to a GSM modem and use this
application to send messages via it.

I'm just contemplating that most providers would not allow endless one-way
text messaging. Unless you have some sort of a business plan that allows this
sort of thing.

Just looking at some use cases where this could replace Twilio/Nexmo but it
seems like you would just get blocked by the carrier if you tried to send
quite a handful of text messages.

P.S. I have nothing against the app and I think it's wonderful and I just
MIGHT use it sometime if I'll need to send messages inside my own country. And
I'll probably get blocked but it might just be worth it as I could just swap
SIM cards as I could get 3000SMS for about 2.5 euros. But that's some black
stuff happening in my mind now!

------
z3t4
I've tried and failed to get gammu wammu to work. Tried both an old usb stick
and and old mobile phone.

Can you recommend any usb stick that works with your program that cost less
then $100 and can be ordered from the EU ? It has to support micro sim and
both send and receive SMS.

~~~
madhurjain
@z3t4 data cards from phone providers are carrier locked and don't allow third
party softwares to access modem via AT commands. We've tried with some generic
data cards from Huawei and ZTE and they work great

For example [http://www.amazon.co.uk/HUAWEI-E3256s-Wireless-Mobile-
Broadb...](http://www.amazon.co.uk/HUAWEI-E3256s-Wireless-Mobile-
Broadband/dp/B00Q2L6WDK/) or
[http://www.amazon.co.uk/computers/dp/B004VU09BU/](http://www.amazon.co.uk/computers/dp/B004VU09BU/)

You'll have to check for micro SIM support though. I haven't come across a
stick which supports micro SIM yet.

------
UXDork
So to set something up that can send thousands of sms (not spam, part of an
app) a day, all I would need is a modem, a server, and this app? Would I need
a cell phone plan or something?

~~~
Omie6541
yup! the GSM Modem you use will need a SIM card which needs an active plan

------
swah
Nice, but what could I use this for? Try to put this information in your
website.

~~~
Omie6541
Can be used to send SMS, where you don't have access to internet or cannot use
web sms gateways or want to save some money per SMS, or have minimal
requirements for personal/internal use and such. thanks though, will push to
readme

~~~
aaronsnoswell
Can you expand some more - does this software connect to a modem to send SMS's
to nearby phones? Is this software similar to a stingray device, or am I
misunderstanding this?

~~~
madhurjain
By modem we mean any GSM Modem device. Like a USB Data Card used for internet
access, or a mobile phone connected via USB. You can send SMS anywhere.
Software just allows you to use your phone / usb data card to send messages.

------
rip747
that's really nice that you already have support for multiple devices. really
awesome project.

