Anf if i chande th protocol to TEXT (gateway.setProtocol(Protocols.TEXT);)
then i face this error:

Example: Read messages 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.4.5
log4j:WARN No appenders could be found for logger (smslib).
log4j:WARN Please initialize the log4j system properly.
>>> Gateway Status change for modem.com3, OLD: STOPPED -> NEW: STARTING
>>> Gateway Status change for modem.com3, OLD: STARTING -> NEW: STARTED
Service Started

Modem Information:
  Manufacturer: Teltonika
  Model: TM3 EDGE
  Serial No: 352387020018557
  SIM IMSI: ** MASKED **
  Signal Level: 100%
  Battery Level: 0%

==========Waiting For Message==========
java.lang.StringIndexOutOfBoundsException: String index out of range: -12
at java.lang.String.substring(String.java:1937)
at org.smslib.modem.ModemGateway.readMessagesTEXT(ModemGateway.java:367)
at org.smslib.modem.ModemGateway.readMessages(ModemGateway.java:208)
at org.smslib.Service.readMessages(Service.java:481)
at org.smslib.Service.readMessages(Service.java:369)
at examples.modem.ReadMessages.doIt(ReadMessages.java:124)
at examples.modem.ReadMessages.main(ReadMessages.java:186)
>>> Gateway Status change for modem.com3, OLD: STARTED -> NEW: STOPPING
>>> Gateway Status change for modem.com3, OLD: STOPPING -> NEW: STOPPED
Error 121 SetCommConfig
Error 121 SetCommConfig
Error 121 SetCommConfig

-- 
You received this message because you are subscribed to the Google Groups 
"SMSLib 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