sms-receiver/README.md

71 lines
2.8 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
2019-07-16 14:13:42 +02:00
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. `imei` is optional and if specified it will cause the agent to run ```AT+EMGR=1,7,"imei"``` on the target modem.
2019-07-16 12:43:51 +02:00
2019-07-16 14:13:42 +02:00
*agent/config/gsm.json*
2019-07-16 12:43:51 +02:00
```
2019-07-16 14:13:42 +02:00
[
{
"dev":"/dev/ttyUSB0",
"msisdn":"+393409821322",
"imei":"990000862471854"
},
{
"dev":"/dev/ttyUSB1",
"msisdn":"+443312123452"
},
{
"dev":"/dev/ttyUSB2",
"msisdn":"+913446435634"
},
{
"dev":"/dev/ttyUSB3",
"msisdn":"+12456345344"
}
]
2019-07-16 12:43:51 +02:00
```
Hostname and secret key used for updating the frontend. May as well be http://127.0.0.1
2019-07-16 14:13:42 +02:00
*agent/config/api.json*
2019-07-16 12:43:51 +02:00
```
2019-07-16 14:13:42 +02:00
{
"url":"https://sms.lsd.cat",
"key":"supersecretegakey1234123"
}
2019-07-16 12:43:51 +02:00
```
2019-07-16 14:13:42 +02:00
*frontend/config/api.json*
2019-07-16 12:43:51 +02:00
```
2019-07-16 14:13:42 +02:00
{
"key":"supersecretegakey1234123"
}
2019-07-16 12:43:51 +02:00
```