Ok, good to know :) No, its NOT normal for a gateway to restart like this. Please look here: http://smslib.org/doc/smslib/common-questions/#Virtual_Serial_Ports_and_Linux You may need to map your USB0 device to something more "serial-like" and try with that one.
On Apr 6, 1:59 am, Marcel Ruff <[email protected]> wrote: > Thank you for your quick help! > > It was ReceiveMessage which failed but now it now works: > 1) Downloaded your ReadMessages > > http://smslib.googlecode.com/svn/smslib/branches/Queues/src/java/exam... > 2) Restarted my USB GSM modem > (I don't know what of above helped). > > Another short question: > Is it normal that the gateway is always stopping and starting > in an endless cycle?: > > 180100 [pool-1-thread-4] INFO smslib - GTW: modem.com1: Stopping gateway... > > >>> Gateway Status change for modem.com1, OLD: STOPPING -> NEW: STOPPED > >>> Gateway Status change for modem.com1, OLD: STOPPED -> NEW: RESTART > > 180105 [pool-1-thread-4] INFO smslib - GTW: modem.com1: Closing: /dev/ttyUSB0 > @9600 > 180105 [pool-1-thread-4] INFO smslib - GTW: modem.com1: Gateway stopped. > 180105 [pool-1-thread-4] INFO smslib - GTW: modem.com1: Starting gateway, > using Generic AT Handler. > 180105 [pool-1-thread-4] INFO smslib - GTW: modem.com1: Opening: /dev/ttyUSB0 > @9600 > 192711 [pool-1-thread-4] INFO smslib - GTW: modem.com1: GSM: Registered to > home network. > 192821 [pool-1-thread-4] INFO smslib - CNMI: No best match, returning: 1 > 192892 [pool-1-thread-4] INFO smslib - GTW: modem.com1: Gateway started.>>> > Gateway Status change for modem.com1, OLD: RESTART -> NEW: STARTING > >>> Gateway Status change for modem.com1, OLD: STARTING -> NEW: STARTED > >>> Gateway Status change for modem.com1, OLD: STARTED -> NEW: RESTART > >>> Gateway Status change for modem.com1, OLD: RESTART -> NEW: STOPPING300100 > >>> [pool-1-thread-5] WARN smslib - WatchDog: Gateway: modem.com1 restarting. > > 300100 [pool-1-thread-5] INFO smslib - GTW: modem.com1: Stopping gateway... > > ... > > Thanasis schrieb: > > > > > > > First of all, please download the updated SendMessage example from > > here: > >http://smslib.googlecode.com/svn/smslib/branches/Queues/src/java/exam... > > > Due to my mistake, a modified-for-testing SendMessage example has been > > committed which is not very stable. > > > Error 320 means "memory failure" (seehttp://smslib.org/doc/gsmerrors/). > > >From your remarks, I guess that this error fires when you receive a > > message. Can you please verify it by running the ReadMessages example > > as well? > > > On Apr 5, 7:05 pm, marcel <[email protected]> wrote: > > >> Hi, > > >> I'm using 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 > > >> Sending and receiving with smstools3 works fine. > > >> For SendMessage.java I'm using > >> gateway = new SerialModemGateway("modem.com1", "/dev/ttyUSB0", 9600, > >> "BenQ", "M22A"); > >> which sends the SMS as expected. > > >> For ReceiveMessage.java > >> gateway = new SerialModemGateway("modem.com1", "/dev/ttyUSB0", 9600, > >> "BenQ", "M22A"); > > >> When the SMS arrives I get: > >> Now Sleeping - Press <enter> to fill up queue manager. > >> Exception in thread "SMSLib-AsyncMessageProcessor : modem.com1" > >> java.lang.StringIndexOutOfBoundsException: String index out of range: > >> -12 > >> at java.lang.String.substring(String.java:1938) > >> at org.smslib.modem.ModemGateway.readMessagesPDU(ModemGateway.java: > >> 474) > >> at > >> org.smslib.modem.ModemGateway.readMessages(ModemGateway.java:179) > >> at org.smslib.modem.AModemDriver$AsyncMessageProcessor.run > >> (AModemDriver.java:869) > > >> I have dumped the line which fails: > >> 26244 [SMSLib-AsyncMessageProcessor : modem.com1] ERROR smslib - GTW: > >> modem.com1: ERROR line='+CMS ERROR: 320': > >> java.lang.StringIndexOutOfBoundsException: String index out of range: > >> -12 > > >> What can I do? > >> Thanks > >> Marcel > > -- > Marcel Ruffhttp://www.xmlBlaster.orghttp://watchee.net > Phone: +49 7551 309371- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
