Gammu-smsd Error Connecting To Database
Contents |
Get Kubuntu Get Xubuntu Get Lubuntu Get UbuntuStudio Get Mythbuntu Get Edubuntu Get Ubuntu-GNOME Get UbuntuKylin Ubuntu Code of Conduct gammu-smsd config Ubuntu Wiki Community Wiki Other Support Launchpad Answers Ubuntu IRC Support gammu smsd tutorial AskUbuntu Official Documentation User Documentation Social Media Facebook Twitter Useful Links Distrowatch Bugs: Ubuntu PPAs: Ubuntu Web Upd8: gammu mysql service is deprecated Ubuntu OMG! Ubuntu Ubuntu Insights Planet Ubuntu Activity Page Please read before SSO login Advanced Search Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help Unable gammu unknown db driver to start gammu-smsd Having an Issue With Posting ? Do you want to help us debug the posting issues ? < is the place to report it, thanks ! Results 1 to 2 of 2 Thread: Unable to start gammu-smsd Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch
Gammu Smsd Mysql
to Threaded Mode March 2nd, 2010 #1 Jeboy View Profile View Forum Posts Private Message First Cup of Ubuntu Join Date Nov 2009 Beans 4 DistroUbuntu UNR Unable to start gammu-smsd Hi, Sorry, don't know exactly where to put this. I'm having problem with gammu smsd, following error occurred when issuing command "gammu-smsd --config /etc/gammu-smsdrc": "Error connecting to database: Access denied for user 'root'@'localhost' (using password: NO)" but database login credential is correct. Following are my gammu configs. located at /etc: gammu-smsdrc # Configuration file for Gammu SMS Daemon # Gammu library configuration, see gammurc(5) [gammu] # Please configure this! port = /dev/ttyUSB0 connection = at19200 # Debugging #logformat = textall # SMSD configuration, see gammu-smsdrc(5) [smsd] service = MYSQL logfile = syslog # Increase for debugging information debuglevel = 0 # Paths where messages are stored inboxpath = /var/spool/gammu/inbox/ outboxpath = /var/spool/gammu/outbox/ sentsmspath = /var/spool/gammu/sent/ errorsmspath = /var/spool/gammu/error/ smsdrc # This is a sample Gammu SMSD configuration file. It's required for gammu-smsd, # see gammu-smsdrc(5) for documentation. # G
also sends messages enqueued in this storage. The daemon can reload configuration file after sending hangup signal (SIGHUP) and properly terminates itself on SIGINT and SIGTERM. Program accepts
Gammu-smsd-inject
following options (please note that long options might be not accepted on gammu sql some platforms): -h, --help¶ Shows help. -v, --version¶ Shows version information and compiled in features. -c, --config=file¶ Configuration gammu send sms file to use, default is /etc/gammu-smsdrc, on Windows there is no default and configuration file path has to be always specified. If you run SMSD as a system daemon https://ubuntuforums.org/showthread.php?t=1419401 (or service), it is recommended to use absolute path to configuration file as startup directory might be different than you expect. See SMSD Configuration File for configuration file documentation. -p, --pid=file¶ Lock file for storing pid, empty for no locking. Not supported on Windows. -U, --user=user¶ Drop daemon privileges to chosen user after starting. -G, --group=group¶ Drop daemon https://wammu.eu/docs/manual/smsd/smsd.html privileges to chosen group after starting. -d, --daemon¶ Daemonize program on startup. Not supported on Windows. -i, --install-service¶ Installs SMSD as a Windows service. -u, --uninstall-service¶ Uninstalls SMSD as a Windows service. -s, --start-service¶ Starts SMSD Windows service. -k, --stop-service¶ Stops SMSD Windows service. -f, --max-failures=count¶ Terminate after defined number of failures. Use 0 to not terminate (this is default). -X, --suicide=seconds¶ Kills itself after number of seconds. -S, --run-service¶ Runs pogram as SMSD Windows service. This should not be used manually, but only Windows Service manager should use this command. -n, --service-name=name¶ Defines name of a Windows service. Each service requires an unique name, so if you want to run several SMSD instances, you have to name each service differently. Default is "GammuSMSD". -l, --use-log¶ Use logging as configured in config file (default). -L, --no-use-log¶ Do not use logging as configured in config file. -e, --install-event-log¶ Installs Windows EventLog description to registry. New in version 1.31.90. -E, --uninstall-event-log¶ Uninstalls Windows EventLog description to registry. New in version 1.31.90. Signals¶ SMSD can be con
Database Structure. This backend is based on SQL Service. Configuration¶ Before running gammu-smsd you need to create necessary tables in the database, which is described below. The configuration file https://wammu.eu/docs/manual/smsd/mysql.html then can look like: [smsd] service = sql driver = native_mysql host = localhost See also SMSD Configuration File Privileges¶ The user accessing the database does not need much privileges, the https://blog.sleeplessbeastie.eu/2012/07/16/kalkun-how-to-setup-sms-gateway-at-home/ following privileges should be enough: GRANT USAGE ON *.* TO 'smsd'@'localhost' IDENTIFIED BY 'password'; GRANT SELECT, INSERT, UPDATE, DELETE ON `smsd`.* TO 'smsd'@'localhost'; CREATE DATABASE smsd; Note For creating the gammu smsd SQL tables you need more privileges, especially for creating triggers, which are used for some functionality. Creating tables for MySQL¶ SQL script for creating tables in MySQL database: -- -- Database for Gammu SMSD -- -- In case you get errors about not supported charset, please -- replace utf8mb4 with utf8. -- -------------------------------------------------------- -- -- Table structure for table `gammu` -- gammu-smsd error connecting CREATE TABLE `gammu` ( `Version` integer NOT NULL default '0' PRIMARY KEY ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `gammu` -- INSERT INTO `gammu` (`Version`) VALUES (16); -- -------------------------------------------------------- -- -- Table structure for table `inbox` -- CREATE TABLE `inbox` ( `UpdatedInDB` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `ReceivingDateTime` timestamp NOT NULL default '0000-00-00 00:00:00', `Text` text NOT NULL, `SenderNumber` varchar(20) NOT NULL default '', `Coding` enum('Default_No_Compression','Unicode_No_Compression','8bit','Default_Compression','Unicode_Compression') NOT NULL default 'Default_No_Compression', `UDH` text NOT NULL, `SMSCNumber` varchar(20) NOT NULL default '', `Class` integer NOT NULL default '-1', `TextDecoded` text NOT NULL, `ID` integer unsigned NOT NULL auto_increment, `RecipientID` text NOT NULL, `Processed` enum('false','true') NOT NULL default 'false', PRIMARY KEY `ID` (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -- Dumping data for table `inbox` -- -- -------------------------------------------------------- -- -- Table structure for table `outbox` -- CREATE TABLE `outbox` ( `UpdatedInDB` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `InsertIntoDB` timestamp NOT NULL default '0000-00-00 00:00:00', `SendingDateTime` timestamp NOT NULL default '0000-00-00 00:00:00', `SendBefore` time NOT NULL DEFAULT '23:59:59', `SendAfter` time NOT NULL DEFAULT '00:00:00', `Text` text, `Destinat
terminal or any phone supported by Gammu. First step Install your favourite Linux distribution, Gammu and Gammu SMS daemon (gammu-smsd) with all dependencies (using packages or source). Second step Connect GSM terminal. I used Netkom MC55i GSM terminal and Serial to USB converter. You can see below that that I will use /dev/ttyUSB1 device. $ dmesg [...] [235112.037113] usb 2-1.2: new full-speed USB device number 23 using ehci_hcd [235112.130533] pl2303 2-1.2:1.0: pl2303 converter detected [235112.132486] usb 2-1.2: pl2303 converter now attached to ttyUSB1 [...] Edit /etc/gammurc file: [gammu] device = /dev/ttyUSB1 connection = at Check GSM terminal: $ gammu --identify Urządzenie : /dev/ttyUSB1 Manufacturer : Siemens Model : unknown (MC55i) Firmware : REVISION 01.003 IMEI : 927041032653788 SIM IMSI : 160071362584927 Third step Install web server with php support, MySQL database server and Kalkun. Kalkun installation instructions can be found at github.com/back2arie/Kalkun/wiki. Final /etc/gammu-smsdrc configuration file should look like this: [gammu] device = /dev/ttyUSB1 connection = at [smsd] PIN=9999 runonreceive = /var/www/kalkun/scripts/daemon.sh logfile = /var/log/gammu.log commtimeout = 10 sendtimeout = 20 deliveryreport = log phoneid = mdsms transmitformat = auto # Storage - MySQL service = SQL driver = native_mysql database = kalkun user = kalkun password = kalkun_password 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 To start Gammu SMS daemon execute command: $ gammu-smsd You can send SMS using console command (if you want to check configuration): $ gammu-smsd-inject TEXT 555333555 -text "Test message" Example log output from Gammu SMS daemon : Thu 2012/07/05 23:44:38 gammu-smsd[19711]: Connected to Database: kalkun on localhost Thu 2012/07/05 23:44:38 gammu-smsd[19711]: Connected to Database native_mysql: kalkun on localhost Thu 2012/07/05 23:44:38 gammu-smsd[19711]: Created POSIX RW shared memory at 0x7f781c13b000 Thu 2012/07/05 23:44:38 gammu-smsd[19711]: Starting phone communication... Thu 2012/07/05 23:45:07 gammu-smsd[19711]: Inserting phone info Thu 2012/07/05 23:45:40 gammu-smsd[19711]: Read 2 messages Thu 2012/07/05 23:45:40 gammu-smsd[19721]: Starting run on receive: /var/www/kalkun/scripts/daemon.sh 1 Thu 2012/07/05 23:45:40 gammu-smsd[19711]: Process finished successfully Thu 2012/07/05 23:45:40 gammu-smsd[19711]: Delivery report: Deli