google-code-export / smslib

Automatically exported from code.google.com/p/smslib
1 stars 0 forks source link

Can not send SMS with SIMCom_Ltd SIM900 #519

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi, 
Thanks for providing such a good software. I am development on the GSM modem, 
model is SIM900. Reading messages OK but get IO exception when sending 
messages. Please help. Many thanks!
Following are the log information. 

Example: Send message from a serial gsm modem.
SMSLib: A Java API library for sending and receiving SMS via a GSM modem or 
other supported gateways.
This software is distributed under the terms of the Apache v2.0 License.
Web Site: http://smslib.org
Version: 3.5.2
2012-11-10 19:57:00,619 [main] INFO  Service.java(113)  - SMSLib: A Java API 
library for sending and receiving SMS via a GSM modem or other supported 
gateways.
This software is distributed under the terms of the Apache v2.0 License.
Web Site: http://smslib.org
2012-11-10 19:57:00,623 [main] INFO  Service.java(114)  - Version: 3.5.2
2012-11-10 19:57:00,623 [main] INFO  Service.java(115)  - JRE Version: 1.6.0_21
2012-11-10 19:57:00,625 [main] INFO  Service.java(116)  - JRE Impl Version: 
17.0-b17
2012-11-10 19:57:00,626 [main] INFO  Service.java(117)  - O/S: Windows 7 / x86 
/ 6.1
2012-11-10 19:57:00,629 [main] INFO  DefaultQueueManager.java(92)  - Queue 
directory not defined. Queued messages will not be saved to filesystem.
2012-11-10 19:57:00,630 [main] DEBUG AServiceThread.java(39)  - Initialized.
2012-11-10 19:57:00,632 [main] DEBUG AServiceThread.java(39)  - Initialized.
2012-11-10 19:57:00,634 [main] DEBUG AServiceThread.java(39)  - Initialized.

Modem Information:
2012-11-10 19:57:23,125 [main] DEBUG AModemDriver.java(301)  - GTW: modem.com5: 
SEND :AT+CGMI(cr)
2012-11-10 19:57:23,289 [main] DEBUG AModemDriver.java(350)  - GTW: modem.com5: 
BUFFER: SIMCOM_Ltd
OK

2012-11-10 19:57:23,289 [main] DEBUG AModemDriver.java(390)  - GTW: modem.com5: 
RECV :SIMCOM_Ltd(cr)OK(cr)
  Manufacturer: SIMCOM_Ltd
2012-11-10 19:57:23,289 [main] DEBUG AModemDriver.java(301)  - GTW: modem.com5: 
SEND :AT+CGMM(cr)
2012-11-10 19:57:23,456 [main] DEBUG AModemDriver.java(350)  - GTW: modem.com5: 
BUFFER: SIMCOM_SIM900
OK

2012-11-10 19:57:23,457 [main] DEBUG AModemDriver.java(390)  - GTW: modem.com5: 
RECV :SIMCOM_SIM900(cr)OK(cr)
  Model: SIMCOM_SIM900
2012-11-10 19:57:23,457 [main] DEBUG AModemDriver.java(301)  - GTW: modem.com5: 
SEND :AT+CGSN(cr)
2012-11-10 19:57:23,629 [main] DEBUG AModemDriver.java(350)  - GTW: modem.com5: 
BUFFER: 012207003897045
OK

2012-11-10 19:57:23,630 [main] DEBUG AModemDriver.java(390)  - GTW: modem.com5: 
RECV :012207003897045(cr)OK(cr)
  Serial No: 012207003897045
  SIM IMSI: ** MASKED **
2012-11-10 19:57:23,630 [main] DEBUG AModemDriver.java(301)  - GTW: modem.com5: 
SEND :AT+CSQ(cr)
2012-11-10 19:57:23,794 [main] DEBUG AModemDriver.java(350)  - GTW: modem.com5: 
BUFFER: +CSQ: 22,0
OK

2012-11-10 19:57:23,795 [main] DEBUG AModemDriver.java(390)  - GTW: modem.com5: 
RECV :+CSQ: 22,0(cr)OK(cr)
  Signal Level: -69 dBm
2012-11-10 19:57:23,796 [main] DEBUG AModemDriver.java(301)  - GTW: modem.com5: 
SEND :AT+CBC(cr)
2012-11-10 19:57:23,966 [main] DEBUG AModemDriver.java(350)  - GTW: modem.com5: 
BUFFER: +CBC: 0,78,3905
OK

2012-11-10 19:57:23,967 [main] DEBUG AModemDriver.java(390)  - GTW: modem.com5: 
RECV :+CBC: 0,78,3905(cr)OK(cr)
  Battery Level: 78%

2012-11-10 19:57:41,370 [main] DEBUG AModemDriver.java(301)  - GTW: modem.com5: 
SEND :AT+CMMS=2(cr)
2012-11-10 19:57:41,523 [main] DEBUG AModemDriver.java(350)  - GTW: modem.com5: 
BUFFER: OK

