Skip to content

Call me bond.... API for making calls, sending messages and USSD codes over serial connection to a compatible modem, utilizing AT commands.

License

Notifications You must be signed in to change notification settings

myInstagramAlternative/callmebjb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API for using gsm module over serial

Initially, I wrote this because I don't want to pay for a crappy Twilio service. I just needed a way to make calls to my phone to wake me up in case of an alarm on Home Assistant or some other service, especially if I'm not connected to the internet.

This API should work best with the SIM868 module and probably will work with most Waveshare GSM modules, as well as other AT command-based modems. If not, you will need to change some code.

The code is not great but it gets the job done. There isn't a queue or any special processor that watches serial output, so it's not meant to be used in production.

Used with this GSM module and prepaid SIM card.

TODO

  • Simple auth

  • Call endpoint with audio file

    I may add new endpoint for making calls with uploaded audio since most of the dev GSM modules support audio in/out so you can connect it your RPi and emulate micrphone.

  • Read SMS inbox (if possible or create one in memory)

Config example

modem:
  port: "/dev/tty.usbserial-0001" # Find your port with `ls /dev/tty.*`
  baudrate: 115200 # RTFM
server:
  listen: "localhost"
  port: "8081"

by default it will look for config.yaml in the same directory as the binary, you can set CONFIG_PATH env var

Building

For RPi 0w

GOOS=linux GOARCH=arm GOARM=6 go build

See other GOARM values for RPi here and here

Development

Generates OPENAPI spec with deepmap/oapi-codegen

go generate

About

Call me bond.... API for making calls, sending messages and USSD codes over serial connection to a compatible modem, utilizing AT commands.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages