buggnokii - Bugs: bug #46156, Huawei E3131 sends SMS but gnokii...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #46156: Huawei E3131 sends SMS but gnokii times out and reports failure

Submitter:  Allan Dyer <agdyer>
Submitted:  Thu 08 Oct 2015 11:29:15 AM UTC
   
 
Category:  gnokii Severity:  3 - Normal
Item Group:  minor malfunction Status:  Need Info
Privacy:  Public Assigned to:  None
Open/Closed:  Open

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.

Allan Dyer <agdyer>
Sat 17 Oct 2015 12:49:29 PM UTC, comment #1: 

Can you check if it works using /dev/ttyUSB1 or /dev/ttyUSB2 ?

We know that when an SMS arrives on Huaweis a notification is sent only to /dev/ttyUSB1 but it might be the same also for sending.
If you can confirm that I will update http://wiki.gnokii.org/index.php/Huawei

If that doesn't work you can try to increase the value of smsc_timeout (which defaults to 10 seconds): set it to 0 for "infinite" and measure how long it actually takes, eg using /usr/bin/time

Daniele Forsi <dforsi>
Group administrator
Thu 08 Oct 2015 11:29:15 AM UTC, original submission:  

Phone device: Huawei E3131 HSPA+ USB Stick
lsusb
Bus 001 Device 035: ID 12d1:1506 Huawei Technologies Co., Ltd. E398 LTE/UMTS/GSM Modem/Networkcard
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

port = /dev/ttyUSB0 (or gsmmodem, see below)
model = AT
connection = serial

OS: Debian 8
Gnokii: Debian package Version: 0.6.30+dfsg-1
gnokii -v
GNOKII Version 0.6.30
Use 'gnokii --help' for usage information.

An attempt to send a message gives:
gnokii --sendsms 97455866
GNOKII Version 0.6.30
Please enter SMS text. End your input with <cr><control-D>:
This is a test message

SMS Send failed (Command timed out.)

BUT the message is received.
The behaviour changes if I configure gnokii to use the different ports:
ttyUSB0: As described above
ttyUSB1: "Telephone interface init failed: Command failed."
ttyUSB2: As describe above, but the device disappears and becomes ttyUSB3
Update: on one occasion, using ttyUSB0 resulted in the SMS being sent and the ports reconfiguring to ttyUSB1, ttyUSB2 and ttyUSB3, a symlink called gsmmodem gets created by the udev rules.

Attached files:
config
dmesg output of dmesg, the changes in the ports can be seen
test20151008 output of an smssend with logging on.

I've also tried reporting this on the manufacturer's support page. I'll update this if they respond.

Allan Dyer <agdyer>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #35100:  config added by agdyer (8KiB - application/octet-stream)
file #35101:  dmesg added by agdyer (88KiB - application/octet-stream)
file #35102:  test20151008 added by agdyer (5KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dforsi (Posted a comment)
  • -email is unavailable- added by agdyer (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-10-17 dforsi StatusNone Need Info
    2015-10-08 agdyer Attached File- Added config, #35100
        Attached File- Added dmesg, #35101
        Attached File- Added test20151008, #35102

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code