try to fix device reconnect issues

This commit is contained in:
benkuly 2020-06-02 18:27:33 +02:00
parent cd17928805
commit 2fd8216fbc
3 changed files with 7 additions and 3 deletions

View file

@ -13,7 +13,7 @@ playbook configuration:
```yaml
matrix_sms_bridge_enabled: true
matrix_sms_bridge_gammu_modem: "/path/to/modem"
matrix_sms_bridge_gammu_modem: "/dev/serial/by-id/myDeviceId"
# generate a secret passwort e.g. with pwgen -s 64 1
matrix_sms_bridge_database_password: ""
# (optional) a room id to a default room
@ -22,6 +22,8 @@ matrix_sms_bridge_default_room: ""
matrix_sms_bridge_gammu_reset_frequency: 3600
# (optional) group with unix read and write rights to modem
matrix_sms_bridge_modem_group: 'dialout'
# (optional) cgroup major number to allow access to devices, that gets reconnected (e.g. due to reset)
matrix_sms_bridge_cgroup_major_number: '188'
```

View file

@ -48,6 +48,7 @@ matrix_sms_bridge_homserver_domain: "{{ matrix_domain }}"
matrix_sms_bridge_default_room: ''
matrix_sms_bridge_gammu_modem: ''
matrix_sms_bridge_cgroup_major_number: '188'
matrix_sms_bridge_modem_group: 'dialout'
matrix_sms_bridge_gammu_reset_frequency: 0
@ -110,7 +111,7 @@ matrix_sms_bridge_configuration: "{{ matrix_sms_bridge_configuration_yaml|from_y
matrix_sms_bridge_gammu_configuration: |
[gammu]
Device = /dev/ttyModem
Device = {{ matrix_sms_bridge_gammu_modem }}
LogFile = /data/log/gammu.log
debugLevel = 1

View file

@ -29,7 +29,8 @@ ExecStart=/usr/bin/docker run --rm --name matrix-sms-bridge \
-v {{ matrix_sms_bridge_config_path }}:/config:z \
-v {{ matrix_sms_bridge_data_path }}:/data:z \
-v {{ matrix_sms_bridge_config_path }}/gammu-smsdrc:/etc/gammu-smsdrc:z \
--device {{ matrix_sms_bridge_gammu_modem }}:/dev/ttyModem \
--device-cgroup-rule='c {{ matrix_sms_bridge_cgroup_major_number }}:* rmw' \
--device {{ matrix_sms_bridge_gammu_modem }}:{{ matrix_sms_bridge_gammu_modem }} \
{% for arg in matrix_sms_bridge_container_extra_arguments %}
{{ arg }} \
{% endfor %}