Hi Thanasis,

I am quite puzzled, SMSLib v332 works fine with the same iTegno 3800
modem. Indeed, v332 reported the same error:
"java.lang.StringIndexOutOfBoundsException: String index out of range:
-12". But the puzzling part is that despite the error, sms server v332
is still able to send messages successfully. In comparison, v345
failed to send any message.

In addition, I also notice that v332 only reported the
StringIndexOutOfBoundsException once, whereas v345 keeps repeating the
error. I am not sure if this will get any clue as to what went wrong.

Here is the log for v332 for your reference:


C:\Data\Apps\SmsMR\BatFiles>java -Dsmslib.debug -
Dsmsserver.configfile="C:\Data\Apps\SmsMR
\SmsEngine_332\SMSServer_332.conf" -jar "C:\Data\Apps\SmsMR
\SmsEngine_332\SMSLib_332.jar"
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

SMSLib API version: 3.3.2
SMSServer version: 3.3.2
0 [main] INFO org.smslib  - 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
0 [main] INFO org.smslib  - Version: 3.3.2
0 [main] INFO org.smslib  - JRE Version: 1.6.0_18
0 [main] INFO org.smslib  - JRE Impl Version: 16.0-b13
0 [main] INFO org.smslib  - O/S: Windows XP / x86 / 5.1
16 [main] INFO org.smslib  - SMSServer: set balancer to:
LeastLoadLoadBalancer
32 [main] INFO org.smslib  - SMSServer: added gateway modem1 / Default
Serial Modem Gateway.
32 [main] INFO org.smslib  - SMSServer: added interface db1 / Default
database interface. / INOUTBOUND
625 [main] INFO org.smslib  - SMSServer: interface:
org.smslib.smsserver.interfaces.Database started.
625 [SMSLib-WatchDog] DEBUG org.smslib  - WatchDog started.
625 [SMSLib-WatchDog] INFO org.smslib  - WatchDog running...
625 [Thread-3] INFO org.smslib  - GTW: modem1: Starting gateway, using
Generic AT Handler.
625 [Thread-3] INFO org.smslib  - GTW: modem1: Opening: COM4 @115200
1282 [Thread-3] DEBUG org.smslib  - GTW: modem1: ModemDriver:
KeepAlive thread started.
1282 [Thread-3] DEBUG org.smslib  - GTW: modem1: ModemReader thread
started.
1282 [Thread-3] DEBUG org.smslib  - GTW: modem1: AsyncNotifier thread
started.
1282 [Thread-3] DEBUG org.smslib  - GTW: modem1: AsyncMessageProcessor
thread started.
1297 [Thread-3] DEBUG org.smslib  - GTW: modem1: clearBuffer() called.
2297 [Thread-3] DEBUG org.smslib  - GTW: modem1: SEND :(27)
2500 [Thread-3] DEBUG org.smslib  - GTW: modem1: SEND :+++
2703 [Thread-3] DEBUG org.smslib  - GTW: modem1: SEND :ATZ
2907 [Thread-3] DEBUG org.smslib  - GTW: modem1: clearBuffer() called.
3907 [Thread-3] DEBUG org.smslib  - GTW: modem1: SEND :ATZ(cr)
4110 [Thread-3] DEBUG org.smslib  - GTW: modem1: SEND :ATE0(cr)
4313 [Thread-3] DEBUG org.smslib  - GTW: modem1: clearBuffer() called.
5313 [Thread-3] DEBUG org.smslib  - GTW: modem1: SEND :ATZ(cr)ATZ(cr)
ATZ(cr)(cr)
5313 [Thread-3] DEBUG org.smslib  - GTW: modem1: SEND :ATE0(cr)
5516 [Thread-3] DEBUG org.smslib  - GTW: modem1: clearBuffer() called.
6516 [Thread-3] DEBUG org.smslib  - GTW: modem1: SEND :AT+CPIN?(cr)
6532 [Thread-3] DEBUG org.smslib  - GTW: modem1: BUFFER: +CPIN: READY

6532 [Thread-3] DEBUG org.smslib  - GTW: modem1: RECV :+CPIN: READY
(cr)
6532 [Thread-3] DEBUG org.smslib  - GTW: modem1: SEND :ATE0(cr)
6735 [Thread-3] DEBUG org.smslib  - GTW: modem1: clearBuffer() called.
7735 [Thread-3] DEBUG org.smslib  - GTW: modem1: SEND :AT+CLIP=1(cr)
7735 [Thread-3] DEBUG org.smslib  - GTW: modem1: BUFFER: OK

