Code Monkey home page Code Monkey logo

sms-gammu-gateway's People

Contributors

diyfr avatar gpailler avatar inode- avatar muaddibvv avatar pajikos avatar renovate[bot] avatar szyzu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sms-gammu-gateway's Issues

[Feature request] Delete SMS

Feature request

First of all, thank you for sharing your code which works flawlessly for me. However, I did not see any way to delete SMS, either all of them or by specifying a specific id.

Would this be something you might consider ?

I might be able to submit a PR if this is something you are interested in.

Thank you

Error writing to the device

Hello,
I have new issue. After several hours, gammu can't communicate with modem.

[2022-07-20 10:34:36,055] ERROR in app: Exception on /signal [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1516, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1502, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "/usr/local/lib/python3.10/site-packages/flask_restful/__init__.py", line 467, in wrapper
    resp = resource(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/flask/views.py", line 84, in view
    return current_app.ensure_sync(self.dispatch_request)(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/flask_restful/__init__.py", line 582, in dispatch_request
    resp = meth(*args, **kwargs)
  File "/sms-gw/./run.py", line 52, in get
    return machine.GetSignalQuality()
gammu.ERR_DEVICEWRITEERROR: {'Text': 'Error writing to the device.', 'Where': 'GetSignalQuality', 'Code': 11}
192.168.2.5 - - [20/Jul/2022 10:34:36] "GET /signal HTTP/1.1" 500 -
[2022-07-20 10:34:46,352] ERROR in app: Exception on /getsms [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1516, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1502, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "/usr/local/lib/python3.10/site-packages/flask_restful/__init__.py", line 467, in wrapper
    resp = resource(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/flask/views.py", line 84, in view
    return current_app.ensure_sync(self.dispatch_request)(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/flask_restful/__init__.py", line 582, in dispatch_request
    resp = meth(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/flask_httpauth.py", line 172, in decorated
    return self.ensure_sync(f)(*args, **kwargs)
  File "/sms-gw/./run.py", line 60, in get
    status = machine.GetSMSStatus()
gammu.ERR_DEVICEWRITEERROR: {'Text': 'Error writing to the device.', 'Where': 'GetSMSStatus', 'Code': 11}
192.168.2.5 - - [20/Jul/2022 10:34:46] "GET /getsms HTTP/1.1" 500 -
 * Serving Flask app 'run' (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on all addresses.
   WARNING: This is a development server. Do not use it in a production deployment.
 * Running on http://172.17.0.4:5000/ (Press CTRL+C to quit)

After restarting only docker container without restarting USB modem it works again without error:

192.168.2.55 - - [20/Jul/2022 10:35:01] "GET /signal HTTP/1.1" 200 -
192.168.2.5 - - [20/Jul/2022 10:35:06] "GET /signal HTTP/1.1" 200 -
192.168.2.5 - - [20/Jul/2022 10:35:06] "GET /getsms HTTP/1.1" 200 -

Service is restarting

Hi,
I'm using your sms gateway in docker, with this config:

cat docker-compose.yaml

version: '3'
services:
  sms-gammu-gateway:
    container_name: sms-gammu-gateway
    restart: always
    privileged: true
    image: pajikos/sms-gammu-gateway
    environment:
      - PIN=""
      - TZ=Europe/Bratislava
#    network_mode: host
    ports:
      - "192.168.2.5:5000:5000"
    volumes:
#      - /docker_data/sms-gammu-gw/credentials.txt:/sms-gw/credentials.txt
      - /docker_data/sms-gammu-gw/:/sms-gw/
    devices:
      - /dev/serial/by-id/usb-HUAWEI_Technology_HUAWEI_Mobile-if00-port0:/dev/mobile

I have noticed, that service is after some time restarting, but I can't see any error in logs. It is because of WSGI web server ?

docker container logs

 * Serving Flask app 'run' (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on all addresses.
   WARNING: This is a development server. Do not use it in a production deployment.
 * Running on http://172.19.0.2:5000/ (Press CTRL+C to quit)
192.168.2.5 - - [07/Jun/2022 21:22:58] "GET /getsms HTTP/1.1" 200 -
192.168.2.5 - - [07/Jun/2022 21:23:07] "GET /signal HTTP/1.1" 200 -
192.168.2.54 - - [07/Jun/2022 21:23:16] "GET /signal HTTP/1.1" 200 -
192.168.2.54 - - [07/Jun/2022 21:23:17] "GET /favicon.ico HTTP/1.1" 404 -
192.168.2.5 - - [07/Jun/2022 21:23:18] "GET /getsms HTTP/1.1" 200 -
192.168.2.54 - - [07/Jun/2022 21:23:23] "GET /signal HTTP/1.1" 200 -
192.168.2.5 - - [07/Jun/2022 21:23:37] "GET /signal HTTP/1.1" 200 -
192.168.2.5 - - [07/Jun/2022 21:23:38] "GET /getsms HTTP/1.1" 200 -
192.168.2.5 - - [07/Jun/2022 21:23:58] "GET /getsms HTTP/1.1" 200 -
192.168.2.5 - - [07/Jun/2022 21:24:07] "GET /signal HTTP/1.1" 200 -
 * Serving Flask app 'run' (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on all addresses.
   WARNING: This is a development server. Do not use it in a production deployment.
 * Running on http://172.19.0.2:5000/ (Press CTRL+C to quit)
192.168.2.5 - - [07/Jun/2022 21:24:58] "GET /getsms HTTP/1.1" 200 -
192.168.2.5 - - [07/Jun/2022 21:25:07] "GET /signal HTTP/1.1" 200 -
192.168.2.5 - - [07/Jun/2022 21:25:18] "GET /getsms HTTP/1.1" 200 -
192.168.2.5 - - [07/Jun/2022 21:25:37] "GET /signal HTTP/1.1" 200 -
192.168.2.5 - - [07/Jun/2022 21:25:38] "GET /getsms HTTP/1.1" 200 -
192.168.2.5 - - [07/Jun/2022 21:25:58] "GET /getsms HTTP/1.1" 200 -
192.168.2.5 - - [07/Jun/2022 21:26:07] "GET /signal HTTP/1.1" 200 -
 * Serving Flask app 'run' (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on all addresses.
   WARNING: This is a development server. Do not use it in a production deployment.
 * Running on http://172.19.0.2:5000/ (Press CTRL+C to quit)
192.168.2.5 - - [07/Jun/2022 21:26:58] "GET /getsms HTTP/1.1" 200 -

Even ping is unavailable.

PING 172.19.0.2 (172.19.0.2) 56(84) bytes of data.
64 bytes from 172.19.0.2: icmp_seq=1 ttl=64 time=0.031 ms
64 bytes from 172.19.0.2: icmp_seq=2 ttl=64 time=0.021 ms
64 bytes from 172.19.0.2: icmp_seq=3 ttl=64 time=0.022 ms
64 bytes from 172.19.0.2: icmp_seq=4 ttl=64 time=0.029 ms
64 bytes from 172.19.0.2: icmp_seq=5 ttl=64 time=0.084 ms
64 bytes from 172.19.0.2: icmp_seq=6 ttl=64 time=0.026 ms
64 bytes from 172.19.0.2: icmp_seq=7 ttl=64 time=0.019 ms
64 bytes from 172.19.0.2: icmp_seq=8 ttl=64 time=0.022 ms
64 bytes from 172.19.0.2: icmp_seq=9 ttl=64 time=0.068 ms
64 bytes from 172.19.0.2: icmp_seq=10 ttl=64 time=0.076 ms
64 bytes from 172.19.0.2: icmp_seq=11 ttl=64 time=0.098 ms
From 172.19.0.1 icmp_seq=13 Destination Host Unreachable
From 172.19.0.1 icmp_seq=14 Destination Host Unreachable
From 172.19.0.1 icmp_seq=15 Destination Host Unreachable
From 172.19.0.1 icmp_seq=16 Destination Host Unreachable
From 172.19.0.1 icmp_seq=17 Destination Host Unreachable
From 172.19.0.1 icmp_seq=18 Destination Host Unreachable
From 172.19.0.1 icmp_seq=19 Destination Host Unreachable
From 172.19.0.1 icmp_seq=20 Destination Host Unreachable
From 172.19.0.1 icmp_seq=21 Destination Host Unreachable
From 172.19.0.1 icmp_seq=22 Destination Host Unreachable
From 172.19.0.1 icmp_seq=23 Destination Host Unreachable
From 172.19.0.1 icmp_seq=24 Destination Host Unreachable
From 172.19.0.1 icmp_seq=25 Destination Host Unreachable
From 172.19.0.1 icmp_seq=26 Destination Host Unreachable
From 172.19.0.1 icmp_seq=27 Destination Host Unreachable
From 172.19.0.1 icmp_seq=28 Destination Host Unreachable
From 172.19.0.1 icmp_seq=29 Destination Host Unreachable
From 172.19.0.1 icmp_seq=30 Destination Host Unreachable
From 172.19.0.1 icmp_seq=31 Destination Host Unreachable
From 172.19.0.1 icmp_seq=32 Destination Host Unreachable
From 172.19.0.1 icmp_seq=33 Destination Host Unreachable
From 172.19.0.1 icmp_seq=34 Destination Host Unreachable
From 172.19.0.1 icmp_seq=35 Destination Host Unreachable
From 172.19.0.1 icmp_seq=36 Destination Host Unreachable
From 172.19.0.1 icmp_seq=37 Destination Host Unreachable
From 172.19.0.1 icmp_seq=40 Destination Host Unreachable
From 172.19.0.1 icmp_seq=41 Destination Host Unreachable
From 172.19.0.1 icmp_seq=42 Destination Host Unreachable
64 bytes from 172.19.0.2: icmp_seq=43 ttl=64 time=0.039 ms
64 bytes from 172.19.0.2: icmp_seq=44 ttl=64 time=0.066 ms
64 bytes from 172.19.0.2: icmp_seq=45 ttl=64 time=0.066 ms
64 bytes from 172.19.0.2: icmp_seq=46 ttl=64 time=0.072 ms
64 bytes from 172.19.0.2: icmp_seq=47 ttl=64 time=0.086 ms
64 bytes from 172.19.0.2: icmp_seq=48 ttl=64 time=0.039 ms
64 bytes from 172.19.0.2: icmp_seq=49 ttl=64 time=0.018 ms
64 bytes from 172.19.0.2: icmp_seq=50 ttl=64 time=0.027 ms
64 bytes from 172.19.0.2: icmp_seq=51 ttl=64 time=0.053 ms
64 bytes from 172.19.0.2: icmp_seq=52 ttl=64 time=0.060 ms
64 bytes from 172.19.0.2: icmp_seq=53 ttl=64 time=0.024 ms
64 bytes from 172.19.0.2: icmp_seq=54 ttl=64 time=0.044 ms
64 bytes from 172.19.0.2: icmp_seq=55 ttl=64 time=0.022 ms

ERROR in app: Exception on /getsms [GET]

Hi,
nice work with this addon. I'm trying it in docker. I can successfully read signal, but /getsms show exception error:

192.168.2.5 - - [04/Sep/2020 22:24:52] "GET /signal HTTP/1.1" 500 -
[2020-09-04 22:24:52,858] ERROR in app: Exception on /getsms [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python3.8/site-packages/flask_restful/__init__.py", line 468, in wrapper
    resp = resource(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/flask/views.py", line 89, in view
    return self.dispatch_request(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/flask_restful/__init__.py", line 583, in dispatch_request
    resp = meth(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/flask_httpauth.py", line 163, in decorated
    return f(*args, **kwargs)
  File "./run.py", line 78, in get
    machine.DeleteSMS(Folder=0, Location=sms[0]['Location'])
gammu.ERR_MEMORY_NOT_AVAILABLE: {'Text': 'The type of memory is not available or has been disabled.', 'Where': 'DeleteSMS', 'Code': 81}

My docker_compose.yaml:

version: '3'
services:
  sms-gammu-gateway:
    container_name: sms-gammu-gateway
    restart: always
    image: pajikos/sms-gammu-gateway
    environment:
      - PIN=""
      - TZ=Europe/Bratislava
    network_mode: host
    ports:
      - "5000:5000"
    volumes:
      - /data/_docker/sms-gammu-gw/credentials.txt:/sms-gw/credentials.txt
    devices:
      - /dev/serial/by-id/usb-HUAWEI_Technology_HUAWEI_Mobile-if00-port0:/dev/mobile

Testing on host server outside of docker:

my device::

Bus 002 Device 012: ID 12d1:1001 Huawei Technologies Co., Ltd. E161/E169/E620/E800 HSDPA Modem

gammu -c gammu.config identify

Zariadenie           : /dev/serial/by-id/usb-HUAWEI_Technology_HUAWEI_Mobile-if00-port0
Výrobca             : Huawei
Model                : E1752 (E1752)
Firmware             : 11.126.13.00.00
IMEI                 : 359853037938320
SIM IMSI             : 231060101939374

gammu -c gammu.config getallsms

Umiestnenie 100001, zložka "Prijaté", pamäť telefónu, Doručené správy
SMS správa
SMSC číslo         : "+421903333000"
Odoslané            : Pi  4. september 2020, 22:08:30 +0200
Kódovanie           : Unicode (bez kompresie)
Vzdialené čísla   : "+421903xxxxxx"
Stav                 : Prečítané

+ľščťžýáíé=oó

Umiestnenie 100002, zložka "Prijaté", pamäť telefónu, Doručené správy
SMS správa
SMSC číslo         : "+421903333000"
Odoslané            : Pi  4. september 2020, 22:13:50 +0200
Kódovanie           : Východzia GSM abeceda (bez kompresie)
Vzdialené čísla   : "+421903xxxxxx"
Stav                 : Prečítané

Test

-bash: git: command not found

Hi,

I'm sorry but I'm new to this.
I have Home Assistant installed on a Proxmox server, I access the server via Putty to install pajikos/sms-gammu-gateway.

I'm following the Standalone installation method.
In the Clone repository step when I run "git clone https://github.com/pajikos/sms-gammu-gateway" I get the error "-bash: git: command not found", can you please help me?

Thank you very much.
Regards

Error installing

System up and Gammu is working along with MySql. I am trying to use it within my FastAPI project. When I try to install this to my virtualenv environment I got the following error.

System: Ubuntu 20.04 LTS with Python 3.8.10 with GCC 9.4.0, and Gammu-smsd version 1.41.0

pip install smsgateway-gammu
Collecting smsgateway-gammu
Using cached smsgateway-gammu-0.0.7.tar.gz (5.6 kB)
Collecting Flask>=0.12.2
Using cached Flask-2.1.2-py3-none-any.whl (95 kB)
Requirement already satisfied: PyYAML>=3.12 in /home/home/.local/share/virtualenvs/FastApi-Q-APV4Wx/lib/python3.8/site-packages (from smsgateway-gammu) (5.4.1)
Collecting python-gammu==2.6
Using cached python-gammu-2.6.tar.bz2 (118 kB)
ERROR: Command errored out with exit status 1:
command: /home/home/.local/share/virtualenvs/FastApi-Q-APV4Wx/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-m2d9oszf/python-gammu/setup.py'"'"'; file='"'"'/tmp/pip-install-m2d9oszf/python-gammu/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-m2d9oszf/python-gammu/pip-egg-info
cwd: /tmp/pip-install-m2d9oszf/python-gammu/
Complete output (11 lines):
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-m2d9oszf/python-gammu/setup.py", line 110, in
check_minimum_gammu_version()
File "/tmp/pip-install-m2d9oszf/python-gammu/setup.py", line 41, in check_minimum_gammu_version
distutils.spawn.spawn([
File "/usr/lib/python3.8/distutils/spawn.py", line 36, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
File "/usr/lib/python3.8/distutils/spawn.py", line 157, in _spawn_posix
raise DistutilsExecError(
distutils.errors.DistutilsExecError: command 'pkg-config' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Integration with HA access error

Hello,

I have followed the steps and can successfully send an sms on the RPI CLI with command:

sudo gammu sendsms TEXT 0779REDACTED -text "Ohhai"

However, in home assistant, when I try and use /developer-tools/service with data:

{
"message": "Hello, how are you?",
"target": "+4REDACTED"
}

Failed to call service notify/sms_gw. HTTPConnectionPool(host='RED.ACT.ED.!', port=5000): Max retries exceeded with url: /sms (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f7acfb41890>: Failed to establish a new connection: [Errno 111] Connection refused'))

I have changed the username and password in the credentials.txt.file, however these are reflected in my notification component which looks like this:

  • name: SMS GW
    platform: rest
    resource: http://RED.ACT.ED.!:5000/sms
    method: POST_JSON
    authentication: basic
    username: !secret gammuusername
    password: !secret gammuuserpass
    target_param_name: number
    message_param_name: text

WOuld you mind helping me to try and get this working?

Voice / USSD Calls

Hi,

Thank so much for this.

Do you have any intention to add functionality like voice or USSD calls to this?

Thanks again for all your hard work,

[Question] Is diacritics supported ?

Hi,
nice work, I want to add it to HomeAssistant. Currently I'm using my Huawei USB modem on Mikrotik router for receiving SMSs, but it does not support diacritics. Is diacritics supported in this local gateway ?

Thanks.

Ascii / Unicode Issue

Hi

I'm seeing an issue with ascii / unicode. The log is below.
Any ideas what could be the issue?

[2020-11-29 00:12:11,450] ERROR in app: Exception on /getsms [GET]
Traceback (most recent call last):
File "/home/pi/.local/lib/python2.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/home/pi/.local/lib/python2.7/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "/home/pi/.local/lib/python2.7/site-packages/flask_restful/init.py", line 468, in wrapper
resp = resource(*args, **kwargs)
File "/home/pi/.local/lib/python2.7/site-packages/flask/views.py", line 89, in view
return self.dispatch_request(*args, **kwargs)
File "/home/pi/.local/lib/python2.7/site-packages/flask_restful/init.py", line 583, in dispatch_request
resp = meth(*args, **kwargs)
File "/home/pi/.local/lib/python2.7/site-packages/flask_httpauth.py", line 164, in decorated
return f(*args, **kwargs)
File "run.py", line 77, in get
sms_dict["Text"] = str(sms[0]['Text'])
UnicodeEncodeError: 'ascii' codec can't encode character u'\xa3' in position 88: ordinal not in range(128)

Error during installation

During the installation process, when I do the following step

pip install -r requirements.txt

I get the following error message

ERROR: Failed building wheel for cryptography
Failed to build cryptography
ERROR: Could not build wheels for cryptography, which is required to install pyproject.toml-based projects

I'm installing on a Pi Zero W.

Reusing gammu config - syslog and message storage missing

Hi - thank you for creating a great tool!

I am switching over from an existing (working) gammu instance, reusing my existing gammu configuration. In doing so, it looks like logging to syslog stopped. I noticed that an empty file named "syslog" gets created in the sms-gammu-gateway working directory.

Also, messages no longer seem to get stored in their respective directories.

My gammu config file:

[gammu]
device = /dev/ttyUSB0
connection = at
logfile = syslog

[smsd]
phoneid = default
service = files
logfile = syslog
checkbattery = 0
hangupcalls = 1
inboxpath = /root/sms/inbox/
outboxpath = /root/sms/outbox/
sentsmspath = /root/sms/sent/
errorsmspath = /root/sms/error/

Cheers,
Filip

Getting-Started, How to set SMSC? How to handle SMS message to send pool? How to go production with WSGY (for non python users)?

Hi, I want to create a SMS service and I have found your work, thanks once more for sharing it.

I am testing your docker server with my /dev/ttyUSB0 device.

After doing docker-compose up -d, I am running:

AUTH=$(echo -ne "admin:password" | base64 --wrap 0)
kopax@master-letort-01:~$ curl -H 'Content-Type: application/json' -H "Authorization: Basic $AUTH" -X POST --data '{"text":"Hello world", "number":"+33699886677"}' http://localhost:5000/sms
{"message": "Internal Server Error"}

Looking at the server logs:

sms-gammu-gateway    | gammu.ERR_GETTING_SMSC: {'Text': 'Failed to get SMSC number from phone.', 'Where': 'SendSMS', 'Code': 69}
  1. I opened #7 to allow to overwrite the smsc for people like met that are having gammu/gammu#541
  2. Does your server allow sending of multiple messages at the same time (I tried before gammu at that jobed and it was giving me Resource busy and fail. Using this, will it also fail to send a message at the same time?
  3. The server start with Use a production WSGI server instead, I don't know about python at all, and I rather not learn python at the moment, what should I do to have a docker production server? Perhaps this can help : https://github.com/tiangolo/uwsgi-nginx-flask-docker but I couldn't get it to work with my understanding of wsgi

Error opening device. Unknown, busy or no permissions

I run your project in docker, but it cant start.

Traceback (most recent call last):,
  File "./run.py", line 12, in <module>,
    machine = init_state_machine(pin),
  File "/sms-gw/support.py", line 18, in init_state_machine,
    sm.Init(),
gammu.ERR_DEVICEOPENERROR: {'Text': 'Error opening device. Unknown, busy or no permissions.', 'Where': 'Init', 'Code': 2},

Device is correctly mapped: /dev/ttyUSB1:/dev/mobile
My .gammurc also is using the device:

[gammu]
device = /dev/ttyUSB1
connection = at

Any idea what to do, how to fix it?

[request] add another API calls

Hi,
I'm using problematic Huawei E1752 modem, and it sometimes freeze. It is strange, because getSignal show numeric value, but modem is not connected to network. Could you please add endpoints to python-gammu services so I will be able to do some more monitoring, and restart modem if it freeze again ?

https://wammu.eu/docs/manual/python/gammu.html#generic-functions

  • GetNetworkInfo
  • Reset
  • Monitor
  • SetAutoNetworkLogin

I'm affected with this bug gammu/gammu#477 , can you suggest any workaround ?

Thx

Add Reset function

Hello,
Thanks for your work.

Is it possible to add the reset function (I need it because my key is not enough table).
In run.py 👍
...

class Reset(Resource):
    def __init__(self, sm):
        self.machine = sm

    def get(self):
        machine.Reset(False)
        return {"status":200, "message": "Reset effectue"}, 200

...
api.add_resource(Reset, '/reset', resource_class_args=[machine])

Thanks a lot

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

dockerfile
Dockerfile
  • python 3-alpine
github-actions
.github/workflows/docker_image.yml
  • actions/checkout v3
  • docker/setup-qemu-action v2
  • docker/setup-buildx-action v2
  • actions/cache v3
  • docker/login-action v2
  • docker/build-push-action v4
pip_requirements
requirements.txt

  • Check this box to trigger a request for Renovate to run again on this repository

Docker version doesn't start correctly

I tried to launch docker variant, but the service on port 5000 is not started. Serial device should be ok - tested by minicom.

sudo docker run -d -p 5000:5000 --device=/dev/ttyUSB0:/dev/mobile pajikos/sms-gammu-gateway

After execution only docker_id is returned:
09e33694d8cb50f1ddd438e1bc055c8391f052d311504e13f539ea6795b027e7

Is possible to somehow debug this situation?

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.