Erinevus lehekülje "SMS saatmine gammuga" redaktsioonide vahel
Allikas: Kuutõrvaja
53. rida: | 53. rida: | ||
# gammu --entersecuritycode PIN 1234 | # gammu --entersecuritycode PIN 1234 | ||
− | Ja püüame saata smsi | + | Ja püüame saata smsi |
− | |||
− | |||
− | |||
− | |||
# '''/usr/bin/printf "mingitest" | /usr/bin/gammu --sendsms TEXT +37253561532''' | # '''/usr/bin/printf "mingitest" | /usr/bin/gammu --sendsms TEXT +37253561532''' |
Redaktsioon: 9. november 2015, kell 16:21
Meil on ühendatud serveriga USB GSM modem, dmesgist info
[ 45.692955] usb 2-3: GSM modem (1-port) converter now attached to ttyUSB0
Paigaldame paketi gammu ja seadistame, debianis paigaldamiseks käsk
# apt-get install gammu gammu-smsd
Muudame /etc/gammurc faili
[gammu] device = /dev/ttyUSB0 connection = at name=Huawei E3131 PIN=1234
Vaatame kas gammu on ühenduse saanud
# gammu --identify Device : /dev/ttyUSB0 Manufacturer : Huawei Model : unknown (E3131) Firmware : 21.158.00.00.1020 IMEI : 123324354665655
Seejärel avame Gammu SMS deemoni seadistusfaili /etc/gammu-smsdrc
[gammu] port = /dev/ttyUSB0 connection = at [smsd] service = mysql logfile = syslog # Increase for debugging information debuglevel = 0 pin = 1234 receivefrequency = 10 # mysql baasi info database=gammu user=gammu password=gammuparool host=localhost
Tekitame andmebaasi koos vajalike tabelitega
Anname gammule esiteks pin aadressi käsuga
gammu --entersecuritycode PIN <my_pin_code>
Ja reaalse infoga
# gammu --entersecuritycode PIN 1234
Ja püüame saata smsi
# /usr/bin/printf "mingitest" | /usr/bin/gammu --sendsms TEXT +37253561532 If you want break, press Ctrl+C... Sending SMS 1/1....waiting for network answer..OK, message reference=5
Gammu ühendamine nagiosiga
TODO
Lingid
http://kalkun.sourceforge.net/screenshot.php sms halduse tarkvara
https://roysoala.wordpress.com/2012/11/06/gammu-debian-lenny-and-mysql/