Hello,
Is ZTE MF110 usb modem supported? I cannot send sms, following exception thrown: 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.5.1 > JRE Version: 1.6.0_24 > JRE Impl Version: 19.1-b02 > O/S: Windows XP / x86 / 5.1 > Queue directory not defined. Queued messages will not be saved to > filesystem. > GTW: modem.com1: Starting gateway, using Generic AT Handler. > GTW: modem.com1: Opening: COM16 @9600 > GTW: modem.com1: GSM: Auto-registration disabled! > GTW: modem.com1: Closing: COM16 @9600 > GTW: modem.com1: Stopping gateway... > GTW: modem.com1: Closing: COM16 @9600 > GTW: modem.com1: Gateway stopped. > org.smslib.GatewayException: GSM Network Auto-Registration disabled! > at > org.smslib.modem.AModemDriver.waitForNetworkRegistration(AModemDriver.java:444) > at org.smslib.modem.AModemDriver.connect(AModemDriver.java:168) > at org.smslib.modem.ModemGateway.startGateway(ModemGateway.java:189) > at org.smslib.Service$1Starter.run(Service.java:276) > Here's the slightly modified SendMessage examle code which I'm using: > import org.smslib.AGateway; > import org.smslib.IOutboundMessageNotification; > import org.smslib.Library; > import org.smslib.OutboundMessage; > import org.smslib.Service; > import org.smslib.modem.SerialModemGateway; > > public class SendMessage { > > public void doIt() throws Exception { > 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()); > SerialModemGateway gateway = new SerialModemGateway("modem.com1", > "COM16", 9600, "ZTE", "MF110"); > gateway.setInbound(true); > gateway.setOutbound(true); > //gateway.setSimPin("0000"); // the sim don't have pin > // Explicit SMSC address set is required for some modems. > gateway.setSmscNumber("+97699000030"); // mongolian mobicom's sms > center > > Service.getInstance().setOutboundMessageNotification(outboundNotification); > Service.getInstance().addGateway(gateway); > Service.getInstance().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() + > " dBm"); > System.out.println(" Battery Level: " + gateway.getBatteryLevel() > + "%"); > System.out.println(); > // Send a message synchronously. > OutboundMessage msg = new OutboundMessage("+97699001113", "Hello > from SMSLib!"); > Service.getInstance().sendMessage(msg); > System.out.println(msg); > System.out.println("Now Sleeping - Hit <enter> to terminate."); > System.in.read(); > Service.getInstance().stopService(); > } > > public class OutboundNotification implements > IOutboundMessageNotification { > > public void process(AGateway gateway, OutboundMessage msg) { > System.out.println("Outbound handler called from Gateway: " + > gateway.getGatewayId()); > System.out.println(msg); > } > } > > public static void main(String args[]) { > SendMessage app = new SendMessage(); > try { > app.doIt(); > } catch (Exception e) { > e.printStackTrace(); > } > } > } > -- You received this message because you are subscribed to the Google Groups "SMSLib Discussion Group" group. To view this discussion on the web visit https://groups.google.com/d/msg/smslib/-/bEP8-RNl0SAJ. 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.
