sms-receiver/README.md

52 lines
2.4 KiB
Markdown
Raw Normal View History

2019-07-16 12:43:51 +02:00
# sms-receiver
## Purpose
Many websites allow you to freely receive sms and most of them are ad supported. They are mostly used for registration to services which do require phone number confirmation. Some of this services can be tricked by using a Voip numbers as the ones provided for example by [Nexmo](https://www.nexmo.com/) while others try to detect Voip numbers and discard them so a physicial SIM may be required.
This is a simple build of a cheap device that can receive SMS from multiple physical numbers and publish their contents on a web server in real time. It also integrates the use of Voip numbers.
It is an open source clone of something like this [16 MTK GSM Modem Bulk](https://aliexpress.com/item/32854256758.html)
## Hardware
| # | Part | Cost |
|---|------|------|
| 4 | [AI-Thinker A6 GSM Module](https://it.aliexpress.com/item/32886046720.html) | ~23 |
| 4 | [USB TTL Adapter](https://www.aliexpress.com/item/32831329095.html) | ~3 |
| 1 | [NanoPI Neo 2](https://aliexpress.com/item/32975776753.html) | ~20 |
| 1 | [16GB MicroSD](https://www.aliexpress.com/item/32855791603.html) | ~3 |
| 1 | [4 Port USB Hub](https://www.aliexpress.com/item/1242714664.html) | ~1 |
| 1 | [5V 10A Power Supply](https://www.aliexpress.com/item/32983648084.html) | ~9 |
| n | Spare cables | ~3 |
| Total | ~70eur |
## Pictures
Soon
## Software
The NanoPI Neo2 is used for controlling the GSM modules. Any other device which can be powered via USB or via 5V DC and has a usb port which suppport a USB Hub is fine. Adding more modules should be trivial by just using a bigger USB hub.
The code is written in python and simply opens a serial connection with any modem to check for incoming messages. When messages are found, the agent will send a put request with the message's sender and text to the web fronted which can be either hosted on the same machine or elsewhere
## Config
Numbers needs to be specified because most of the times they aren't written on the sim card. Sim cards may be hotswapped, but if this config isn't updated the wrong receiving number will be displayed on the frontend.
*agent/config/gsm.ini*
```
/dev/ttyUSB0 +393409821322
/dev/ttyUSB1 +443312123452
/dev/ttyUSB2 +913446435634
/dev/ttyUSB3 +12456345344
```
Hostname and secret key used for updating the frontend. May as well be http://127.0.0.1
*agent/config/api.ini*
```
https://sms.lsd.cat
supersecretegakey1234123
```
*frontend/config/api.ini*
```
supersecretegakey1234123
```