Hi again,
I have extended SendMessage.java with a for loop.
After some seconds the sending of SMS fails, sometimes one or
two were successfully send, sometimes none.
Questions:
1) Is it the BenQ M22A GSM modem which is not supported?
2) Is it my Code which is wrong?
3) Is it not supported by smslib?
4) Do I need to use RxTx instead of Java comm?
Here the for loop in SendMessage.java
...
System.out.println(" Battery Level: " + gateway.getBatteryLevel() + "%");
for (int i=1; ; i++) {
System.out.println("Hit <q> to terminate, or send another");
int c = System.in.read();
if (c == 'q') break;
System.out.println("Sending now ...");
msg = new OutboundMessage(phoneNumber, "Hello from SMSLib #" + i + "!");
srv.sendMessage(msg);
System.out.println("Done: " + msg);
}
srv.stopService();
Here the errors:
Hit <q> to terminate, any other to send another
Sending now ...
Done:
===============================================================================
<< OutboundMessage >>
-------------------------------------------------------------------------------
Gateway Id: modem.com1
Encoding: 7-bit
Date: Mon Apr 06 02:59:44 CEST 2009
SMSC Ref No: 58
Recipient: +XXXXX
Dispatch Date: Mon Apr 06 02:59:48 CEST 2009
Message Status: SENT
Validity Period (Hours): -1
Status Report: false
Source / Destination Ports: -1 / -1
Flash SMS: false
Text: Hello from SMSLib #2!
PDU data: C8329BFD0699E5EF3668DA9C32D362D0481602
===============================================================================
Hit <q> to terminate, any other to send another
3
Sending now ...
58988 [main] WARN smslib - GTW: modem.com1: ATHandler().SendMessage():
Still waiting for response (I) (1)...
76989 [main] WARN smslib - GTW: modem.com1: ATHandler().SendMessage():
Still waiting for response (I) (2)...
org.smslib.GatewayException: Gateway is not responding, max number of
retries reached.
at org.smslib.modem.athandler.ATHandler.sendMessage(ATHandler.java:296)
at org.smslib.modem.ModemGateway.sendMessagePDU(ModemGateway.java:420)
at org.smslib.modem.ModemGateway.sendMessage(ModemGateway.java:205)
at org.smslib.Service.sendMessage(Service.java:538)
at examples.modem.SendMessage.doIt(SendMessage.java:54)
at examples.modem.SendMessage.main(SendMessage.java:74)
180219 [pool-1-thread-1] WARN smslib - WatchDog: Gateway: modem.com1
restarting.
180220 [pool-1-thread-1] INFO smslib - GTW: modem.com1: Stopping gateway...
180224 [pool-1-thread-1] INFO smslib - GTW: modem.com1: Closing:
/dev/ttyUSB0 @9600
180224 [pool-1-thread-1] INFO smslib - GTW: modem.com1: Gateway stopped.
180224 [pool-1-thread-1] INFO smslib - GTW: modem.com1: Starting
gateway, using Generic AT Handler.
180224 [pool-1-thread-1] INFO smslib - GTW: modem.com1: Opening:
/dev/ttyUSB0 @9600
192975 [pool-1-thread-1] INFO smslib - GTW: modem.com1: GSM: Registered
to home network.
193080 [pool-1-thread-1] INFO smslib - CNMI: No best match, returning: 1
193155 [pool-1-thread-1] INFO smslib - GTW: modem.com1: Gateway started.
300219 [pool-1-thread-3] WARN smslib - WatchDog: Gateway: modem.com1
restarting.
300219 [pool-1-thread-3] INFO smslib - GTW: modem.com1: Stopping gateway...
300224 [pool-1-thread-3] INFO smslib - GTW: modem.com1: Closing:
/dev/ttyUSB0 @9600
300225 [pool-1-thread-3] INFO smslib - GTW: modem.com1: Gateway stopped.
300225 [pool-1-thread-3] INFO smslib - GTW: modem.com1: Starting
gateway, using Generic AT Handler.
300225 [pool-1-thread-3] INFO smslib - GTW: modem.com1: Opening:
/dev/ttyUSB0 @9600
313259 [pool-1-thread-3] INFO smslib - GTW: modem.com1: GSM: Registered
to home network.
313364 [pool-1-thread-3] INFO smslib - CNMI: No best match, returning: 1
180219 [pool-1-thread-1] WARN smslib - WatchDog: Gateway: modem.com1
restarting.
180220 [pool-1-thread-1] INFO smslib - GTW: modem.com1: Stopping gateway...
180224 [pool-1-thread-1] INFO smslib - GTW: modem.com1: Closing:
/dev/ttyUSB0 @9600
180224 [pool-1-thread-1] INFO smslib - GTW: modem.com1: Gateway stopped.
180224 [pool-1-thread-1] INFO smslib - GTW: modem.com1: Starting
gateway, using Generic AT Handler.
180224 [pool-1-thread-1] INFO smslib - GTW: modem.com1: Opening:
/dev/ttyUSB0 @9600
192975 [pool-1-thread-1] INFO smslib - GTW: modem.com1: GSM: Registered
to home network.
193080 [pool-1-thread-1] INFO smslib - CNMI: No best match, returning: 1
193155 [pool-1-thread-1] INFO smslib - GTW: modem.com1: Gateway started.
Thank you
Marcel
Environment:
smslib-v3.4.0-src.zip javacomm commons-net-2.0 on
Linux 2.6.27.19 with a GSM USB Modem
Manufacturer: BenQ
Model: M22A
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---