Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

gen2brain/gsmgo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GSMGo

Introduction

GSMGo is SMS HTTP server with REST API, written in Go language.

Server enables you to send SMS messages with simple HTTP POST request:

# curl -X POST -d '{"text": "Message Example", "number": "+38164182xxxx"}' http://localhost:38164
{
"message": "success",
"status": "OK"
}

GSMGo uses libGammu so it has support for many different phones. Check Gammu Phone Database for details.

Download

Binaries are compiled with static build of libGammu, so gammu/libgammu is not required to be installed.

Usage

Usage of gsmgo:
  -bind string
        Bind address (default ":38164")
  -config string
        Config file
  -debug
	    Enable debugging
  -password string
        Password
  -username string
        Username

If you start server with username and password, it will be protected with HTTP Basic Auth.

Config file is required. Example config is shown below, it will be searched for in /etc/gsmgo.conf then ~/.gsmgo.conf and finally in directory where binary is located. You can also point it with -config option.

[gammu]
device = /dev/ttyACM0
name = Ericsson Ericsson_F3507g_Mobile_Broadband_Minicard_Composite_Device
connection = at

You can try to detect your device with gammu-detect from gammu package and then just copy /etc/gammurc file to /etc/gsmgo.conf.

Compile

Install libgammu library and devel package:

apt-get install libgammu-dev libgammu

Install server to $GOPATH/bin:

go get github.com/gen2brain/gsmgo
go install github.com/gen2brain/gsmgo/server/gsmgo