I have problem with gnokii 0.6.31 +usb huawei e220 (centos 6.4 64 bit)
Normaly works ok.echo "SMS from Huawei" | gnokii --phone huawei --config /etc/gnokiirc --sendsms 1234567890 GNOKII Version 0.6.31 Send succeeded with reference -1!
But after a couple of days days it stops working and I get the following error condition:
echo "SMS from Huawei" | gnokii --phone huawei --config /etc/gnokiirc --sendsms 1234567890 GNOKII Version 0.6.31 Initialization failed (11) Telephone interface init failed: Command timed out. Quitting.
Only solution I know is to unplug and reconnect the Huawei USB modem and then it will work again.
I try with this, but that doesn’t work:
echo '2-1' |tee /sys/bus/usb/drivers/usb/unbind sleep 20 echo '2-1' |tee /sys/bus/usb/drivers/usb/bind
I got the same output whenever it’s working or not
gnokii --identify GNOKII Version 0.6.31 Apparently you didn't configure gnokii. Please do it prior to using it. You can get some clues from comments included in sample config file or give a try with gnokii-configure utility included in gnokii distribution. IMEI : Unknown Manufacturer : Unknown Model : Unknown Product name : Unknown Revision : Unknown
info from /var/log/messages
Jun 15 12:36:02 chi kernel: usbcore: registered new interface driver usbserial Jun 15 12:36:02 chi kernel: USB Serial support registered for generic Jun 15 12:36:02 chi kernel: usbcore: registered new interface driver usbserial_generic Jun 15 12:36:02 chi kernel: usbserial: USB Serial Driver core Jun 15 12:36:02 chi kernel: USB Serial support registered for GSM modem (1-port) Jun 15 12:36:02 chi kernel: option 2-1.8:1.0: GSM modem (1-port) converter detected Jun 15 12:36:02 chi kernel: usb 2-1.8: GSM modem (1-port) converter now attached to ttyUSB0 Jun 15 12:36:02 chi kernel: option 2-1.8:1.1: GSM modem (1-port) converter detected Jun 15 12:36:02 chi kernel: usb 2-1.8: GSM modem (1-port) converter now attached to ttyUSB1 Jun 15 12:36:02 chi kernel: usbcore: registered new interface driver option Jun 15 12:36:02 chi kernel: option: v0.7.2:USB Driver for GSM modems
The output of
lsusb
:Bus 002 Device 004: ID 12d1:1003 Huawei Technologies Co., Ltd. E220 HSDPA Modem / E230/E270/E870 HSDPA/HSUPA Modem
config:
[global] port = none model = fake initlength = default connection = serial use_locking = no serial_baudrate = 9600 smsc_timeout = 10 [xgnokii] allow_breakage = 0 [gnokiid] bindir = /usr/local/sbin/ [connect_script] TELEPHONE = 12345678 [phone_huawei] model = AT port = /dev/ttyUSB1 connection = serial
Answer
This solve my problem:
I add new kernel from repository and disable autosuspend to all usb devices:
for i in /sys/bus/usb/devices/*/power/autosuspend; do
echo -1 > $i;
done
for i in /sys/bus/usb/devices/*/power/level; do
echo on > $i;
done
Attribution
Source : Link , Question Author : Asker1234 , Answer Author : sebix