More with SMS gateway for ubuntu 1204
2014-01-17
- based on this http://blog.sleeplessbeastie.eu/2012/07/16/kalkun-how-to-setup-sms-gateway-at-home/ and http://back2arie.wordpress.com/2010/07/27/using-gammu-smsd-with-multiple-phone/
- problem rectified by http://askubuntu.com/questions/211739/gammu-and-device-permissions
- following are installed sudo apt-get install gammu gammu-smsd sudo cp /usr/share/doc/gammu/examples/config/gammurc /etc/gammurc the gammurc file will not be there, has to do this step, instaed of running gammu-conifg is a problem and make gammurc files in home folder
- now runing
gammu --identify
, gives no phone detected and other error for this the config file gammurc has to edited as per like this
[gammu] device = /dev/phone connection = at
to make the /dev/phone, the udev files have to be created, inside /etc/udev/rules.d, with file name 90-phone.rules, with this contents
KERNEL=="ttyUSB*", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1436", NAME="phone", MODE="0666",SYMLINK+="phone" KERNEL=="ttyUSB*", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", NAME="dylos", MODE="0666",SYMLINK+="dylos" ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", SYMLINK+="dylos"
now reboot the system, inside the
/dev
folder there will be phone file. Change the gammurc file as earlier and reboot now gammu--identify
can be run with outsudo
it showsgammu --identify Device : /dev/phone Manufacturer : Huawei Model : E173 (E173) Firmware : 11.126.30.00.00 IMEI : Digits SIM IMSI : Digits
now go to
gammu-smsd
, it removes file permission error like if it was runninggammu --identify
withsudo
gammu-smsd -c /etc/gammu-smsdrc Can't open log file "/var/log/gammu-smsd.log" Failed to read config: Can not open specified file.
by rectifying the
gammu --identify
with outsudo
,gammu-smsdrc
will be running and storing the received sms in its in box of mysql if it is configured as per the earlier references, thegammu-smsdrc
config file look like this[gammu] device = /dev/phone connection = at [smsd] PIN=9999 runonreceive = /var/www/kalkun/scripts/daemon.sh logfile = /var/log/gammu-smsd.log commtimeout = 10 sendtimeout = 20 deliveryreport = log phoneid = mdsms transmitformat = auto #Storage - MySQL service = SQL driver = native_mysql database = kalkun user = yourrootname password = yourpassword pc = localhost #Storage - Files #service = FILES #inboxpath = /home/milosz/sms/inbox/ #outboxpath = /home/milosz/sms/outbox/ #sentsmspath = /home/milosz/sms/sent/ #errorsmspath = /home/milosz/sms/error/ #inboxformat = standard
moreover, also the MySQL has to give with a database and SQL import from the SQL file provided with the gammu or gammu-smsd, to unzip the gz files use
sudo gzip -d pgsql.sql.gz
in this folder/usr/share/doc/gammu/examples/sql
. Still the kalkun is not working has to see other time