Versi Gammu yang tersedia di repository Debian 9 (stretch) hanya sampai Gammu 1.38.1. Ada banyak bugfix yang ada di versi terbaru, jadi ada baiknya mencoba versi terbaru

Install Dependency

apt-get install cmake python-dev pkg-config libpq-dev \
    libcurl4-gnutls-dev libusb-1.0-0-dev libdbi0-dev libbluetooth-dev \
    libgudev-1.0-dev libglib2.0-dev unixodbc-dev

Download Gammu

Download gammu versi terbaru dari https://wammu.eu/download/gammu/ saat ini versi terbaru gammu 1.41.0

wget https://dl.cihar.com/gammu/releases/gammu-1.41.0.tar.gz

Ekstrak file gammu-1.41.0.tar.gz

tar zxvf gammu-1.41.0.tar.gz
cd gammu-1.41.0

Compile dan install Gammu 1.41.0

./configure
make
sudo make install

Setelah terinstall gammu bisa dijalankan dengan /usr/local/bin/gammu. Bila /usr/local/bin ada di $PATH anda, bisa langsung dengan menjalankan gammu

$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

Deteksi Modem dan Kartu

/usr/local/bin/gammu --identify
Device               : /dev/ttyUSB0
Manufacturer         : Huawei
Model                : unknown (E226)
Firmware             : 11.310.15.00.150
IMEI                 : 357650121313441
SIM IMSI             : 510897281314314

Cek Jaringan Provider

$ /usr/local/bin/gammu --networkinfo
Network state        : home network
Network              : 510 89 (3, Indonesia), LAC 27B, CID 3E38A19
Name in phone        : "3"
Packet network state : not logged into network
GPRS                 : detached

Cek versi gammu

$ /usr/local/bin/gammu --version
[Gammu version 1.41.0]

cara yang sama bisa dijalankan di Orange Pi, Raspberry Pi walaupun prosesnya agak lambat waktu compile.

Leave a comment

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