**>From: R2D2 <[EMAIL PROTECTED]>
**>Subject: System error 104 : Error reading from fd23 - Please help
**>To: [EMAIL PROTECTED]
**>Date: Fri, 15 Aug 2003 16:15:35 +0100 (BST)
**>
**>Hello All,
**>
**>I am unable to send SMS Messages from my Kannel SMS
**>Gateway. The configuration is as under :
**>i) Operating system : windows xp pro + cygwin 1.3.19
**>ii) Mobile phone which doubles up as the SMSC : LG
**>Model 2030. This is CDMA compatible and Internet+MMS
**>Ready.
**>iii) This phone is connected to the PC via a USB Cable
**>at comm interface com4
**>iv) Bearer Signal for the Phone is WLL-CDMA.
**>
**>I want to send and receive SMS messages using this
**>setup and using the existing CDMA network. The SMSC
**>will be a virtual SMSC which runs on the commercial
**>CDMA network.
**>
**>I have only used Kannel as a WAP Gateway ealier and
**>have no problem (thanks for WTP-SAR support!).
**>HOwever, I am a newbie wrt SMS and need your help,
**>guidance and patience.
**>Many Thanks,
**>p.s.: Following are screens captured from my cygwin
**>terminals/shells - one which runs the bearerbox and
**>the other the smsbox. Both use the smskannel.conf file
**>found under the etc folder.
**>Here are the customisations I have made to the
**>relevant files :
**>
**><snip>
**># SMSC CONNECTIONS
**>group = smsc
**>smsc=at2
**>sms-center = "+91984508701"
**>modemtype = auto
**>device = com4
**>speed=115200
**></snip>
**>
**><snip>
**># SMSBOX SETUP
**>group = smsbox
**>bearerbox-host = localhost
**>sendsms-port = 13013
**>global-sender = "+91984508701"
**>#sendsms-chars = "0123456789 +-"
**>log-file = "/tmp/smsbox.log"
**>log-level = 0
**>access-log = "access.log"
**></snip>
**>
**>Can anyone please explain the difference between the
**>'smsc-center' and the 'global-sender' settings ?
**>The rest is as per the given/default 'smskannel.conf'
**>settings....[ not repeated here]
**>As you can see I am using 'auto'. I have made one
**>change to the modems.conf file for the generic modem
**>as under :
**>
**><snip>
**># If modemtype=auto, try everyone and defaults to this
**>one
**>group = modems
**>id = generic
**>name = "Generic Modem"
**>detect-string = "ATQ0V1E0"
**>keepalive-cmd="AT"
**></snip>
**>
**>I am not sure that the detect-string is correct.
**>However, when I 'diagnose' my modem it repsonds to
**>this. I think the AT command should be supported as
**>well as it is more generic to all modems. If you have
**>a closer look at my logs you would see that I have 1
**>error, which is visible in the bearerbox logs given
**>under [wrt thread 5]:
**>
**><snip>
**>2003-08-15 19:55:53 [5] DEBUG: AT2[com4]: --> ATI^M
**>2003-08-15 19:55:53 [5] DEBUG: AT2[com4]: <-- ERROR
**>2003-08-15 19:55:53 [5] DEBUG: Thread 5
**>(gw/smsc/smsc_at2.c:at2_device_thread) terminates.
**></snip>
**>
**>
**><snip>
**>
**>SMSBOX LOGS
**>============
**>
**>2003-08-15 19:58:46 [2] DEBUG: HTTP: Creating
**>HTTPClient for `169.254.101.152'.
**>2003-08-15 19:58:46 [3] INFO: smsbox: Got HTTP request
**></cgi-bin/sendsms> from <
**>169.254.101.152>
**>2003-08-15 19:58:46 [3] INFO: sendsms used by <tester>
**>2003-08-15 19:58:46 [3] INFO: sendsms
**>sender:<tester:+91984508701> (169.254.101.
**>152) to:<9886049688> msg:<This is a test !>
**>2003-08-15 19:58:46 [3] DEBUG: message length 16,
**>sending 1 messages
**>2003-08-15 19:58:46 [3] DEBUG: Status: 202 Answer:
**><Sent.>
**>2003-08-15 19:58:46 [3] DEBUG: HTTP: Resetting
**>HTTPClient for `169.254.101.152'.
**>
**>2003-08-15 19:59:46 [1] ERROR: Error reading from fd
**>23:
**>2003-08-15 19:59:46 [1] ERROR: System error 104:
**>Connection reset by peer
**>2003-08-15 19:59:46 [1] ERROR: Error reading from fd
**>23:
**>2003-08-15 19:59:46 [1] ERROR: System error 104:
**>Connection reset by peer
**>2003-08-15 19:59:46 [1] DEBUG: HTTP: Destroying
**>HTTPClient area 0x100db768.
**>2003-08-15 19:59:46 [1] DEBUG: HTTP: Destroying
**>HTTPClient for `169.254.101.152'
**>.
**>
**></snip>
**>
**>
**><snip>
**>
**>BEARERBOX LOGS
**>==============
**>$ ./bearerbox ../etc/smskannel.conf
**>2003-08-15 19:55:50 [0] INFO: Debug_lvl = -1, log_file
**>= <none>, log_lvl = 0
**>2003-08-15 19:55:50 [0] WARNING: DLR: using default
**>'internal' for storage type.
**>
**>2003-08-15 19:55:50 [0] DEBUG: Kannel bearerbox
**>version `1.3.0'.
**>System CYGWIN_NT-5.1, release 1.3.19(0.71/3/2),
**>version 2003-01-23 21:31, machin
**>e i686.
**>Hostname saturn.ads.ntu.ac.uk, IP 169.254.101.152.
**>Libxml version 20423.
**>Using OpenSSL 0.9.6h 5 Dec 2002.
**>Using native malloc.
**>
**>2003-08-15 19:55:51 [0] DEBUG: HTTP: Opening server at
**>port 13000.
**>2003-08-15 19:55:51 [0] DEBUG: Started thread 1
**>(gwlib/fdset.c:poller)
**>2003-08-15 19:55:51 [0] DEBUG: Started thread 2
**>(gwlib/http.c:server_thread)
**>2003-08-15 19:55:51 [0] DEBUG: Started thread 3
**>(gw/bb_http.c:httpadmin_run)
**>2003-08-15 19:55:51 [0] DEBUG: starting smsbox
**>connection module
**>2003-08-15 19:55:51 [0] DEBUG: Started thread 4
**>(gw/bb_boxc.c:smsboxc_run)
**>2003-08-15 19:55:51 [0] INFO: AT2[com4]: configuration
**>doesn't show modemtype. w
**>ill autodetect
**>2003-08-15 19:55:51 [0] DEBUG: Started thread 5
**>(gw/smsc/smsc_at2.c:at2_device_t
**>hread)
**>2003-08-15 19:55:51 [5] DEBUG: AT2[com4]: detecting
**>modem type
**>2003-08-15 19:55:51 [5] INFO: AT2[com4]: opening
**>device
**>2003-08-15 19:55:51 [6] DEBUG: sms_router: time to
**>sleep
**>2003-08-15 19:55:51 [0] DEBUG: Started thread 6
**>(gw/bb_smscconn.c:sms_router)
**>2003-08-15 19:55:51 [0] INFO:
**>----------------------------------------
**>2003-08-15 19:55:51 [0] INFO: Kannel bearerbox II
**>version 1.3.0 starting
**>2003-08-15 19:55:51 [5] DEBUG: AT2[com4]: device
**>opened
**>2003-08-15 19:55:51 [0] INFO: MAIN: Start-up done,
**>entering mainloop
**>2003-08-15 19:55:51 [0] DEBUG: AT2[com4]: start called
**>2003-08-15 19:55:51 [6] DEBUG: sms_router: list_len =
**>0
**>2003-08-15 19:55:51 [5] INFO: AT2[com4]: speed set to
**>115200
**>2003-08-15 19:55:51 [5] DEBUG: AT2[com4]: --> ^M
**>2003-08-15 19:55:53 [5] DEBUG: AT2[com4]: --> AT^M
**>2003-08-15 19:55:53 [5] DEBUG: AT2[com4]: <-- OK
**>2003-08-15 19:55:53 [5] DEBUG: AT2[com4]: --> AT&F^M
**>2003-08-15 19:55:53 [5] DEBUG: AT2[com4]: <-- OK
**>2003-08-15 19:55:53 [5] DEBUG: AT2[com4]: --> ATE0^M
**>2003-08-15 19:55:53 [5] DEBUG: AT2[com4]: <-- ATE0
**>2003-08-15 19:55:53 [5] DEBUG: AT2[com4]: <-- OK
**>2003-08-15 19:55:53 [5] DEBUG: AT2[com4]: --> ATI^M
**>2003-08-15 19:55:53 [5] DEBUG: AT2[com4]: <-- ERROR
**>2003-08-15 19:55:53 [5] DEBUG: Thread 5
**>(gw/smsc/smsc_at2.c:at2_device_thread) t
**>erminates.
**>2003-08-15 19:56:30 [4] DEBUG: Started thread 7
**>(gw/bb_boxc.c:function)
**>2003-08-15 19:56:30 [7] INFO: Client connected from
**><127.0.0.1>
**>2003-08-15 19:56:30 [7] DEBUG: Started thread 8
**>(gw/bb_boxc.c:boxc_sender)
**>2003-08-15 19:57:23 [7] DEBUG: boxc_receiver: sms
**>received
**>2003-08-15 19:57:23 [6] DEBUG: sms_router: time to
**>sleep
**>2003-08-15 19:58:46 [7] DEBUG: boxc_receiver: sms
**>received
**>2003-08-15 20:02:38 [2] DEBUG: HTTP: Creating
**>HTTPClient for `169.254.101.152'.
**>2003-08-15 20:02:38 [3] DEBUG: HTTP: Resetting
**>HTTPClient for `169.254.101.152'.
**>
**></snip>
The 'ATI' is a query to the modem to identify itself. Kannel issues
the 'ATI' and listens for the response from the modem...hoping to
be able to map the response to a known modem configuration found
in the modems.conf. At this point your modem is failing to
give Kannel what it wants. If you still want to use your LG
phone, then you will need to modify gw/smsc/smsc_at2.c to bypass
the identification query and hardcode the identification to your
LG.
BTW, if your LG does not understand ETSI 07.05 AT commands for
sending/receiving SMS via a modem, then you cannot use your LG
as a virtual SMSC. In other words, if the modem does not understand
'AT+CMGS' (Communication:MessaGeSend), and 'AT+CMGR'
(Communication:MessaGeRead) then don't go any further. Kannel
will not know how to talk to your modem.
Kannel requires the following additional things to be supported by the
modem before it can be used as a virtual SMSC:
1) Support for unsolicited indication that an SMS has been received
by the modem. Kannel looks for a '+CMT' (Communication:MT)
or '+CDS' (Communication:DELIVER_SM) unsolicited response from
the modem to know when to query the modem for an incoming SMS.
2) Ability to send PDU encoded SMS instead of Text. This means
that the modem must be able to accept an 'AT+CMGF=0'.
To do a quick test:
1) connect to the modem
2) issue the following AT commands:
AT+CMGF=1 <---Changes message format to textual
AT+CMGS="+MSISDN" <---Replace MSISDN with the destination address of
a phone which will (hopefully) receive this
SMS you are about to send
This is a test message <ctrl-Z> <-Type in a message to send and
terminate the message with a <Ctrl>-Z
character. Also, after issuing the
AT+CMGS="...", you should get a '>'
prompt
3) If after the <Ctrl>-Z, you get and 'OK' prompt and you receive the
SMS on your destination phone, then your modem supports sending
SMS in text modem.
4) If your modem passed the first test, then try and see if it can
understand sending SMS using PDU mode. Issue the following AT commands:
AT+CMGF=0
5) If you get an 'OK' from the modem, then your modem supports requirement
2). You are half way there.
If your modem passes the sending SMS and the mode switch to PDU mode, then
chances are that it will work as a virtual SMSC. But, that does not
mean it will work WELL as an virtual SMSC. Even well tested GSM modems
(WAVECOM) have limitations and will not replace a true connection to a
real SMSC.
Regards,
Davy Chan