0

私は実行しますgammu-smsd

# gammu-smsd
Log filename is "/var/log/gammu-smsd.log"

次に、次の方法で SMS を送信しますgammu-smsd-inject

# echo sms bla bla bla | gammu-smsd-inject TEXT 123456789
gammu-smsd-inject[2050]: Warning: No PIN code in /etc/gammu-smsdrc file
gammu-smsd-inject[2050]: Created outbox message OUTC20151124_121117_00_796996999_sms0.smsbackup
Written message with ID /var/spool/gammu/outbox/OUTC20151124_121117_00_796996999_sms0.smsbackup

そして..... 1分、5分、15分、そして何もありません。
だから私はそれを中断gammu-smsd^\て再開します:

# gammu-smsd
Log filename is "/var/log/gammu-smsd.log"

そして今、私は持ってい/var/log/gammu-smsd.logます:

Tue 2015/11/24 12:17:07 gammu-smsd[2074]: Warning: No PIN code in /etc/gammu-smsdrc file
Tue 2015/11/24 12:17:07 gammu-smsd[2074]: Created POSIX RW shared memory at 0xb6fcc000
Tue 2015/11/24 12:17:07 gammu-smsd[2074]: Starting phone communication...
Tue 2015/11/24 12:17:17 gammu-smsd[2074]: Read 1 messages
Tue 2015/11/24 12:17:18 gammu-smsd[2074]: Message without SMSC, assuming you want to use the one from phone
Tue 2015/11/24 12:17:19 gammu-smsd[2074]: Transmitted OUTC20151124_121117_00_123456789_sms0.smsbackup (total: 1) to 123456789, message reference 0x1b
Tue 2015/11/24 12:17:25 gammu-smsd[2074]: Read 1 messages

私の構成/etc/gammu-smsdrc

# Configuration file for Gammu SMS Daemon

# Gammu library configuration, see gammurc(5)
[gammu]
port = /dev/huawei
model = at
connection = at19200
synchronizetime = yes

# SMSD configuration, see gammu-smsdrc(5)
[smsd]
service = files
logfile = /var/log/gammu-smsd.log
#debuglevel = 255
commtimeout = 10
sendtimeout = 20
deliveryreport = log
transmitformat = auto

# 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/

それで、私は何を間違っていますか?

--- 編集 ---経由でインストールされたものを

削除し、ウェブサイトから最新の gammu をダウンロードし、指示どおりにコンパイルしました。だから今:gammuapt-getwammu.eu

# gammu version
[Gammu version 1.36.6]
...

# gammu-detect
; Configuration file generated by gammu-detect.
; Please check The Gammu Manual for more information.

[gammu]
device = /dev/ttyUSB0
name = Phone on USB serial port HUAWEI_MOBILE HUAWEI_MOBILE
connection = at

[gammu1]
device = /dev/ttyUSB1
name = Phone on USB serial port HUAWEI_MOBILE HUAWEI_MOBILE
connection = at

opening socket: Nie ma takiego urządzenia

どこ/dev/huaweiで作成されましたかln -s /dev/ttyUSB0
今、デバイスを確認するために入力gammu identifyしましたが、1 時間後にデバイスが何かを待っているために中断しました。
以下は gdb からのバックトラックです。

# gdb --args gammu --identify
GNU gdb (Raspbian 7.7.1+dfsg-5) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from gammu...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/local/bin/gammu --identify
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
^C
Program received signal SIGINT, Interrupt.
0xb6d674ec in select () at ../sysdeps/unix/syscall-template.S:81
81      ../sysdeps/unix/syscall-template.S: Nie ma takiego pliku ani katalogu.
(gdb) bt
#0  0xb6d674ec in select () at ../sysdeps/unix/syscall-template.S:81
#1  0xb6f32968 in serial_read () from /usr/local/lib/libGammu.so.7
#2  0xb6e95c8c in GSM_ReadDevice () from /usr/local/lib/libGammu.so.7
#3  0xb6e95dcc in GSM_WaitForOnce () from /usr/local/lib/libGammu.so.7
#4  0xb6e95ef0 in GSM_WaitFor () from /usr/local/lib/libGammu.so.7
#5  0xb6edda2c in ATGEN_Initialise () from /usr/local/lib/libGammu.so.7
#6  0xb6e94f20 in GSM_TryGetModel () from /usr/local/lib/libGammu.so.7
#7  0xb6e95518 in GSM_InitConnection_Log () from /usr/local/lib/libGammu.so.7
#8  0x00000000 in ?? ()
(gdb)
4

1 に答える 1

0

このスレッドによると、USB デバイスへの /dev/serial/by-id/ パスを使用する必要があります。

例 ポート = /dev/serial/by-id/usb-Standard_USB_USB_2.0-if01

http://comments.gmane.org/gmane.linux.drivers.gammu/9719を参照してください。

于 2016-07-18T16:42:53.610 に答える