2012-11-10 19:57:41,523 [main] DEBUG AModemDriver.java(390)  - GTW: modem.com5: 
RECV :OK(cr)
2012-11-10 19:57:45,335 [main] DEBUG ModemGateway.java(470)  - GTW: modem.com5: 
=================================================
<< SmsSubmitPdu >>
Raw Pdu: 
07813157127338F911000B813119002843F30008FF2400480065006C006C006F002000660072006F
006D00200053004D0053004C006900620021

SMSC Address: [Length: 7 (07) octets, Type: 81 (10000001), Address: 13752137839]
First Octet: 11 [TP-MTI: (SMS-SUBMIT), TP-MMS: (has no messages), TP-RD: (allow 
duplicates), TP-VPF: (validity format, integer, TP-SRI: (No Status Report), 
TP-SRR: (No Status Report), TP-UDHI: (no UDH)]
Message Reference: 00
Destination Address: [Length: 11 (0B), Type: 81 (10000001), Address: 
13910082343]
TP-PID: 00 (00000000)
TP-DCS: 08 (UCS2 encoding) (00001000)
TP-VPF: 10584 hours

User Data Length: 36 (24) octets
User Data (pdu) : 
00480065006C006C006F002000660072006F006D00200053004D0053004C006900620021
User Data (decoded): [Hello from SMSLib!]
=================================================

2012-11-10 19:57:45,336 [main] DEBUG ModemGateway.java(485)  - GTW: modem.com5: 
Sending Pdu: 
07813157127338F911000B813119002843F30008FF2400480065006C006C006F002000660072006F
006D00200053004D0053004C006900620021
2012-11-10 19:57:54,101 [main] DEBUG AModemDriver.java(301)  - GTW: modem.com5: 
SEND :AT+CMGS=50(cr)
2012-11-10 19:57:58,142 [main] DEBUG AModemDriver.java(409)  - GTW: modem.com5: 
clearBuffer() called.
2012-11-10 19:57:59,794 [main] DEBUG AModemDriver.java(301)  - GTW: modem.com5: 
SEND 
:07813157127338F911000B813119002843F30008FF2400480065006C006C006F002000660072006
F006D00200053004D0053004C006900620021
2012-11-10 19:58:03,396 [main] WARN  Service.java(632)  - sendMessage(): 
Gateway modem.com5 throws IO errors, marking for restart.

===============================================================================
<< OutboundMessage >>
-------------------------------------------------------------------------------
 Gateway Id: *
 Message Id: 0
 Message UUID: 74d975bc-1387-4425-b0c1-d84994c0df7b
 Encoding: UCS2 (Unicode)
 Date: Sat Nov 10 19:57:24 CST 2012
 SMSC Ref No: 
 Recipient: 13910082343
 Dispatch Date: null
 Message Status: FAILED
 Failure Cause: GATEWAY_FAILURE
 Validity Period (Hours): -1
 Status Report: false
 Source / Destination Ports: -1 / -1
 Flash SMS: false
 Text: Hello from SMSLib!
 PDU data: 00480065006C006C006F002000660072006F006D00200053004D0053004C006900620021
 Scheduled Delivery: null
===============================================================================

Now Sleeping - Hit <enter> to terminate.

Original issue reported on code.google.com by xdm...@gmail.com on 10 Nov 2012 at 12:18

GoogleCodeExporter commented 9 years ago
2012-11-10 21:20:57,178 [main] DEBUG ModemGateway.java(470)  - GTW: modem.com5: 
=================================================
<< SmsSubmitPdu >>
Raw Pdu: 
07813157127338F911000B813119002843F30008FF2400480065006C006C006F002000660072006F
006D00200053004D0053004C006900620021

SMSC Address: [Length: 7 (07) octets, Type: 81 (10000001), Address: 13752137839]
First Octet: 11 [TP-MTI: (SMS-SUBMIT), TP-MMS: (has no messages), TP-RD: (allow 
duplicates), TP-VPF: (validity format, integer, TP-SRI: (No Status Report), 
TP-SRR: (No Status Report), TP-UDHI: (no UDH)]
Message Reference: 00
Destination Address: [Length: 11 (0B), Type: 81 (10000001), Address: 
13910082343]
TP-PID: 00 (00000000)
TP-DCS: 08 (UCS2 encoding) (00001000)
TP-VPF: 10584 hours

User Data Length: 36 (24) octets
User Data (pdu) : 
00480065006C006C006F002000660072006F006D00200053004D0053004C006900620021
User Data (decoded): [Hello from SMSLib!]
=================================================

2012-11-10 21:20:57,178 [main] DEBUG ModemGateway.java(485)  - GTW: modem.com5: 
Sending Pdu: 
07813157127338F911000B813119002843F30008FF2400480065006C006C006F002000660072006F
006D00200053004D0053004C006900620021

Original comment by xdm...@gmail.com on 10 Nov 2012 at 1:25

GoogleCodeExporter commented 9 years ago
Hello,

Have you tried setting the SMSC number yourself?

Original comment by admin@smslib.org on 11 Nov 2012 at 5:18

GoogleCodeExporter commented 9 years ago

Original comment by admin@smslib.org on 18 Nov 2012 at 9:20