SMS Server Tools 3
This site is hosted by Kekekasvi.com
 Menu
Basic information:
Additional information:
Support:
Get SMS Server Tools 3:
Additional Options

 Sponsored links

 Search
Custom Search

 Visitor locations
 
 SMS Server Tools 3 Community
Welcome, Guest. Please login or register. Mon Jun 24, 2024 13:08
SMSTools3 Community » Help and support Bottom

write_to_modem: error 5

Login and Post Reply

Page:  1

Author Post
Member
Registered:
Mar 2012
Location: Russian Federation
Debian 6.0.3 x86:
Version of smsd 3.1.14:
Smsd installed from:package
ZTE K3565-z:
Interface:USB

Hi.
during the work i getting the following message:
2012-03-09 16:41:48,3, GSM: write_to_modem: error 5: Input / output error

looked in dmesg |tail 20:

Quote
[109003.515250] usb 1-6.1: USB disconnect, address 36
[109003.515470] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
[109003.515495] option 1-6.1:1.0: device disconnected
[109003.515626] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
[109003.515646] option 1-6.1:1.1: device disconnected
[109003.515810] option: option_instat_callback: error -108
[109003.515924] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
[109003.515945] option 1-6.1:1.2: device disconnected
[109017.280261] usb 1-6.1: new high speed USB device using ehci_hcd and address 37
[109017.383325] usb 1-6.1: New USB device found, idVendor=19d2, idProduct=0016
[109017.383330] usb 1-6.1: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[109017.383334] usb 1-6.1: Product: ZTE CDMA Technologies MSM
[109017.383337] usb 1-6.1: Manufacturer: ZTE,Incorporated
[109017.383526] usb 1-6.1: configuration #1 chosen from 1 choice
[109017.384757] option 1-6.1:1.0: GSM modem (1-port) converter detected
[109017.384949] usb 1-6.1: GSM modem (1-port) converter now attached to ttyUSB0
[109017.385037] option 1-6.1:1.1: GSM modem (1-port) converter detected
[109017.385137] usb 1-6.1: GSM modem (1-port) converter now attached to ttyUSB1
[109017.385220] option 1-6.1:1.2: GSM modem (1-port) converter detected
[109017.385394] usb 1-6.1: GSM modem (1-port) converter now attached to ttyUSB3

but it is not important - cat /etc/udev/rules.d/10-ZTE.rules:
SUBSYSTEM=="tty", KERNELS=="1-6.1:1.2", NAME="usb/modem"

and when i trying connect over minicom - it is success:
minicom -D /dev/usb/modem:

Quote
Welcome to minicom 2.4
OPTIONS: I18n
Compiled on Sep 5 2010, 09:23:03.
Port /dev/usb/modem
Press CTRL-A Z for help on special keys
OK
OK

after restart /etc/init.d/sms3 - all work
why smstool give me this error 2012-03-09 16:41:48,3, GSM: write_to_modem: error 5: Input / output error
Thanks

Member
Registered:
Mar 2012
Location: Russian Federation
Topic owner
no ideas?
Member
Registered:
Mar 2012
Location: Russian Federation
Topic owner
cat smsd.conf
devices = GSM1
logfile = /var/log/sms/smstools.log
#loglevel = 6
loglevel = notice


outgoing = /var/spool/sms/outgoing
checked = /var/spool/sms/checked
incoming = /var/spool/sms/incoming
failed = /var/spool/sms/failed
sent = /var/spool/sms/sent

[queues]
GSM1 = /var/spool/sms/GSM/GSM1

[GSM1]
device = /usb/modem
queues = GSM1
init = AT+CPMS="SM","SM","SM"
queues = modemname
#primary_memory = SM
#secondary_memory = SR
incoming = yes
rtscts = no
hangup_incoming_call = yes
voicecall_hangup_ath = yes
unexpected_input_is_trouble = no

Member
Registered:
Mar 2012
Location: Russian Federation
Topic owner
I read the log and found the moment when it happens.

Quote
2012-03-14 15:43:05,5, GSM1: MODEM IS NOT REGISTERED, WAITING 1 SEC. BEFORE RETRYING 1. TIME
2012-03-14 15:43:07,5, GSM1: Signal Strength Indicator: (8,99) -97 dBm (Marginal), Bit Error Rate: not known or not detectable

After this event modem not work.
But. I have watched more and in the logs found this:

