Membuat gammu-smsd Dengan Multi Modem

Saat ini kita akan membuat gammu-smsd dengan modem lebih dari satu, atau bisa di bilang multi modem. Saya anggap installasi gammu sudah behasil dan sudah terpasang dengan baik di mesin server.

Konfigurasi

  1. Cek terlebih dahulu port modem kita yang terpasang di mesin server kita dengan perintah :

    dmesg | grep tty
    [3197143.373312] usb 1-1.5: pl2303 converter now attached to ttyUSB1
    [3198840.628558] usb 3-1: pl2303 converter now attached to ttyUSB2
    [3198946.262064] usb 1-1.4: pl2303 converter now attached to ttyUSB3

    Di sini kita dapat melihat bahwa di mesin kita terdeteksi 3 buah modem.

  2. Lalu kita edit file /root/.gammurc dengan perintah nano /root/.gammurc, karena ada 2 buah modem, maka kita edit konfigurasi nya pada bagian [gammu], [gammu1] dan [gammu2]

    [gammu]

    port = /dev/ttyUSB1
    model =
    connection = at115200
    synchronizetime = yes
    logfile =
    logformat = nothing
    use_locking =
    gammuloc =

    [gammu2]

    port = /dev/ttyUSB2
    model =
    connection = at115200
    synchronizetime = yes
    logfile =
    logformat = nothing
    use_locking =
    gammuloc =

    [gammu3]

    port = /dev/ttyUSB3
    model =
    connection = at115200
    synchronizetime = yes
    logfile =
    logformat = nothing
    use_locking =
    gammuloc =

  3. buat file /etc/gammu-smsdrc0

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

    [smsd]
    service = MYSQL
    PIN = 1234
    logfile = /etc/gammulog0
    debuglevel = 255
    phoneid = modem1

    user = root
    password = password
    pc = localhost
    database = kalkun

    buat file /etc/gammu-smsdrc2

    [gammu]
    device = /dev/ttyUSB2
    connection = at115200

    [smsd]
    service = MYSQL
    PIN = 1234
    logfile = /etc/gammulog2
    debuglevel = 255
    phoneid = modem2

    user = root
    password = password
    pc = localhost
    database = kalkun

    buat file /etc/gammu-smsdrc3

    [gammu]
    device = /dev/ttyUSB3
    connection = at115200

    [smsd]
    service = MYSQL
    PIN = 1234
    logfile = /etc/gammulog3
    debuglevel = 255
    phoneid = modem3

    user = root
    password = password
    pc = localhost
    database = kalkun

Menjalankan Service

    Untuk menjalankan service cukup dengan perintah :

gammu-smsd gammu-smsdrc0

gammu-smsd gammu-smsdrc2

gammu-smsd gammu-smsdrc3

Leave a Reply

Your email address will not be published. Required fields are marked *

9 + 9 =