Gammu 无法打开设备 (DEVICEOPENERROR[2])
Gammu cannot open device (DEVICEOPENERROR[2])
我正在使用 gammu-smsd 1.31.90,我为我的 USB 3g 加密狗制定了 udev 规则,但 gammu-smsd 无法连接到设备。它说 DEVICEOPENERROR [2]。
我该如何解决?
udev-rule in /etc/udev/rules.d/10-rules.local
SUBSYSTEMS=="usb", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1001", SYMLINK+="phone", GROUP="dialout"
Gammu 日志:
Wed 2016/03/09 15:57:58 gammu-smsd[2466]: Starting phone communication...
Wed 2016/03/09 15:57:58 gammu-smsd[2466]: gammu: [Gammu 1.31.90 built 08:54:06 May 23 2012 using GCC 4.6]
Wed 2016/03/09 15:57:58 gammu-smsd[2466]: gammu: [Connection - "at"]
Wed 2016/03/09 15:57:58 gammu-smsd[2466]: gammu: [Connection index - 0]
Wed 2016/03/09 15:57:58 gammu-smsd[2466]: gammu: [Model type - ""]
Wed 2016/03/09 15:57:58 gammu-smsd[2466]: gammu: [Device - "/dev/phone"]
Wed 2016/03/09 15:57:58 gammu-smsd[2466]: gammu: [Running on - Linux, kernel 3.4.103 (#4 SMP PREEMPT Thu Dec 18 12:55:58 CST 2014)]
Wed 2016/03/09 15:57:58 gammu-smsd[2466]: gammu: [System error - tcgetattr in serial_open, 25, "Inappropriate ioctl for device"]
Wed 2016/03/09 15:57:58 gammu-smsd[2466]: gammu: Init:GSM_TryGetModel failed with error DEVICEOPENERROR[2]: Error opening device. Unknown, busy or no permissions.
Wed 2016/03/09 15:57:58 gammu-smsd[2466]: Can't open device: Error opening device. Unknown, busy or no permissions. (DEVICEOPENERROR[2])
您必须配置 2 个文件并编辑 'port' 和 'Connection' 字段。
gammu-config
此配置文件位于 '/home/$YOUR_USER_NAME/.gammurc'
并配置这个:
nano /etc/gammu-smsdrc
将您的连接字段设置为 'at',将端口字段设置为 'ttyUSBx',这将显示您的系统。
重新启动您的 gammu-smsd 服务,如果它处于活动状态,它应该可以工作。
service gammu-smsd restart
service gammu-smsd status
● gammu-smsd.service - SMS daemon for Gammu
Loaded: loaded (/lib/systemd/system/gammu-smsd.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2017-12-11 00:02:06 IRST; 10h ago
Docs: man:gammu-smsd(1)
Main PID: 650 (gammu-smsd)
Memory: 1.8M
CPU: 3min 8.684s
CGroup: /system.slice/gammu-smsd.service
└─650 /usr/bin/gammu-smsd --pid=/var/run/gammu-smsd.pid --daemon
警告:自单元启动以来日志已被轮换。日志输出不完整或不可用。
我正在使用 gammu-smsd 1.31.90,我为我的 USB 3g 加密狗制定了 udev 规则,但 gammu-smsd 无法连接到设备。它说 DEVICEOPENERROR [2]。 我该如何解决?
udev-rule in /etc/udev/rules.d/10-rules.local
SUBSYSTEMS=="usb", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1001", SYMLINK+="phone", GROUP="dialout"
Gammu 日志:
Wed 2016/03/09 15:57:58 gammu-smsd[2466]: Starting phone communication...
Wed 2016/03/09 15:57:58 gammu-smsd[2466]: gammu: [Gammu 1.31.90 built 08:54:06 May 23 2012 using GCC 4.6]
Wed 2016/03/09 15:57:58 gammu-smsd[2466]: gammu: [Connection - "at"]
Wed 2016/03/09 15:57:58 gammu-smsd[2466]: gammu: [Connection index - 0]
Wed 2016/03/09 15:57:58 gammu-smsd[2466]: gammu: [Model type - ""]
Wed 2016/03/09 15:57:58 gammu-smsd[2466]: gammu: [Device - "/dev/phone"]
Wed 2016/03/09 15:57:58 gammu-smsd[2466]: gammu: [Running on - Linux, kernel 3.4.103 (#4 SMP PREEMPT Thu Dec 18 12:55:58 CST 2014)]
Wed 2016/03/09 15:57:58 gammu-smsd[2466]: gammu: [System error - tcgetattr in serial_open, 25, "Inappropriate ioctl for device"]
Wed 2016/03/09 15:57:58 gammu-smsd[2466]: gammu: Init:GSM_TryGetModel failed with error DEVICEOPENERROR[2]: Error opening device. Unknown, busy or no permissions.
Wed 2016/03/09 15:57:58 gammu-smsd[2466]: Can't open device: Error opening device. Unknown, busy or no permissions. (DEVICEOPENERROR[2])
您必须配置 2 个文件并编辑 'port' 和 'Connection' 字段。
gammu-config
此配置文件位于 '/home/$YOUR_USER_NAME/.gammurc' 并配置这个:
nano /etc/gammu-smsdrc
将您的连接字段设置为 'at',将端口字段设置为 'ttyUSBx',这将显示您的系统。 重新启动您的 gammu-smsd 服务,如果它处于活动状态,它应该可以工作。
service gammu-smsd restart
service gammu-smsd status
● gammu-smsd.service - SMS daemon for Gammu Loaded: loaded (/lib/systemd/system/gammu-smsd.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2017-12-11 00:02:06 IRST; 10h ago Docs: man:gammu-smsd(1) Main PID: 650 (gammu-smsd) Memory: 1.8M CPU: 3min 8.684s CGroup: /system.slice/gammu-smsd.service └─650 /usr/bin/gammu-smsd --pid=/var/run/gammu-smsd.pid --daemon
警告:自单元启动以来日志已被轮换。日志输出不完整或不可用。