7735 [Thread-3] DEBUG org.smslib  - GTW: modem1: RECV :OK(cr)
7735 [Thread-3] DEBUG org.smslib  - GTW: modem1: SEND :AT+COPS=0(cr)
7750 [Thread-3] DEBUG org.smslib  - GTW: modem1: BUFFER: ERROR

7750 [Thread-3] DEBUG org.smslib  - GTW: modem1: RECV :ERROR(cr)
7750 [Thread-3] DEBUG org.smslib  - GTW: modem1: SEND :ATE0(cr)
7953 [Thread-3] DEBUG org.smslib  - GTW: modem1: clearBuffer() called.
8953 [Thread-3] DEBUG org.smslib  - GTW: modem1: SEND :AT+CREG?(cr)
8969 [Thread-3] DEBUG org.smslib  - GTW: modem1: BUFFER: +CREG: 0,2
OK

8969 [Thread-3] DEBUG org.smslib  - GTW: modem1: RECV :+CREG: 0,2(cr)OK
(cr)
8969 [Thread-3] WARN org.smslib  - GTW: modem1: GSM: Not registered,
searching for network...
13969 [Thread-3] DEBUG org.smslib  - GTW: modem1: SEND :AT+CREG?(cr)
13969 [Thread-3] DEBUG org.smslib  - GTW: modem1: BUFFER: +CREG: 0,1
OK

13985 [Thread-3] DEBUG org.smslib  - GTW: modem1: RECV :+CREG: 0,1(cr)
OK(cr)
13985 [Thread-3] INFO org.smslib  - GTW: modem1: GSM: Registered to
home network.
13985 [Thread-3] DEBUG org.smslib  - GTW: modem1: SEND :AT+CMEE=1(cr)
13985 [Thread-3] DEBUG org.smslib  - GTW: modem1: BUFFER: OK

13985 [Thread-3] DEBUG org.smslib  - GTW: modem1: RECV :OK(cr)
13985 [Thread-3] DEBUG org.smslib  - GTW: modem1: SEND :AT+CPMS?(cr)
14110 [Thread-3] DEBUG org.smslib  - GTW: modem1: BUFFER: +CPMS: "SM",
0,30,"SM",0,30,"SM",0,30
OK

14110 [Thread-3] DEBUG org.smslib  - GTW: modem1: RECV :+CPMS: "SM",
0,30,"SM",0,30,"SM",0,30(cr)OK(cr)
14110 [Thread-3] INFO org.smslib  - GTW: modem1: MEM: Storage
Locations Found: SM
14110 [Thread-3] DEBUG org.smslib  - GTW: modem1: SEND :AT+CNMI=?(cr)
14125 [Thread-3] DEBUG org.smslib  - GTW: modem1: BUFFER: +CNMI: (0-2),
(0-3),(0,2),(0,1),(0,1)
OK

14125 [Thread-3] DEBUG org.smslib  - GTW: modem1: RECV :+CNMI: (0-2),
(0-3),(0,2),(0,1),(0,1)(cr)OK(cr)
14125 [Thread-3] DEBUG org.smslib  - CNMI: Found best match: 2
14125 [Thread-3] DEBUG org.smslib  - CNMI: Found best match: 1
14125 [Thread-3] DEBUG org.smslib  - CNMI: Found best match: 0
14125 [Thread-3] INFO org.smslib  - CNMI: No best match, returning: 1
14125 [Thread-3] DEBUG org.smslib  - CNMI: Found best match: 0
14125 [Thread-3] DEBUG org.smslib  - GTW: modem1: SEND :AT
+CNMI=2,1,0,1,0(cr)
14141 [Thread-3] DEBUG org.smslib  - GTW: modem1: BUFFER: OK

14141 [Thread-3] DEBUG org.smslib  - GTW: modem1: RECV :OK(cr)
14141 [Thread-3] DEBUG org.smslib  - GTW: modem1: SEND :AT+CMGF=0(cr)
14157 [Thread-3] DEBUG org.smslib  - GTW: modem1: BUFFER: OK

14157 [Thread-3] DEBUG org.smslib  - GTW: modem1: RECV :OK(cr)
14157 [Thread-3] DEBUG org.smslib  - GTW: modem1: SyncMessageProcessor
thread started.
14157 [Thread-3] INFO org.smslib  - GTW: modem1: Gateway started.
14157 [SMSLib-QueueManager] INFO org.smslib  - GTW: modem1: Starting
Queue Manager.
14625 [SMSServer - InboundPollingThread] DEBUG org.smslib  -
InboundPollingThread() run.
14625 [SMSServer - InboundPollingThread] DEBUG org.smslib  - GTW:
modem1: SEND :AT+CPMS="SM"(cr)
14625 [SMSServer - OutboundPollingThread] DEBUG org.smslib  -
OutboundPollingThread() run.
14641 [SMSServer - InboundPollingThread] DEBUG org.smslib  - GTW:
modem1: BUFFER: +CPMS: 0,30,0,30,0,30
OK

