Hi Thanasis, Removed the mentioned line but same error. Kindly help to figure out the problem.
Regards, Sudhir On Tue, Nov 24, 2009 at 3:29 AM, Thanasis <[email protected]> wrote: > Hi, > > Why are you working with the TEXT protocol??? > If you don't have any good reason, remove the line: > > gateway.setProtocol(Protocols.TEXT); > > and give it one more try. > > On Nov 23, 3:27 am, suren <[email protected]> wrote: > > Hi, > > > > Im trying out SendMessage.java in smslib but reporting output "Gateway > > modem1.port does not respond". > > > > Modem im using is iTegno, 3800, USB mapped as COM3 > > > > Port settings: > > baud_rate: 115200 > > data_bits: 8 > > parity: none > > stop bits: 1 > > flow control: Hardware > > > > Im able to send SMS from hyperterminal with the above settings. > > Kindly help me to resolve this problem. Also mentioned the code im > > trying out. > > > > Complete output as follows............... > > > > Example: Send message 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.4 > > SLF4J: Found binding in [jar:file:/D:/Documents%20and%20Settings/ > > Administrator/Desktop/sms/smslib-v3.4.4/dist/lib/slf4j-jcl-1.5.8.jar!/ > > org/slf4j/impl/StaticLoggerBinder.class] > > SLF4J: Seehttp://www.slf4j.org/codes.html#multiple_bindingsfor an > > explanation. > > Nov 23, 2009 9:11:14 AM org.smslib.helper.Logger logInfo > > INFO: 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 > > Nov 23, 2009 9:11:14 AM org.smslib.helper.Logger logInfo > > INFO: Version: 3.4.4 > > Nov 23, 2009 9:11:14 AM org.smslib.helper.Logger logInfo > > INFO: JRE Version: 1.6.0_04 > > Nov 23, 2009 9:11:14 AM org.smslib.helper.Logger logInfo > > INFO: JRE Impl Version: 10.0-b19 > > Nov 23, 2009 9:11:14 AM org.smslib.helper.Logger logInfo > > INFO: O/S: Windows XP / x86 / 5.1 > > Nov 23, 2009 9:11:14 AM org.smslib.helper.Logger logInfo > > INFO: GTW: modem1.port: Starting gateway, using Generic AT Handler. > > Nov 23, 2009 9:11:14 AM org.smslib.helper.Logger logInfo > > INFO: GTW: modem1.port: Opening: COM3 @115200 > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-7 > > Java lib Version = RXTX-2.1-7 > > Nov 23, 2009 9:11:21 AM org.smslib.helper.Logger logWarn > > WARNING: GTW: modem1.port: GSM: Not registered, searching for > > network... > > Nov 23, 2009 9:11:26 AM org.smslib.helper.Logger logInfo > > INFO: GTW: modem1.port: GSM: Registered to home network. > > Nov 23, 2009 9:11:26 AM org.smslib.helper.Logger logInfo > > INFO: GTW: modem1.port: MEM: Storage Locations Found: SM > > Nov 23, 2009 9:11:26 AM org.smslib.helper.Logger logInfo > > INFO: CNMI: No best match, returning: 1 > > Nov 23, 2009 9:11:26 AM org.smslib.helper.Logger logInfo > > INFO: GTW: modem1.port: Gateway started. > > > > Modem Information: > > Manufacturer: iWOW > > Model: TR-800 > > Serial No: 355780003072392 > > SIM IMSI: ** MASKED ** > > Signal Level: 83% > > Battery Level: 0% > > Attributes: 251% > > > > Nov 23, 2009 9:12:12 AM org.smslib.helper.Logger logWarn > > WARNING: sendMessage(): Gateway modem1.port does not respond, marking > > for restart. > > Failed: FAILED > > Nov 23, 2009 9:12:12 AM org.smslib.helper.Logger logInfo > > INFO: GTW: modem1.port: Stopping gateway... > > Nov 23, 2009 9:12:12 AM org.smslib.helper.Logger logInfo > > INFO: GTW: modem1.port: Closing: COM3 @115200 > > Nov 23, 2009 9:12:12 AM org.smslib.helper.Logger logInfo > > INFO: GTW: modem1.port: Gateway stopped. > > > > Code in SendMessage.java > > --------------------------------------- > > Service srv; > > OutboundMessage msg; > > OutboundNotification outboundNotification = new > OutboundNotification > > (); > > System.out.println("Example: Send message from a serial > gsm > > modem."); > > System.out.println(Library.getLibraryDescription()); > > System.out.println("Version: " + > Library.getLibraryVersion()); > > srv = new Service(); > > SerialModemGateway gateway = new > SerialModemGateway("modem1.port", > > "COM3", 115200, "iTegno", "W3800U"); > > gateway.setSmscNumber("+60162999902"); > > gateway.setInbound(true); > > gateway.setOutbound(true); > > gateway.setSimPin("000"); > > gateway.setProtocol(Protocols.TEXT); > > srv.setOutboundMessageNotification(outboundNotification); > > srv.addGateway(gateway); > > srv.startService(); > > System.out.println(); > > System.out.println("Modem Information:"); > > System.out.println(" Manufacturer: " + > gateway.getManufacturer()); > > System.out.println(" Model: " + gateway.getModel()); > > System.out.println(" Serial No: " + > gateway.getSerialNo()); > > System.out.println(" SIM IMSI: " + gateway.getImsi()); > > System.out.println(" Signal Level: " + > gateway.getSignalLevel() + > > "%"); > > System.out.println(" Battery Level: " + > gateway.getBatteryLevel() + > > "%"); > > System.out.println(" Attributes: " + > gateway.getAttributes() + > > "%"); > > System.out.println(); > > // Send a message synchronously. > > msg = new OutboundMessage("+60162725685", "Test SMS from > > SendMessage.java"); > > if(srv.sendMessage(msg)) > > { > > System.out.println("SENT to " + > msg.getRecipient() + ":" + > > msg.getText() + "\nMsgId=" + msg.getMessageId()); > > } > > else > > { > > System.out.println("Failed: " + > msg.getMessageStatus().toString()); > > } > > srv.stopService(); > > > > Regards, > > -- > > You received this message because you are subscribed to the Google Groups > "SMSLib for Java User Group" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<smslib%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/smslib?hl=. > > > -- You received this message because you are subscribed to the Google Groups "SMSLib for Java 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.
