Yes, the modem is connecting / disconnecting, but that is a low level problem, not related to smslib.
I think you must try another usb port to see if that is a hardware problem with the port. Check with another cell phone to see if you get the same problem. Last thing maybe you have some kind of module conflicts in linux, check with lsmod, or you go to sleep mode and that disable the port. My bet is you have some hardware problem because using windows you have problems too. HTH Pietro On Sep 11, 6:34 pm, Ivy Wang <[email protected]> wrote: > Here are more details to the problem as described in this post. > (http://groups.google.com/ > group/smslib/browse_thread/thread/4a866bfd6977785a/ > 0b7a71b685f17d7f#0b7a71b685f17d7f) - port switches. > > And, even if I tell the program to get connect to the port (/dev/ > ttyACM2) that it thinks the modem is connected to now, there are > problems. > > Although it then can connect to the port, it is not able to receive > messages from it. When a message is received, it throws the following > error: > > [smslib] : Running... > [smslib] : Running... > [smslib] : Running... > [smslib] : Running... > Exception in thread "Thread-3" java.io.IOException: Erro getting > StatusFlags in call to ioctl(TIOCMGET) > at com.sun.comm.LinuxSerial.nativeGetStatusFlags(Native Method) > at com.sun.comm.LinuxSerial.access$1500(LinuxSerial.java:14) > at com.sun.comm.LinuxSerial$SSCheckStatusThread.run(LinuxSerial.java: > 649) > [smslib] : Running... > [smslib] : Running... > [smslib] : ** disabled ** > [smslib] : Running... > > After a while, it will try to restart the modem, but will fail because > the port now has already switched. > > Here's log gotten from running 'dmesg' in Ubuntu: > > [24963.562051] cdc_acm 3-1:1.0: ttyACM0: USB ACM device > [25179.856149] hub 3-0:1.0: port 1 disabled by hub (EMI?), re- > enabling... > [25179.856162] usb 3-1: USB disconnect, address 21 > [25180.100087] usb 3-1: new full speed USB device using uhci_hcd and > address 22 > [25180.314122] usb 3-1: configuration #1 chosen from 1 choice > [25180.316676] cdc_acm 3-1:1.0: ttyACM1: USB ACM device > [25180.600132] hub 3-0:1.0: port 1 disabled by hub (EMI?), re- > enabling... > [25180.600138] usb 3-1: USB disconnect, address 22 > [25180.848772] usb 3-1: new full speed USB device using uhci_hcd and > address 23 > [25180.994944] usb 3-1: device descriptor read/all, error -71 > [25181.108127] usb 3-1: new full speed USB device using uhci_hcd and > address 24 > [25181.632640] usb 3-1: device not accepting address 24, error -71 > [25181.744576] usb 3-1: new full speed USB device using uhci_hcd and > address 25 > [25181.840169] usb 3-1: configuration #1 chosen from 1 choice > [25181.843932] usb 3-1: can't set config #1, error -71 > [25181.844100] hub 3-0:1.0: port 1 disabled by hub (EMI?), re- > enabling... > [25181.844110] usb 3-1: USB disconnect, address 25 > [25182.084140] usb 3-1: new full speed USB device using uhci_hcd and > address 26 > [25182.302134] usb 3-1: configuration #1 chosen from 1 choice > [25182.305058] cdc_acm 3-1:1.0: ttyACM2: USB ACM device > > On Sep 10, 3:35 pm, Ivy Wang <[email protected]> wrote: > > > 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 -~----------~----~----~----~------~----~------~--~---
