Notei que meu daemon gammu-smsd rodando no Ubuntu de repente não está enviando mensagens (a tabela sentitems do meu banco de dados postgresql não está sendo atualizada). Primeiro, notei que o damemon não estava funcionando, então reiniciei:
$ sudo /etc/init.d/gammu-smsd start
* Starting Gammu SMS Daemon gammu-smsd [ OK ]
Então eu verifiquei o syslog (que é o log que eu configurei gammu-smsd para relatar):
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
Isso significa que o modem conectado à porta serial do computador não está respondendo? (Eu acesso a máquina via ssh e não quero ter que ir fisicamente ao computador se não for necessário).
Note que posso executar sudo minicom
e obter o seguinte:
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
No entanto, o minicom não me permite digitar nenhum comando na janela. Apenas mostra um cursor piscando. Embora eu possa usar CTRL - A Z e outra CTRL - A atalhos para acessar menus, não consigo digitar nenhum em comandos na janela.
O log do minicom é assim:
$ 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)
Alguma idéia de por que as mensagens SMS não estão sendo enviadas?