Quote
2012-04-01 21:37:00,5, GSM2: MODEM IS NOT REGISTERED, WAITING 1 SEC. BEFORE RETRYING 1. TIME
2012-04-01 21:37:02,5, GSM2: Signal Strength Indicator: not present of not measurable, Bit Error Rate: not known or not detectable
2012-04-01 21:37:02,5, GSM2: MODEM IS NOT REGISTERED, WAITING 1 SEC. BEFORE RETRYING 2. TIME
2012-04-01 21:37:04,5, GSM2: Signal Strength Indicator: not present of not measurable, Bit Error Rate: not known or not detectable
2012-04-01 21:37:04,5, GSM2: MODEM IS NOT REGISTERED, WAITING 1 SEC. BEFORE RETRYING 3. TIME
2012-04-01 21:37:05,5, GSM2: Signal Strength Indicator: not present of not measurable, Bit Error Rate: not known or not detectable
2012-04-01 21:37:06,5, GSM2: MODEM IS NOT REGISTERED, WAITING 1 SEC. BEFORE RETRYING 4. TIME
2012-04-01 21:37:07,5, GSM2: Signal Strength Indicator: (7,99) -99 dBm (Marginal), Bit Error Rate: not known or not detectable

and GSM2 - IS WORK !!!!

i do not know why, but now google give some themes then i looking "write_to_modem: error 5: Input/output error"
after set:

check_memory_method = 1
memory_start = 0

- it is not fixed problem. in next day it is repeated. And repated without errors:

Quote
2012-03-31 17:58:45,5, GSM2: CGSN: 356517035673998
2012-03-31 17:58:45,5, GSM2: IMSI: 262032733659044
2012-03-31 17:58:45,5, GSM1: CGSN: 356517035670879
2012-03-31 17:58:45,5, GSM1: IMSI: 262032732990796
2012-03-31 17:58:47,5, GSM2: SMS received, From: XXXXXXXXXXX
2012-03-31 17:58:47,5, GSM1: SMS received, From: XXXXXXXXXXX
2012-03-31 19:29:16,3, GSM1: write_to_modem: error 5: Input/output error

but...
after many times i see it:

Quote
2012-04-02 10:29:36,3, GSM1: write_to_modem: error 5: Input/output error
2012-04-02 10:29:42,3, GSM3: Unexpected input: +CPMS: "SM",0,30,"SM",0,30,"SM",0,30 OK
2012-04-02 10:29:43,3, smsd: FATAL ERROR: Looks like another smsd (29206) is running. I (1969) quit now.
2012-04-02 10:29:43,2, smsd: Smsd mainprocess terminated abnormally. PID: 1969.
2012-04-02 10:29:43,3, GSM1: write_to_modem: error 5: Input/output error
2012-04-02 10:29:43,3, GSM1: write_to_modem: error 5: Input/output error
2012-04-02 10:29:43,3, GSM1: write_to_modem: error 5: Input/output error
2012-04-02 10:29:43,3, GSM1: write_to_modem: error 5: Input/output error
2012-04-02 10:29:43,3, GSM1: write_to_modem: error 5: Input/output error
2012-04-02 10:29:43,2, GSM1: Modem handler 0 terminated. PID: 1974, was started 12-03-31 17:58:41.
2012-04-02 10:29:43,2, GSM2: Modem handler 1 terminated. PID: 1975, was started 12-03-31 17:58:41.
2012-04-02 10:29:43,3, GSM3: Modem did not accept the pre-init string
2012-04-02 10:29:43,3, GSM3: Error: Unexpected answer from Modem after +CREG?, waiting 1 sec. before retrying
2012-04-02 10:29:43,2, GSM3: Modem handler 7 terminated. PID: 1981, was started 12-03-31 17:58:41.

and after this case - all modems is work. I have 3 same modems. But, in /var/log/smsd.log i never see a log about incoming messages. But o see this messages in my sql datebase.

any ideas? I continue to read another topics.

Member
Registered:
Mar 2012
Location: Russian Federation
Topic owner
delirium...
i change modem to another, restart system and....
after 30 seconds i have problem!!!
after 10 minutes i have problem with second modem !!!

Member
Registered:
Mar 2012
Location: Russian Federation
Topic owner
so. i took another PC with USB 1.0 and today i have this:

