GithubHelp home page GithubHelp logo

gregvish / gsm-matrix-gw Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 1.0 59 KB

GSM call forwarding to Matrix. A bot that forwards calls (or SMS) from a 4G modem to a Matrix room.

License: GNU Affero General Public License v3.0

Dockerfile 2.32% Python 96.19% Shell 1.49%

gsm-matrix-gw's Introduction

GSM to Matrix Call Gateway Bot

GSM call forwarding to Matrix. A bot that forwards calls (or SMS) from a Quectel EG25 LTE modem to a Matrix room.

Required setup:

Prerequisites

This uses docker, and also assumes a proper setup of the hardware on the host environment. Essentially, the following udev rules should be placed (for examle) into /etc/udev/rules.d/89-lte-modem.rules on the host machine:

ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0125", ENV{PULSE_IGNORE}="1"
DRIVERS=="usb", KERNEL=="*cdc-wdm*", GROUP="dialout"

The Vendor and Product IDs here match the Quectel modem. This is necessary for the USB sound-card exposed by the modem to the host to be available for this software, and for permissions to be matching (dialout group, precisely). Running cat /proc/asound/cards should show something like the following with regards to the Quectel modem soundcard:

$ cat /proc/asound/cards
...
 2 [Module         ]: USB-Audio - LTE Module
                      Quectel, Incorporated LTE Module at usb-0000:00:14.0-4.1, high speed

The name of the soundcard is Module. Apart from this, the AT command port of the modem should be found, on a path like /dev/ttyUSB2, and the QMI port under /dev/cdc-wdm0. Both need to be usable by the dialout group on your host.

Building and running

./doit.sh --homeserver <YOUR-HOMESERVER> --user <BOT-USER>  --password <BOT-PASSWORD> --udp_port 49572 --modem_tty /dev/ttyUSB2 --modem_dev /dev/cdc-wdm0

The udp_port can be any UDP port that you forwarded from your router to the host machine (has to be the same port number internally and externally). This builds the docker image, and runs it as daemon that also survives reboots. The ouput can be seen using docker logs -f gsm-matrix-gw-container

gsm-matrix-gw's People

Contributors

gregvish avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ferenc-

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.