Skip to content

Instantly share code, notes, and snippets.

View JuniYadi's full-sized avatar
🏠
Working from home

Juni Yadi JuniYadi

🏠
Working from home
View GitHub Profile
@JuniYadi
JuniYadi / dasar.php
Last active November 30, 2018 18:07
<?php echo "Hello World"; ?>
<?php
$a = "ini ibu budi";
$b = "ini ayah budi";
$c = "budi rajin menabung";
echo "$a <br> $b <br> $c";
?>
sudo add-apt-repository ppa:nijel/ppa
sudo apt-get update
sudo apt-get install gammu-smsd gammu python-gammu usb-modeswitch -y
@JuniYadi
JuniYadi / gammu-mysql.sql
Created December 2, 2018 21:08
khusus gammu versi 1.39.0
--
-- Database for Gammu SMSD
--
-- In case you get errors about not supported charset, please
-- replace utf8mb4 with utf8.
-- --------------------------------------------------------
--
-- Table structure for table `gammu`
$ lsusb
Bus 002 Device 005: ID 258a:0016
Bus 002 Device 015: ID 10c4:8108 Cygnal Integrated Products, Inc.
Bus 002 Device 017: ID 12d1:14cb Huawei Technologies Co., Ltd.
Bus 002 Device 014: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 10f1:1a2a Importek Laptop Integrated Webcam
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
$ dmesg|grep tty
[ 0.000000] console [tty0] enabled
[ 9.344426] usb 2-1.2: GSM modem (1-port) converter now attached to ttyUSB0
[ 9.344566] usb 2-1.2: GSM modem (1-port) converter now attached to ttyUSB1
[ 9.344650] usb 2-1.2: GSM modem (1-port) converter now attached to ttyUSB2
[ 114.629095] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
[ 114.653534] option1 ttyUSB1: usb_wwan_indat_callback: resubmit read urb failed. (-2)
[ 114.653542] option1 ttyUSB1: usb_wwan_indat_callback: resubmit read urb failed. (-2)
[ 114.653545] option1 ttyUSB1: usb_wwan_indat_callback: resubmit read urb failed. (-2)
[ 114.657777] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
$ echo "Coba Kirim Dari Gammu By Blog JuniYadi" | gammu sendsms TEXT 0812xxxxxxx4
If you want break, press Ctrl+C...
Sending SMS 1/1....waiting for network answer..OK, message reference=213
$ sudo nano /etc/gammu-smsdrc
# Configuration file for Gammu SMS Daemon
# Gammu library configuration, see gammurc(5)
[gammu]
# Please configure this!
device = /dev/ttyUSB0
connection = at19200
# SMSD configuration, see gammu-smsdrc(5)
$ sudo systemctl restart gammu-smsd
$ sudo systemctl status gammu-smsd
● gammu-smsd.service - LSB: Gammu SMS daemon
Loaded: loaded (/etc/init.d/gammu-smsd; bad; vendor preset: enabled)
Active: active (exited) since Mon 2018-12-03 03:44:32 WIB; 1h 22min ago
Docs: man:systemd-sysv-generator(8)
Process: 16776 ExecStop=/etc/init.d/gammu-smsd stop (code=exited, status=0/SUCCESS)
Process: 16782 ExecStart=/etc/init.d/gammu-smsd start (code=exited, status=0/SUCCESS)
Main PID: 12496 (code=exited, status=2)
CGroup: /system.slice/gammu-smsd.service
$ echo "Coba Kirim Dari gammu-smsd By Blog JuniYadi" | sudo -u gammu gammu-smsd-inject TEXT 0812xxxxxx4
Written message with ID 1