Live data from Hacker News

Simple Raspberry Pi Powered SMS Gateway

blog.haschek.at

21–30 of 85 posts

Re: Simple Raspberry Pi Powered SMS Gateway

#21
post #2

I was looking to get a dedicated Waveshare GSM HAT for the Pi but Twilio is so dirt cheap that I never really got into messing around with a DIY solution.

At 6 cents/SMS, I find Twilio and similar services way too expensive. Compare that to the unlimited SMS plan that I can get for 2€/month here in France, and setting up a gateway like that becomes very attractive.

In my experience it's very unstable however. Sending and receiving SMS can take anywhere from 5 to 30 seconds, and the modem can't do both at the same time. I tried configuring gammu's timeouts, loop delays and whatnot, but couldn't get something that's reliable enough for production.

Re: Simple Raspberry Pi Powered SMS Gateway

#24
post #17

Earlier quoted context omitted.

If you go this route, make sure you absolutely know how to, and that you absolutely lock this down. SIP toll fraud is still a problem and if it happens to you, it can get destructively expensive . https://www.twilio.com/learn/voice-and-video/toll-fraud

Common sense obviously applies. With a cell phone, don't call back to unknown numbers ringing once or twice ("wangiri"). With a SIP trunk, don't allow remote anonymous access.

Yeah I suppose it's really easy to call this common-sense, it probably should be common-sense.

Yet at the same time, if it were common-sense in practice, I probably wouldn't have a job.

Re: Simple Raspberry Pi Powered SMS Gateway

#25
> MMS or Multimedia Messages are supported by gammu but they are stored in a binary format I have yet to find documentation on how to make something usable out of it for download. Any info in it is greatly appreciated.

You could look at this implementation: mmsd-tng [1]. It is used to handle MMSes on the PinePhone for instance.

[1] https://gitlab.com/kop316/mmsd/

Re: Simple Raspberry Pi Powered SMS Gateway

#26

I made something similar a few years back with a Pi 1 and a GSM "hat". It came with a C SDK so I had to write AT commands to communicate directly with the modem and it worked great until I didn't need it anymore. Its purpose was to text me when my power or internet connection went down at home then I could respond with commands such as to shutdown the servers etc. When power/network came back it would text me the new…

Instead of paying for a separate SIM, I've been piggybacking on the "data only" SIMs that Google Fi let's you add to a normal subscription. No extra per-SIM fees, and you just pay for whatever data it uses at $10/gb. More details on my modem, monitoring setup, and IPMI backhaul strategy using Wireguard here: http://jsharkey.org/ipmi/

It surprises me how many people are willing to let Google know their home address.

Re: Simple Raspberry Pi Powered SMS Gateway

#28

I made something similar a few years back with a Pi 1 and a GSM "hat". It came with a C SDK so I had to write AT commands to communicate directly with the modem and it worked great until I didn't need it anymore. Its purpose was to text me when my power or internet connection went down at home then I could respond with commands such as to shutdown the servers etc. When power/network came back it would text me the new…

I like the country wide LoRa networks that are coming up helping with this purpose, all you need is like 1kb per month lol

Re: Simple Raspberry Pi Powered SMS Gateway

#29
post #26

Earlier quoted context omitted.

Instead of paying for a separate SIM, I've been piggybacking on the "data only" SIMs that Google Fi let's you add to a normal subscription. No extra per-SIM fees, and you just pay for whatever data it uses at $10/gb. More details on my modem, monitoring setup, and IPMI backhaul strategy using Wireguard here: http://jsharkey.org/ipmi/

It surprises me how many people are willing to let Google know their home address.

You don't need Google Fi for Google to know your home address. An Android phone will do that. Or Chrome. Or really just broadcasting wifi. Really the problem is you have a home address and someone will sell it to Google.

Re: Simple Raspberry Pi Powered SMS Gateway

#30
post #15

The article is interesting in general, but this line really needs more than "works like a charm": `usb_modeswitch -W -v 12d1 -p 14fe -K -P 14ac -M "55534243000000000000000000000011060000000000000000000000000000"` I mean, I believe you, but ... what on earth IS all of that?

Here's what it sounds like. Most of these types of devices (USB/3G) are "multimode" devices. That is, they can act like either USB storage or a USB 3G/4G device. On Windows, that's handy because it can come up as storage and then the end user can install the drivers right from the device, and the drivers then handle the "mode switching" from storage to 3G/4G-device. It's basically a way to bootstrap operation without…

It has to be said here, that usb_modeswitch software already recognises most modems and has those magic strings saved in a file, and does the switch automagically.

Only if you have a relatively new or rare modem, you need to find the magic string yourself (or even reverse engineer it from a windows setup), to make it work.

Post reply on HN