I have a GUI that stops the service of reading sms, I use this code and 
then I get this result
 >>> Gateway Status change for modem.com1, OLD: STARTED -> NEW: STOPPING
>>> Gateway Status change for modem.com1, OLD: STOPPING -> NEW: STOPPED, 


code:
        try {
            //System.exit(0);
            
            
            Service.getInstance().stopService();
            //gateway.stopGateway();      
            //worker.cancel(false);
        } catch (SMSLibException ex) {
            Logger.getLogger(GUI.class.getName()).log(Level.SEVERE, null, 
ex);
        }  catch (IOException ex) {
            Logger.getLogger(GUI.class.getName()).log(Level.SEVERE, null, 
ex);
        } catch (InterruptedException ex) {
            Logger.getLogger(GUI.class.getName()).log(Level.SEVERE, null, 
ex);
        }
        

how can I release the port If I want to read the messages again, I always 
get this message, and I use service.stop, please help 

GatewayException: Comm library exception: java.lang.RuntimeException: 
javax.comm.PortInUseException: Port currently owned by org.smslib
    at 
org.smslib.modem.SerialModemDriver.connectPort(SerialModemDriver.java:102)
    at org.smslib.modem.AModemDriver.connect(AModemDriver.java:114)
    at org.smslib.modem.ModemGateway.startGateway(ModemGateway.java:189)
    at org.smslib.Service$1Starter.run(Service.java:276)

-- 
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/-/2lZ6xOHO0SwJ.
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.

  • [smslib] ... noob
    • [sms... T.Delenikas
      • ... noob
        • ... SMSLib Discussion Group on behalf of asish
          • ... SMSLib Discussion Group on behalf of T.Delenikas
            • ... smslib+noreply-APn2wQfRyr9VQybWi7i57ganhsPt66DcSQ0Oxh6ZAweN4JcJI
    • [sms... smslib+noreply-APn2wQddzTTkHD3eQ-ihRPQfW_nr7FkMkd9kPa0Eo5HxMLn5l
      • ... SMSLib Discussion Group on behalf of nick

Reply via email to