Can Kannel run in docker and be connected to a usb modem?
-
Clone the project
-
Copy
env-samplefile to.env$ cp env-sample .env -
Connect your usb modem
- Obtain the
ttythe usb modem is connected to by executing the command;
$ dmesg | grep tty - Obtain the
-
Update your
.envfileKANNEL_DEVICE_TTYwith the usb modemtty. -
On
main.ymlonbearerbox.devicescheck if the usb modemttyis listed and if its not add it. -
Create directory
conf.dand copybearerbox.conf,redis.conf,sms-service.confandmodem.conffromconf.d.sampletoconf.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
.envfile variables.In the
conf.d.sampledirectory I have included myhuawei e3131modem 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
wiresharkusbpcapto sniff it to obtain itsinit-string.