Hello, members
really got the same error when trying to use the modem DWM-156 to read and
send sms occasionally having to release / stop the service! However in my
case the error PortInUse for Windows Application (modem driver) and even
closing the application of the modem on the same Windows error is returned.
I have found the first reading but succeeds then the application takes
control of the modem and no longer causes my program to access it. The
analysis of my program provides the modem is free to receive SMS (user
interaction) and there is a group structure which send sms modem to be read
from the sender. Summarizing the DWM-152 modem works fine even on Linux
since that update the Firmware of the device and not encounter the same
problem DWM-156 to the stop / start the service again. thanks (google
translation)
Em terça-feira, 10 de abril de 2012 19h41min19s UTC-3, noob escreveu:
>
> 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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
To view this discussion on the web visit
https://groups.google.com/d/msg/smslib/-/SDogyvaAM0EJ.
For more options, visit https://groups.google.com/groups/opt_out.