The error situation can be summarized:
I can send and receive a few SMS (0 to about 4) and then the watchdog cycles
and only sometimes SMS are send/received.
Same problem with these variants:
1) Using now
[java] Native lib Version = RXTX-2.1-7
[java] Java lib Version = RXTX-2.1-7
2) Using |-Dsmslib.serial.polling
(I've verified in debugger that it is activated)
3) What does this mean, could it be the reason?
smslib:49 - CNMI: No best match, returning: 1
4) Often I get a boolean return of false for srv.sendMessage(msg):
failure=NO_ROUTE status=FAILED
|
Questions:
1) Should I buy another GMS modem instead of BenQ M22A?
Which can you recommend?
3) Which name should I choose instead of "BenQ", "M22A",
I have tries that (with same results)
new SerialModemGateway("modem.com1", "/dev/ttyUSB0", 9600, null, null);
2) The /dev/ttyUSB0 is automatically added when I plugin the modem,
what do you mean with
'You may need to map your USB0 device to something more "serial-like"'
|This is the error situation:
...
[java] 15:36:06,432 DEBUG smslib:61 - Running task: PortReader()
[/dev/ttyUSB0]
[java] 15:36:06,633 DEBUG smslib:61 - Running task: PortReader()
[/dev/ttyUSB0]
[java] 15:36:06,801 DEBUG smslib:61 - GTW: modem.com1: Buffer
contents on timeout:
[java] 15:36:06,803 INFO Smslib:? - >>> Gateway Status change for
modem.com1, OLD: STARTED -> NEW: RESTART
[java] 15:36:06,806 DEBUG smslib:61 - GTW: modem.com1: ** KeepAlive
END **
[java] 15:36:06,834 DEBUG smslib:61 - Running task: PortReader()
[/dev/ttyUSB0]
...
|
This another case:
13:20:44,513 WARN WatcheeClient:97 - 0/10 Can't send SMS,
failure=NO_ROUTE status=FAILED
180147 [pool-1-thread-5] WARN smslib - WatchDog: Gateway: modem.com1
restarting.
13:20:51,950 INFO Smslib:186 - >>> Gateway Status change for
modem.com1, OLD: RESTART -> NEW: STOPPING
13:20:51,951 INFO Smslib:186 - >>> Gateway Status change for
modem.com1, OLD: STOPPING -> NEW: STOPPED
13:20:51,956 INFO Smslib:186 - >>> Gateway Status change for
modem.com1, OLD: STOPPED -> NEW: RESTART
180151 [pool-1-thread-5] INFO smslib - GTW: modem.com1: Stopping gateway...
180157 [pool-1-thread-5] INFO smslib - GTW: modem.com1: Closing:
/dev/ttyUSB0 @9600
180157 [pool-1-thread-5] INFO smslib - GTW: modem.com1: Gateway stopped.
180158 [pool-1-thread-5] INFO smslib - GTW: modem.com1: Starting
gateway, using Generic AT Handler.
180158 [pool-1-thread-5] INFO smslib - GTW: modem.com1: Using polled
serial port mode.
180158 [pool-1-thread-5] INFO smslib - GTW: modem.com1: Opening:
/dev/ttyUSB0 @9600
[java] 15:11:16,712 INFO Smslib:? - Message isDeleted=true
[java] 15:12:12,963 INFO Smslib:? - >>> Gateway Status change for
modem.com1, OLD: STARTED -> NEW: RESTART
And another:
[java] 15:12:26,923 WARN smslib:55 - WatchDog: Gateway: modem.com1
restarting.
[java] 15:12:26,925 INFO smslib:49 - GTW: modem.com1: Stopping
gateway...
[java] 15:12:26,926 INFO Smslib:? - >>> Gateway Status change for
modem.com1, OLD: RESTART -> NEW: STOPPING
[java] 15:12:26,927 INFO Smslib:? - >>> Gateway Status change for
modem.com1, OLD: STOPPING -> NEW: STOPPED
[java] 15:12:27,203 INFO smslib:49 - GTW: modem.com1: Closing:
/dev/ttyUSB0 @9600
[java] 15:12:27,205 INFO smslib:49 - GTW: modem.com1: Gateway stopped.
[java] 15:12:27,207 INFO Smslib:? - >>> Gateway Status change for
modem.com1, OLD: STOPPED -> NEW: RESTART
[java] 15:12:27,209 INFO smslib:49 - GTW: modem.com1: Starting
gateway, using Generic AT Handler.
[java] 15:12:27,211 INFO smslib:49 - GTW: modem.com1: Using polled
serial port mode.
[java] 15:12:27,212 INFO smslib:49 - GTW: modem.com1: Opening:
/dev/ttyUSB0 @9600
Thanasis schrieb:
> Please try once more with RxTx (remove javaComm v3).
Done
> Also map your USB device to another name (see your other thread).
Hmm, how could I do this?
It works fine with the C smstools3, so I think it is not related to the
/dev/ttyUSB0
>
>
> On Apr 6, 4:16 am, Marcel Ruff <[email protected]> wrote:
>> 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
> >
>
--
Marcel Ruff
http://www.xmlBlaster.org
http://watchee.net
Phone: +49 7551 309371
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---