Sat 24 Oct 2015 08:59:10 AM UTC, comment #2:
Summary:
I get different behaviour with Ubuntu 14.04.3 LTS with Gnokii 0.6.31 from Debian 8 with Gnokii 0.6.30.
On both, using /dev/ttyUSB1 fails with:
Telephone interface init failed: Command timed out.
Quitting.
On Debian, using /dev/ttyUSB0 or /dev/ttyUSB2 causes the USB interfaces to change numbers, the command never terminates.
On Ubuntu, using /dev/ttyUSB0 or /dev/ttyUSB2 succeeds. The USB interfaces changed numbers once, but I have not been able to identify the trigger.
Is there a change from Gnokii 0.6.30 to Gnokii 0.6.31 that might relate to this behaviour?
The Huawei E3131 does not behave like the other Huaweis described in the wiki.
Detail:
My sms server is running Debian 8 (with a Nokia 6110 connected through a USB to serial cable), rather than take the server out of service, I continued testing on my desktop which is Unbuntu 14.04.3, both have the distribution default Gnokii package, which is 0.6.30 for Debian and 0.6.31 for Ubuntu.
I plugged E3131 into Ubuntu with Gnokii 0.6.31 ... creates /dev/ttyUSB0, /dev/ttyUSB1, /dev/ttyUSB2
For convenience of testing, Added to .config/gnokii/config
[phone_huawei0]
port = /dev/ttyUSB0
model = AT
connection = serial
[phone_huawei1]
port = /dev/ttyUSB1
model = AT
connection = serial
[phone_huawei2]
port = /dev/ttyUSB2
model = AT
connection = serial
Tests:
time gnokii --phone huawei1 --sendsms 97455866
GNOKII Version 0.6.31
Telephone interface init failed: Command timed out.
Quitting.
Command timed out.
real 0m50.630s
user 0m0.008s
sys 0m0.008s
Try the other interfaces...
time gnokii --phone huawei0 --sendsms 97455866
GNOKII Version 0.6.31
Please enter SMS text. End your input with <cr><control-D>:
hello
Send succeeded with reference 188!
real 0m7.970s
user 0m0.004s
sys 0m0.004s
time gnokii --phone huawei2 --sendsms 97455866
GNOKII Version 0.6.31
Please enter SMS text. End your input with <cr><control-D>:
Again...
Send succeeded with reference 189!
real 0m7.816s
user 0m0.004s
sys 0m0.004s
So I decided to move the E3131 back to the Debian system for continued testing. I disconnected the Nokia 6110 and plugged in the E3131, which was recognised as /dev/ttyUSB0, /dev/ttyUSB1, /dev/ttyUSB2.
time gnokii --phone huawei1 --sendsms 97455866
GNOKII Version 0.6.30
Telephone interface init failed: Command timed out.
Quitting.
Command timed out.
real 0m50.634s
user 0m0.016s
sys 0m0.012s
Note: the second USB device is not recognised as a telephone interface on either OS.
time gnokii --phone huawei0 --sendsms 97455866
GNOKII Version 0.6.30
Please enter SMS text. End your input with <cr><control-D>:
whatever...
SMS Send failed (Command timed out.)
real 0m16.227s
user 0m1.824s
sys 0m7.716s
The SMS was sent, but the USB interfaces had changed:
ls -l /dev/ttyU*
crw-rw---- 1 root dialout 188, 1 Oct 24 12:50 /dev/ttyUSB1
crw-rw---- 1 root dialout 188, 2 Oct 24 12:50 /dev/ttyUSB2
crw-rw---- 1 root dialout 188, 3 Oct 24 12:50 /dev/ttyUSB3
Unplug / replug the E3131...
ls -l /dev/ttyU*
crw-rw---- 1 root dialout 188, 0 Oct 24 12:53 /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 1 Oct 24 12:53 /dev/ttyUSB1
crw-rw---- 1 root dialout 188, 2 Oct 24 12:53 /dev/ttyUSB2
Edit config:
smsc_timeout = 0
And re-try...
time gnokii --phone huawei1 --sendsms 97455866
GNOKII Version 0.6.30
Telephone interface init failed: Command timed out.
Quitting.
Command timed out.
real 0m50.637s
user 0m0.004s
sys 0m0.012s
Again, the second USB interface is not recognised as a telephone.
time gnokii --phone huawei0 --sendsms 97455866
GNOKII Version 0.6.30
Please enter SMS text. End your input with <cr><control-D>:
Hello there!
^C
real 160m58.217s
user 31m17.676s
sys 129m31.664s
Continued until forced break (over 2 hours must be enough time!). Note: the ttyUSB renumbering occurs immediately.
ls -l /dev/ttyU*
crw-rw---- 1 root dialout 188, 1 Oct 24 12:59 /dev/ttyUSB1
crw-rw---- 1 root dialout 188, 2 Oct 24 12:59 /dev/ttyUSB2
crw-rw---- 1 root dialout 188, 3 Oct 24 12:59 /dev/ttyUSB3
Unplug / replug the E3131
ls -l /dev/ttyU*
crw-rw---- 1 root dialout 188, 0 Oct 24 15:42 /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 1 Oct 24 15:42 /dev/ttyUSB1
crw-rw---- 1 root dialout 188, 2 Oct 24 15:42 /dev/ttyUSB2
time gnokii --phone huawei2 --sendsms 97455866
GNOKII Version 0.6.30
Please enter SMS text. End your input with <cr><control-D>:
whatever
^C
real 2m19.768s
user 0m26.092s
sys 1m48.584s
Again, immediate renumbering:
ls -l /dev/ttyU*
crw-rw---- 1 root dialout 188, 0 Oct 24 15:43 /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 1 Oct 24 15:43 /dev/ttyUSB1
crw-rw---- 1 root dialout 188, 3 Oct 24 15:43 /dev/ttyUSB3
I didn't wait very long this time - once the interfaces have renumbered, how could it receive confirmation from an interface that no longer exists?
I returned the E3131 to the Ubuntu system and confirmed I could --monitor and --getsms on /dev/ttyUSB0. After trying --getsms on /dev/ttyUSB2, I found the interfaces had renumbered to /dev/ttyUSB1, /dev/ttyUSB3, /dev/ttyUSB4, but further commands on these interfaces did not trigger renumbering, and the numbering did not return to 0,1,2 on replugging the device.
|