Quote
2012-05-15 03:04:21,3, GSM7: write_to_modem: error 5: Input/output error
2012-05-15 03:04:31,3, GSM7: write_to_modem: error 5: Input/output error
2012-05-15 03:04:41,3, GSM7: write_to_modem: error 5: Input/output error
2012-05-15 03:04:52,3, GSM7: write_to_modem: error 5: Input/output error
2012-05-15 03:05:02,3, GSM7: write_to_modem: error 5: Input/output error
2012-05-15 03:05:22,3, GSM7: write_to_modem: error 5: Input/output error
2012-05-15 03:05:32,3, GSM7: write_to_modem: error 5: Input/output error
2012-05-15 03:05:42,3, GSM7: write_to_modem: error 5: Input/output error
2012-05-15 03:05:53,3, GSM7: write_to_modem: error 5: Input/output error
2012-05-15 03:06:03,3, GSM7: write_to_modem: error 5: Input/output error
2012-05-15 03:06:13,3, GSM7: write_to_modem: error 5: Input/output error
2012-05-15 03:06:23,3, GSM7: write_to_modem: error 5: Input/output error
2012-05-15 03:06:33,3, GSM7: write_to_modem: error 5: Input/output error
2012-05-15 03:06:44,3, GSM7: write_to_modem: error 5: Input/output error
2012-05-15 03:06:54,3, GSM7: write_to_modem: error 5: Input/output error
2012-05-15 03:07:05,3, GSM7: Unexpected input: +ZEND
2012-05-15 06:06:42,3, GSM7: Unexpected input: OK OK OK OK OK
2012-05-15 08:32:44,5, GSM7: SMS received, From: xxxxxxxxxxxxxxx

apparently - this hardware problem... very sorry that there is not possible to restart one modem, but only all at once ...

Member
Registered:
Mar 2012
Location: Russian Federation
Topic owner
after one week this problem repeated in new PC.................

Member
Registered:
Mar 2012
Location: Russian Federation
Topic owner
Hi. Maybe my case was fixed on 15 version ?

In this week i'll try configure 15 version on Debian 7 (test) with kernel 3.8. I have read, that kernel 3.8 have more support for USB-devices. good luck to me )


« Last edit by exonix on Wed Apr 03, 2013 15:24, 136 months ago. »
Member
Registered:
Mar 2012
Location: Russian Federation
Topic owner
it happens again. (
I think, it hardware issue. i must testing in another hardware.

Member
Registered:
Mar 2013
Location: France
Hello,

did you solve your problem ?

Member
Registered:
Dec 2016
Location: Afganistan
Hello,

I have the same problem on 5 machines with the sim5360 modems. Did anyone fix it?
All machines worked fine for half a year with the modems, but as soon as I started using smsd I faced this problem.

Member
Registered:
Dec 2016
Location: Afganistan
In addition: all 5 machines run remotely and brings connection with my vpn server by the same modems. All works fine. Thus I think there is no HW problems with the modems

Member
Registered:
Dec 2016
Location: Afganistan
"communication_delay = 5" has no effect

still get "USB disconnect" then:

GSM modem (1-port) converter now attached to ttyUSB0
GSM modem (1-port) converter now attached to ttyUSB1
GSM modem (1-port) converter now attached to ttyUSB3
GSM modem (1-port) converter now attached to ttyUSB4
GSM modem (1-port) converter now attached to ttyUSB5

Should be ttyUSB0, ttyUSB1, ttyUSB2, ttyUSB3, ttyUSB4 (smsd use ttyUSB2)

May be some port open options affects on ttyUSB2 disappearing? There is pppd at the same time working on ttyUSB3 but there is no such problem with it

P.S.
Not related to this problem but it will be good if smsd have port locking option with /tmp/LCK..ttyUSBx file

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
As fas as I know, there are no generally used locking option on Unix. Some programs use LCK files, but some not. Because locking does not work like it works on Windows, it's not implemented at all.

I think that pppd should not use the same port which is used by smsd.

Original poster have had the following issue:
Quote
2012-04-02 10:29:43,3, smsd: FATAL ERROR: Looks like another smsd (29206) is running. I (1969) quit now.

Problems were caused, because smsd was started more than once. Because of this, smsd periodically checks the issue, and stops when another daemon is detected. Using the sms3 script prevents this, but some users do not use that script and may start smsd even when it's already running.

In some system running Ubuntu I have the following:



[GSM1]
device = /dev/serial/by-id/usb-HUAWEI_HUAWEI_Mobile-if00-port0
keep_open = no
 
'smsdconf' Syntax Highlight powered by GeSHi


Sometimes the stick disappears, probably because of the weak USB power, or just interference, and gets back with the different USB number. With serial/by-id it does not cause bad problems.

Member
Registered:
Dec 2016
Location: Afganistan
keke wrote
I think that pppd should not use the same port which is used by smsd.

smsd at ttyUSB2 and pppd at ttyUSB3

keke wrote
Original poster have had the following issue:
Quote
2012-04-02 10:29:43,3, smsd: FATAL ERROR: Looks like another smsd (29206) is running. I (1969) quit now.

Problems were caused, because smsd was started more than once.

I think it's not may case, I using sms3 start/stop script.
Maybe there are two different issues in original poster's problem: io error when modem disconnects and smsd double-starting?..

Login and Post Reply

Page:  1

SMSTools3 Community » Help and support Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.