internet_connection_watchdog

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revisionBoth sides next revision
internet_connection_watchdog [17.06.2018 21:41] – [software installation] Pascal Suterinternet_connection_watchdog [17.06.2018 21:54] – [SMS] Pascal Suter
Line 11: Line 11:
   * Hardware: TP-Link MA260   * Hardware: TP-Link MA260
   * on the tp-link stick the last serial device seems to be the one that can be used for sms (''gammu identify'' only gets information from that device). <code>gammu-detect | grep -B1 TP-LINK | grep ttyUSB | tail -n 1</code> to get the device name for the config   * on the tp-link stick the last serial device seems to be the one that can be used for sms (''gammu identify'' only gets information from that device). <code>gammu-detect | grep -B1 TP-LINK | grep ttyUSB | tail -n 1</code> to get the device name for the config
 +  * ''/etc/gammu-smsdrc.template''<code># Configuration file for Gammu SMS Daemon
 +
 +# Gammu library configuration, see gammurc(5)
 +[gammu]
 +port = %PORT%
 +connection = at
 +#logformat = textall
 +
 +# SMSD configuration, see gammu-smsdrc(5)
 +[smsd]
 +service = null
 +logfile = syslog
 +# Increase for debugging information
 +debuglevel = 0
 +RunOnReceive = /opt/process-sms.sh
 +</code>
 +  * ''/opt/updateModemPort.sh'' <code bash updateModemPort.sh>
 +#!/bin/bash
 +port=$(gammu-detect | grep -B1 TP-LINK | grep ttyUSB | tail -n 1 | awk -F = '{print $2}' | tr -d " ")
 +sed -e "s|%PORT%|${port}|" /etc/gammu-smsdrc.tempalte > /etc/gammu-smsdrc
 +sed -e "s|%PORT%|${port}|" /root/.gammurc.tempalte > /root/.gammurc
 +</code>
   * installation: <code>apt install gammu gammu-smsd</code>   * installation: <code>apt install gammu gammu-smsd</code>
   * <code bash process-sms.sh>#!/bin/bash   * <code bash process-sms.sh>#!/bin/bash
  • internet_connection_watchdog.txt
  • Last modified: 17.06.2018 22:21
  • by Pascal Suter