14641 [SMSServer - InboundPollingThread] DEBUG org.smslib  - GTW:
modem1: RECV :+CPMS: 0,30,0,30,0,30(cr)OK(cr)
14641 [SMSServer - InboundPollingThread] DEBUG org.smslib  - GTW:
modem1: SEND :AT+CMGL=4(cr)
14844 [SMSServer - InboundPollingThread] DEBUG org.smslib  - GTW:
modem1: BUFFER: +CMS ERROR: 321

14844 [SMSServer - InboundPollingThread] DEBUG org.smslib  - GTW:
modem1: RECV :+CMS ERROR: 321(cr)
14844 [SMSServer - InboundPollingThread] DEBUG org.smslib  - Error in
InboundPollingThread()
java.lang.StringIndexOutOfBoundsException: String index out of range:
-12
        at java.lang.String.substring(Unknown Source)
        at org.smslib.modem.ModemGateway.readMessagesPDU(ModemGateway.java:
400)
        at org.smslib.modem.ModemGateway.readMessages(ModemGateway.java:147)
        at org.smslib.Service.readMessages(Service.java:435)
        at org.smslib.Service.readMessages(Service.java:339)
        at org.smslib.smsserver.SMSServer.readMessages(SMSServer.java:345)
        at org.smslib.smsserver.SMSServer$InboundPollingThread.run
(SMSServer.java:250)
14860 [SMSServer - OutboundPollingThread] INFO org.smslib  -
SMSServer: sending asynchronously...
15625 [SMSLib-WatchDog] INFO org.smslib  - WatchDog running...
24875 [SMSServer - OutboundPollingThread] DEBUG org.smslib  -
OutboundPollingThread() run.
25094 [SMSServer - OutboundPollingThread] INFO org.smslib  -
SMSServer: sending asynchronously...
30625 [SMSLib-WatchDog] INFO org.smslib  - WatchDog running...
35094 [SMSServer - OutboundPollingThread] DEBUG org.smslib  -
OutboundPollingThread() run.
35328 [SMSServer - OutboundPollingThread] INFO org.smslib  -
SMSServer: sending asynchronously...
45328 [SMSServer - OutboundPollingThread] DEBUG org.smslib  -
OutboundPollingThread() run.
45547 [SMSServer - OutboundPollingThread] INFO org.smslib  -
SMSServer: sending asynchronously...
45625 [SMSLib-WatchDog] INFO org.smslib  - WatchDog running...
54110 [Thread-0] INFO org.smslib  - SMSServer shutting down, please
wait...
54344 [Thread-0] INFO org.smslib  - SMSServer: interface:
org.smslib.smsserver.interfaces.Database stopped.
54344 [SMSLib-WatchDog] DEBUG org.smslib  - WatchDog stopped.
54344 [Thread-0] INFO org.smslib  - GTW: modem1: Stopping gateway...
54344 [SMSLib-QueueManager] INFO org.smslib  - GTW: modem1:
QueueManager stopped.
54344 [Thread-0] DEBUG org.smslib  - GTW: modem1: Trying to shutdown
keepAlive thread...
54344 [Thread-0] DEBUG org.smslib  - GTW: modem1: Trying to shutdown
asyncNotifier thread...
54344 [Thread-0] DEBUG org.smslib  - GTW: modem1: Trying to shutdown
asyncMessageProcessor thread...
54344 [Thread-0] DEBUG org.smslib  - GTW: modem1: Trying to shutdown
modemReader thread...
54344 [Thread-0] DEBUG org.smslib  - GTW: modem1: Trying to shutdown
syncMessageProcessor thread...
54344 [SMSlib-KeepAlive : modem1] DEBUG org.smslib  - GTW: modem1:
ModemDriver: KeepAlive thread ended.
54344 [SMSLib-AsyncNotifier : modem1] DEBUG org.smslib  - GTW: modem1:
AsyncNotifier thread ended.
54344 [SMSLib-AsyncMessageProcessor : modem1] DEBUG org.smslib  - GTW:
modem1: AsyncMessageProcessor thread ended.
54344 [SMSLib-CNMIEmulator : modem1] DEBUG org.smslib  - GTW: modem1:
SyncMessageProcessor thread ended.
54344 [SMSlib-ModemReader-modem1] DEBUG org.smslib  - GTW: modem1:
ModemReader thread ended.
54422 [Thread-0] INFO org.smslib  - GTW: modem1: Closing: COM4 @115200
54422 [Thread-0] INFO org.smslib  - GTW: modem1: Gateway stopped.
54422 [SMSServer - OutboundPollingThread] DEBUG org.smslib  -
OutboundPollingThread() interrupted.
Terminate batch job (Y/N)?



