Hi, Can you enable the debug logging? I would like to see on which response does smslib crash.
On Mar 2, 4:36 pm, fiorenzino <[email protected]> wrote: > Hi, > > i tried with this code: > > Service srv; > OutboundMessage msg; > OutboundNotification outboundNotification = new > OutboundNotification(); > srv = new Service(); > SerialModemGateway gateway = new SerialModemGateway("digi1", > "/dev/ttyS0", 19200, "digicom", > "pocketGprsTm"); > gateway.setProtocol(Protocols.TEXT); > gateway.setInbound(true); > gateway.setOutbound(true); > srv.setOutboundMessageNotification(outboundNotification); > srv.addGateway(gateway); > srv.startService(); > msg = new OutboundMessage("****************", "Hello from > SMSLib!"); > srv.sendMessage(msg); > System.out.println(msg); > System.in.read(); > srv.stopService(); > > But the result is: > > 293438 [WatchDog] WARN smslib - Gateway: digi1 restarting. > 293438 [WatchDog] INFO smslib - GTW: digi1: Stopping gateway... > 293439 [WatchDog] INFO smslib - GTW: digi1: Closing: /dev/ttyS0 @19200 > 293439 [WatchDog] INFO smslib - GTW: digi1: Gateway stopped. > 293440 [WatchDog] INFO smslib - GTW: digi1: Starting gateway, using > Generic AT Handler. > 293440 [WatchDog] INFO smslib - GTW: digi1: Opening: /dev/ttyS0 @19200 > 318477 [WatchDog] ERROR smslib - Error while starting Gateway: digi1 > java.lang.StringIndexOutOfBoundsException: String index out of range: > -1 > at java.lang.StringBuffer.charAt(StringBuffer.java:162) > at org.smslib.modem.AModemDriver.getResponse(AModemDriver.java:334) > at org.smslib.modem.athandler.ATHandler.init(ATHandler.java:110) > at org.smslib.modem.AModemDriver.connect(AModemDriver.java:163) > at org.smslib.modem.ModemGateway.startGateway(ModemGateway.java:186) > at org.smslib.Service$WatchDog.process(Service.java:1499) > at org.smslib.threading.AServiceThread.run(AServiceThread.java:117) > > thank's in advance. > > Fiorenzo > > On 2 Mar, 07:50, Thanasis <[email protected]> wrote: > > > > > Hi, > > > Try to switch to the TEXT protocol (with > > <gatewayObject>.setProtocol()). Call this methodafter starting the > > service andbeforeattempting to send any messages. > > > On Mar 1, 11:44 pm, fiorenzino <[email protected]> wrote:> Hi, > > > > i resolved my problems without smslib, but i want use your libraries. > > > > Some tricks: > > > > 1) my modem don't support FlowControlMode settings, the error is > > > UnsupportedCommOperationException > > > 2) my parameters: > > > portName="/dev/ttyS0", > > > baudRate=19200, > > > databits=8, > > > stopbits=1, > > > parity=0 > > > 3) my AT sequence: > > > > cmd = "AT"; > > > cmd = "AT+CSQ"; > > > cmd = "AT+CSCA=\"" + csca + "\""; > > > cmd = "AT+CMGF=1"; > > > cmd = "AT+CMGS=\"" + recipient + "\""; > > > cmd = message; > > > cmd = cntrlZ; > > > > Is possibile use smslib, using this hackings? > > > > Fiorenzo > > > > On 27 Feb, 23:50, Thanasis <[email protected]> wrote: > > > > > Your problem is that your modem is not recognized - i.e. nothing > > > > responds @ttyS0. > > > > Have you tried with minicom? Send an "AT" command and see if anything > > > > comes back? > > > > > On Feb 26, 1:05 pm, fiorenzino <[email protected]> wrote: > > > > > > Hi, > > > > > > i want use smslib with my modem: DIGICOM POCKET GPRS TM > > > > > >http://www.digicom.it/digisit/prodotti.nsf/ITProdottiIDX/PocketGprsTm... > > > > > > This is my test execution log: > > > > > > Found port: /dev/ttyS0 > > > > > Trying at 9600... no device found > > > > > Trying at 14400... no device found (Baud rate not supported) > > > > > Trying at 19200... no device found (Not all params are > > > > > supported by kernel) > > > > > Trying at 28800... no device found (Baud rate not supported) > > > > > Trying at 33600... no device found (Baud rate not supported) > > > > > Trying at 38400... no device found (Not all params are > > > > > supported by kernel) > > > > > Trying at 56000... no device found (Baud rate not supported) > > > > > Trying at 57600... no device found (Not all params are > > > > > supported by kernel) > > > > > Trying at 115200... no device found (Not all params are > > > > > supported by kernel) > > > > > > Some help to customize ATHandler like ATHandler_Huawei_E160.java, > > > > > ATHandler_MultiTech.java > > > > > ATHandler_Siemens_HC25.java, ATHandler_SonyEricsson.java.... > > > > > > Thanks in advance > > > > > > Fiorenzo -- 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.
