https://github.com/toby1991/sms-forwarder
A notifier that forward your sms from chip sim800c.
https://github.com/toby1991/sms-forwarder
chip forwarder pdu pushover sim800c sms usb-serial
Last synced: 5 months ago
JSON representation
A notifier that forward your sms from chip sim800c.
- Host: GitHub
- URL: https://github.com/toby1991/sms-forwarder
- Owner: toby1991
- License: apache-2.0
- Created: 2019-08-20T19:07:27.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-01-25T16:38:47.000Z (over 4 years ago)
- Last Synced: 2024-06-20T12:04:02.177Z (about 2 years ago)
- Topics: chip, forwarder, pdu, pushover, sim800c, sms, usb-serial
- Language: Go
- Homepage:
- Size: 2.42 MB
- Stars: 10
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SMS Serial Chip Forwarder
## ScreenShot

* sim800c [I bought here](https://item.taobao.com/item.htm?id=584802370108) ¥44.50
```bash
> ./sms-notifier sms:read /dev/ttyUSB1
INFO[2019-08-21T02:44:49+08:00] Send Bytes bytes="ATE0\r\n" length=6
INFO[2019-08-21T02:44:49+08:00] Send Bytes bytes="AT+CMEE=1\r\n" length=11
INFO[2019-08-21T02:44:49+08:00] Send Bytes bytes="AT+CMGF=0\r\n" length=11
INFO[2019-08-21T02:44:49+08:00] Listening com_port=/dev/ttyUSB1
INFO[2019-08-21T02:44:49+08:00] Incoming data data=OK
```
## How To Use
1. Plug in your USB chip
2. find your serial port name -> `ls -l /dev/ttyUSB*`
```bash
> ls -l /dev/ttyUSB*
crw-rw----. 1 root dialout 188, 1 8月 21 02:47 /dev/ttyUSB0
```
3. Copy `.env.example.json` -> `.env.json`
4. Save your `pushover` config in `.env.json`
5. `go run artisan.go sms:read /dev/YOUR-SERIAL`, such as `/dev/ttyUSB0`
## Docker
```shell
docker run --rm -it -d \
--device=/dev/ttyUSB0 \
-e TOTOVAL_PUSHOVER_USER=YOUR_PUSHOVER_USER \
-e TOTOVAL_PUSHOVER_TOKEN=YOUR_PUSHOVER_TOKEN \
-e TOTOVAL_PUSHOVER_DEVICE="" \
toby1991/sms-forwarder:latest
```
## Implement your own NOTIFIER
`/app/logics/phone/interfaces/notifier.go`
```go
package interfaces
type Notifier interface {
Notify(sender, content string) error
}
```
## Thanks
* http://www.sendsms.cn/pdu/