gammu-smsd 守护进程不发送短信

gammu-smsd 守护进程不发送短信

我注意到我在 Ubuntu 上运行的 gammu-smsd 守护程序突然不发送消息(我的 postgresql 数据库的 sentitems 表未更新)。首先,我注意到守护程序没有运行,因此我重新启动了它:

$ sudo /etc/init.d/gammu-smsd start
 * Starting Gammu SMS Daemon gammu-smsd    [ OK ]

然后我检查了系统日志(这是我配置 gammu-smsd 报告的日志):

Jun 27 15:33:04 porkypig gammu-smsd[19267]: Configuring Gammu SMSD...
Jun 27 15:33:04 porkypig gammu-smsd[19267]: SHM token: 0xffffffffce020154 (-838729388)
Jun 27 15:33:04 porkypig gammu-smsd[19267]: Warning: No PIN code in /etc/gammu-smsdrc file
Jun 27 15:33:04 porkypig gammu-smsd[19267]: commtimeout=30, sendtimeout=30, receivefrequency=0, resetfrequency=0
Jun 27 15:33:04 porkypig gammu-smsd[19267]: checks: security=1, battery=0, signal=1
Jun 27 15:33:04 porkypig gammu-smsd[19267]: deliveryreport = no
Jun 27 15:33:04 porkypig gammu-smsd[19267]: phoneid =
Jun 27 15:33:04 porkypig gammu-smsd[19268]: Using PGSQL service
Jun 27 15:33:04 porkypig gammu-smsd[19268]: Connected to database: smsd on localhost. Server version: 80414 Protocol: 3
Jun 27 15:33:05 porkypig gammu-smsd[19268]: Database structures version: 11, SMSD current version: 11
Jun 27 15:33:05 porkypig gammu-smsd[19268]: Table check succeeded
Jun 27 15:33:05 porkypig gammu-smsd[19268]: Starting phone communication...
Jun 27 15:33:22 porkypig gammu-smsd[19268]: Error at init connection No response in specified timeout. Probably phone not connected. (14)
Jun 27 15:33:22 porkypig gammu-smsd[19268]: Terminating communication No response in specified timeout. Probably phone not connected., (14, 250 times)
Jun 27 15:33:22 porkypig gammu-smsd[19268]: Starting phone communication...
Jun 27 15:33:32 porkypig gammu-smsd[19268]: Error at init connection No response in specified timeout. Probably phone not connected. (14)
Jun 27 15:33:32 porkypig gammu-smsd[19268]: Terminating communication No response in specified timeout. Probably phone not connected., (14, 250 times)
Jun 27 15:33:32 porkypig gammu-smsd[19268]: Starting phone communication...
Jun 27 15:33:42 porkypig gammu-smsd[19268]: Error at init connection No response in specified timeout. Probably phone not connected. (14)
Jun 27 15:33:42 porkypig gammu-smsd[19268]: Terminating communication No response in specified timeout. Probably phone not connected., (14, 250 times)
Jun 27 15:33:42 porkypig gammu-smsd[19268]: Starting phone communication...
Jun 27 15:33:52 porkypig gammu-smsd[19268]: Error at init connection No response in specified timeout. Probably phone not connected. (14)
Jun 27 15:33:52 porkypig gammu-smsd[19268]: Terminating communication No response in specified timeout. Probably phone not connected., (14, 250 times)
Jun 27 15:33:52 porkypig gammu-smsd[19268]: Going to 30 seconds sleep because of too much connection errors
Jun 27 15:34:22 porkypig gammu-smsd[19268]: Starting phone communication...
Jun 27 15:34:32 porkypig gammu-smsd[19268]: Error at init connection No response in specified timeout. Probably phone not connected. (14)
Jun 27 15:34:32 porkypig gammu-smsd[19268]: Terminating communication No response in specified timeout. Probably phone not connected., (14, 250 times)
Jun 27 15:34:32 porkypig gammu-smsd[19268]: Going to 30 seconds sleep because of too much connection errors
Jun 27 15:35:02 porkypig gammu-smsd[19268]: Starting phone communication...
Jun 27 15:35:12 porkypig gammu-smsd[19268]: Error at init connection No response in specified timeout. Probably phone not connected. (14)
Jun 27 15:35:12 porkypig gammu-smsd[19268]: Terminating communication No response in specified timeout. Probably phone not connected., (14, 250 times)
Jun 27 15:35:12 porkypig gammu-smsd[19268]: Going to 30 seconds sleep because of too much connection errors
Jun 27 15:35:42 porkypig gammu-smsd[19268]: Starting phone communication...
Jun 27 15:35:52 porkypig gammu-smsd[19268]: Error at init connection No response in specified timeout. Probably phone not connected. (14)
Jun 27 15:35:52 porkypig gammu-smsd[19268]: Terminating communication No response in specified timeout. Probably phone not connected., (14, 250 times)
Jun 27 15:35:52 porkypig gammu-smsd[19268]: Going to 30 seconds sleep because of too much connection errors
Jun 27 15:36:22 porkypig gammu-smsd[19268]: Starting phone communication...
Jun 27 15:36:32 porkypig gammu-smsd[19268]: Error at init connection No response in specified timeout. Probably phone not connected. (14)
Jun 27 15:36:32 porkypig gammu-smsd[19268]: Terminating communication No response in specified timeout. Probably phone not connected., (14, 250 times)
Jun 27 15:36:32 porkypig gammu-smsd[19268]: Going to 30 seconds sleep because of too much connection errors     

这是否意味着插入计算机串行端口的调制解调器没有响应?(我通过 ssh 访问机器,如果没有必要,我不想亲自去计算机。)

但请注意,我可以运行sudo minicom并获得以下内容:

Welcome to minicom 2.4

OPTIONS: I18n 
Compiled on Jan 25 2010, 07:02:36.
Port /dev/ttyS0

Press CTRL-A Z for help on special keys  

但是,minicom 不允许我在窗口中输入任何 at 命令。它只显示一个闪烁的光标。虽然我可以使用CTRL-A Z和其他CTRL-A快捷方式访问菜单,但我无法在窗口中输入任何 at 命令。

minicom 日志如下所示:

$ cat minicom.log
20130610 17:57:50 Hangup (0:10:29)
20130611 10:47:56 Gone offline (0:00:02)
20130611 10:53:59 Hangup (0:00:00)
20130611 12:51:50 Hangup (0:00:00)
20130612 00:43:39 Hangup (0:00:00)
20130616 21:45:54 Hangup (0:00:07)
20130624 14:22:48 Hangup (0:01:43)
20130624 14:26:02 Hangup (0:02:58)
20130624 16:58:52 Hangup (2:19:25)
20130625 15:04:39 Hangup (0:03:54)
20130626 10:43:19 Hangup (0:08:13)
20130627 15:46:02 Hangup (0:00:35)

知道为什么短信没有被发送吗?

答案1

请使用当前用户运行 gammu-config 并..

编辑/etc/init.d/gammu-smsd

# user which will run this daemon
USER=USERNAME

例如

USER=apis17

默认用户是 gammu,文件夹中没有.gammurc文件/home/gammu

相关内容