Hi,

I have switched to Linux and tested using both RxTx and JavaComm.
Still experiencing same behaviours, although in Linux in throws a
different error. But in Linux, I am able to dig dipper by using
'dmesg'. And noticed that it was switching ports for some reasonm.
This problem has been described in this post (http://groups.google.com/
group/smslib/browse_thread/thread/4a866bfd6977785a/
0b7a71b685f17d7f#0b7a71b685f17d7f) before. But there was no solution
posted. Anyone knows how he resolved the problem?

Thanks a lot,
Ivy

On Sep 10, 5:01 am, Thanasis <[email protected]> wrote:
> You *could* use the RxTx pack together with the "-
> Dsmslib.serial.polling" directive. This is certainly not the most
> efficient way to deal with that (may not play at all), but it may
> prove that the JavaComm error you are seeing is indeed attributed to
> some erroneous usb/com behaviour.
>
> On Sep 9, 11:48 pm, Ivy Wang <[email protected]> wrote:
>
> > Hi Thanasis,
>
> > Thanks for the fast reply. I have tried 115200. No luck.
>
> > My COM4 is an usb port unfortunately, so no RxTx for me.
>
> > I have just downloaded the source code for smslib-v.3.4.2 and tried
> > stepping through it.
>
> > Yes. the "Error 31" happens during gateway initialization, when it
> > tries to connect to the serial port I think...
>
> > At this line: (line 647 of SerialPort.Java)
>
> > "Method method = classSerialPort.getMethod("setSerialPortParams",
> > paramTypes);
> > method.invoke(this.realObject, baudrate, dataBits, stopBits, parity);"
>
> > It throws an exception.
>
> > "this.realObject" seems to have a baud rate of 9600, while "baudrate"
> > has the value I fed in upon gateway initialization. I suspect this
> > inconsistency is causing it to crash?? I will try to set the baudrate
> > to 9600 and lower.
>
> > Any input is appreciated...
>
> > Thanks!!
>
> > On Sep 9, 12:27 pm, Thanasis <[email protected]> wrote:
>
> > > Hi,
>
> > > Have you tried 115200? Is it more stable or not?
>
> > > I assume that when you get this "Error 31", its during the gateway
> > > initialization, right?
> > > If your COM4 is a *real* comm port (not a usb), you could also try
> > > once with RxTx and see if that's more stable.
>
> > > On Sep 9, 10:03 pm, Ivy Wang <[email protected]> wrote:
>
> > > > Hi Thanasis,
>
> > > > Thanks for the reply.
>
> > > > Please excuse my lack of hardware background. What are considered
> > > > "standard"? I took 230400 only because it's the biggest number in the
> > > > drop down list of my modem properties window. I did some more search
> > > > in the manual just now, trying to find the standard rates. I found it
> > > > saying " Baud rate: 1.2 bps ... 460 kbps ". So does this mean it
> > > > supports 12 - 460000?? Very confused. What should I use??
>
> > > > I then did some more search on the net and found this website (http://
> > > > digital.ni.com/public.nsf/allkb/D37754FFA24F7C3F86256706005B9BE7)
> > > > Tried a few more baud rate in the first set, e.g. 115200, 14400, 300.
>
> > > > On Sep 9, 1:05 am, Thanasis <[email protected]> wrote:
>
> > > > > Hi,
>
> > > > > A quick observation is that the baud rate you are using is non-
> > > > > standard. Switch to the closest standard rate and check if this solves
> > > > > your issues.
>
> > > > > On Sep 9, 3:18 am, Ivy Wang <[email protected]> wrote:
>
> > > > > > Hi there,
>
> > > > > > I've been using the SMSLib for my development. Recently I've been
> > > > > > getting this error inconsistently. Sometimes I can send messages 
> > > > > > with
> > > > > > no problem and sometimes I get this error.
>
> > > > > > 16:47:43,307 INFO  [Thread-27                     ] smslib
> > > > > >               - GTW: default.samba75.modem: Opening: COM4 @230400
> > > > > > Error 31 SetCommConfig
> > > > > > Error 31 SetCommConfig
> > > > > > org.smslib.GatewayException: Comm library exception:
> > > > > > java.lang.RuntimeException:
> > > > > >  javax.comm.UnsupportedCommOperationException: Win32 Comm Driver:
> > > > > > Error 31
> > > > > >         at org.smslib.modem.SerialModemDriver.connectPort
> > > > > > (SerialModemDriver.java
> > > > > > :97)
> > > > > >         at org.smslib.modem.AModemDriver.connect(AModemDriver.java:
> > > > > > 110)
> > > > > >         at org.smslib.modem.ModemGateway.startGateway
> > > > > > (ModemGateway.java:158)
> > > > > >         at org.smslib.Service$1Starter.run(Service.java:252)
>
> > > > > > I looked it up on the net and seemed like a driver problem. Does
> > > > > > anybody know how to fix it please??  Thanks in advanced!
>
> > > > > > =============================================================
> > > > > > I'm developing on an OSGi platform. This post 
> > > > > > (http://code.google.com/
> > > > > > p/smslib/issues/detail?id=138) has been extremely helpful for me. I
> > > > > > just want to thank those who've contributed.
>
> > > > > > And here's a list of what I've used:
> > > > > > SMSLib- v.3.4.2. (downloaded 
> > > > > > fromhttp://smslib.org/download/osgi/smslib-3.4.2.jar,
> > > > > > which doesn't seem to be there anymore...)
> > > > > > JavaComm - v 2.0.1 
> > > > > > (fromhttp://www.knopflerfish.org/releases/current/docs/jars/comm-win32/com...)
>
> > > > > > OS: Windows Vista
> > > > > > OSGi Framework: Apache Felix - v.1.8.0
> > > > > > ==============================================================
>
> > > > > > Cheers,
> > > > > > Ivy
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to