Can Kannel run in docker and be connected to a usb modem?
-
Clone the project
-
Copy
env-sample
file to.env
$ cp env-sample .env
-
Connect your usb modem
- Obtain the
tty
the usb modem is connected to by executing the command;
$ dmesg | grep tty
- Obtain the
-
Update your
.env
fileKANNEL_DEVICE_TTY
with the usb modemtty
. -
On
main.yml
onbearerbox.devices
check if the usb modemtty
is listed and if its not add it. -
Create directory
conf.d
and copybearerbox.conf
,redis.conf
,sms-service.conf
andmodem.conf
fromconf.d.sample
toconf.d
.$ mkdir conf.d && cp conf.d.sample/bearerbox.conf conf.d.sample/modem.conf conf.d.sample/redis.conf conf.d.sample/sms-service.conf conf.d
-
Update the remaining
.env
file variables.In the
conf.d.sample
directory I have included myhuawei e3131
modem configuration as a sample.Kannel GSM Modem guide provides a guide on how to obtain and set these values.
-
Build and run;
$ docker-compose -f main.yaml up --build
-
Examine CLI for any errors, if all ok test sending as follows;
$ lynx -dumps http://localhost:8008//cgi-bin/sendsms?username=kannel&password=kannel&to=&text=
-
New lines have meaning and should only be used to separate configuration groups.
-
If your USB modem has a windows application or device drivers that are used to connect to it, you could use
wireshark
usbpcap
to sniff it to obtain itsinit-string
.