On Jan 25, 4:06 pm, Thanasis <[email protected]> wrote:
> Hi,
>
> SMSLib 3.3.2 is way back - although I don't think that are changes that
> would affect this.
>
> I see errors even on the READ commands:
>
> DEBUG org.smslib.helper.Logger  - GTW: modem1: SEND :AT+CMGL=4(cr)
> 34844  2010-01-23 18:13:20,406 [SMSServer - InboundPollingThread]
> DEBUG org.smslib.helper.Logger  - GTW: modem1: BUFFER: +CMS ERROR: 321
>
> 34844  2010-01-23 18:13:20,406 [SMSServer - InboundPollingThread]
>
> 2010/1/23 nchin <[email protected]>
>
> > Thanasis,
>
> > Thank you very much for your response.
>
> > My modem is iTegno W3800, it works like a champ with the old version
> > 332.
>
> > Here is the conf setting: -
>
> > # Set a different balancer than the default.
> > smsserver.balancer=RoundRobinLoadBalancer
>
> > # Lets add a modem
> > gateway.0=modem1, SerialModem
>
> > # -- itegno
> > modem1.port=COM4
> > modem1.baudrate=115200
> > modem1.manufacturer=ITengo
> > modem1.model=3000
>
> > # -- Huawei E169
> > #modem1.port=COM16
> > #modem1.baudrate=460800
> > #modem1.manufacturer=Huawei
> > #modem1.model=E230
>
> > # -- Huawei E1752
> > #modem1.port=COM23
> > #modem1.baudrate=460800
> > #modem1.manufacturer=Huawei
> > #modem1.model=E230
>
> > # -- prolink
> > #modem1.port=COM33
> > #modem1.baudrate=115200
>
> > #modem1.port=COM1
> > #modem1.baudrate=57600
> > #modem1.manufacturer=Nokia
> > #modem1.model=6310i
>
> > modem1.protocol=PDU
> > modem1.pin=0000
> > modem1.inbound=yes
> > modem1.outbound=yes
> > #modem1.smsc_number=98540020
> > modem1.smsc_number=
> > modem1.init_string=ATZ\rATZ\rATZ\r
>
> > # Here is an example of a MySQL database interface.
> > interface.0=db1, Database
> > db1.type=mysql
> > #db1.url=jdbc:mysql://localhost:3306/smslib?autoReconnect=true
> > db1.url=jdbc:mysql://localhost:3306/smsmr
> > db1.driver=com.mysql.jdbc.Driver
> > db1.username=smsmr
> > db1.password=abc123
> > db1.tables.sms_in=sms_in
> > db1.tables.sms_out=sms_out
> > db1.tables.calls=sms_calls
> > db1.batch_size=50
> > db1.retries=2
> > db1.update_outbound_on_statusreport=no
>
> > #Interval for processing inbound messages (in seconds)
> > settings.inbound_interval=15
> > #Interval for processing outbound queues (in seconds)
> > settings.outbound_interval=10
>
> > #After reading, should SMSServer delete the processed messages from
> > the gateways?
> > #Default is "no" for safety. Set to "yes" if you wish to delete
> > messages.
> > #If you leave it to "no", SMSServer will process the same messages
> > over and over again!
> > settings.delete_after_processing=yes
>
> > # Should SMSServer work in sync or async sending mode?
> > # Async mode forwards messages to gateway queues.
> > # Values can be "sync" and "async".
> > settings.send_mode = async
>
> > # Allowed dispatch time-fames per priority
> > settings.timeframe.low=0900-2200
> > settings.timeframe.normal=0000-2359
> > settings.timeframe.high=0000-2359
>
> > On Jan 23, 6:53 pm, Thanasis <[email protected]> wrote:
> > > Hi,
>
> > > I see too many errors. Your phone is probably incompatible - what
> > > model is this?
> > > Do you have another phone to test with?
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "SMSLib for Java User Group" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<smslib%[email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/smslib?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"SMSLib for Java User Group" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/smslib?hl=en.

Reply via email to