Hi
Are you using RXTX or JavacommV3?
If you are using RXTX, try again with those parameters:
-Dsmslib.serial.polling -Dsmslib.serial.noflush
And do not forget to include in your code:
System.setProperty("gnu.io.rxtx.SerialPorts", "/dev/ttyUSB0" +
File.pathSeparator + "/dev/ttyUSB1");
Best regards.
Marcos.
On Sat, Oct 15, 2011 at 4:34 PM, Rommel de Torres <[email protected]>wrote:
> Hi all,
>
> I having a hard time to setup smslib with multiple modems, but if I
> inserted only 1 modem there is no problem. Can you help me. Thanks
>
> Modem: 2 Wavecom M1306B
> OS: Ubuntu natty i386
>
>
> =============================================================================================================================================
> Here's the error logs when I run smsserver.
> 2 2011-10-15 22:26:59,111 [main] INFO org.smslib.Service -
> Version: 3.5.1
> 3 2011-10-15 22:26:59,112 [main] INFO org.smslib.Service - JRE
> Version: 1.6.0_22
> 5 2011-10-15 22:26:59,114 [main] INFO org.smslib.Service - JRE
> Impl Version: 20.0-b11
> 5 2011-10-15 22:26:59,114 [main] INFO org.smslib.Service - O/S:
> Linux / i386 / 2.6.38-8-generic
> 8 2011-10-15 22:26:59,117 [main] DEBUG
> org.smslib.threading.AServiceThread - Initialized.
> 8 2011-10-15 22:26:59,117 [NotifyQueueManager] DEBUG
> org.smslib.threading.AServiceThread - Running...
> 8 2011-10-15 22:26:59,117 [NotifyQueueManager] DEBUG
> org.smslib.notify.NotifyQueueManager$NotificationQueueManager -
> NotifyQueueManager running...
> 25 2011-10-15 22:26:59,134 [main] INFO
> org.smslib.smsserver.SMSServer - SMSServer: added gateway modem1 /
> Default Serial Modem Gateway.
> 25 2011-10-15 22:26:59,134 [main] INFO
> org.smslib.smsserver.SMSServer - SMSServer: added gateway modem2 /
> Default Serial Modem Gateway.
> 29 2011-10-15 22:26:59,138 [main] INFO
> org.smslib.smsserver.SMSServer - SMSServer: added interface mysql /
> Default database interface. / INOUTBOUND
> 231 2011-10-15 22:26:59,340 [main] INFO
> org.smslib.smsserver.interfaces.Interface - SMSServer: interface:
> org.smslib.smsserver.interfaces.Database started.
> 233 2011-10-15 22:26:59,342 [main] INFO
> org.smslib.queues.DefaultQueueManager - Queue directory not defined.
> Queued messages will not be saved to filesystem.
> 233 2011-10-15 22:26:59,342 [main] DEBUG
> org.smslib.threading.AServiceThread - Initialized.
> 233 2011-10-15 22:26:59,342 [DelayQueueManager] DEBUG
> org.smslib.threading.AServiceThread - Running...
> 233 2011-10-15 22:26:59,342 [DelayQueueManager] DEBUG
> org.smslib.queues.AbstractQueueManager$DelayQueueManager -
> DelayQueueManager running...
> 234 2011-10-15 22:26:59,343 [main] DEBUG
> org.smslib.threading.AServiceThread - Initialized.
> 236 2011-10-15 22:26:59,345 [WatchDog] DEBUG
> org.smslib.threading.AServiceThread - Running...
> 236 2011-10-15 22:26:59,345 [Thread-4] INFO
> org.smslib.modem.ModemGateway - GTW: modem1: Starting gateway, using
> Wavecom (Generic) AT Handler.
> 240 2011-10-15 22:26:59,349 [Thread-5] INFO
> org.smslib.modem.ModemGateway - GTW: modem2: Starting gateway, using
> Generic AT Handler.
> 240 2011-10-15 22:26:59,349 [Thread-4] INFO
> org.smslib.modem.SerialModemDriver - GTW: modem1: Opening: /dev/
> ttyUSB0 @38400
> 240 2011-10-15 22:26:59,349 [Thread-5] INFO
> org.smslib.modem.SerialModemDriver - GTW: modem2: Opening: /dev/
> ttyUSB1 @38400
> 258 2011-10-15 22:26:59,367 [Thread-4] INFO
> org.smslib.modem.SerialModemDriver - GTW: modem1: Closing: /dev/
> ttyUSB0 @38400
> 285 2011-10-15 22:26:59,394 [Thread-5] DEBUG
> org.smslib.threading.AServiceThread - Initialized.
> 285 2011-10-15 22:26:59,394 [KeepAlive [modem2]] DEBUG
> org.smslib.threading.AServiceThread - Running...
> 286 2011-10-15 22:26:59,395 [Thread-5] DEBUG
> org.smslib.threading.AServiceThread - Initialized.
> 287 2011-10-15 22:26:59,396 [CNMIEmulatorProcessor [modem2]] DEBUG
> org.smslib.threading.AServiceThread - ** disabled **
> 288 2011-10-15 22:26:59,397 [Thread-5] DEBUG
> org.smslib.modem.AModemDriver$ModemReader - GTW: modem2: ModemReader
> thread started.
> 291 2011-10-15 22:26:59,400 [Thread-5] DEBUG
> org.smslib.modem.AModemDriver$AsyncNotifier - GTW: modem2:
> AsyncNotifier thread started.
> 292 2011-10-15 22:26:59,401 [Thread-5] DEBUG
> org.smslib.modem.AModemDriver$AsyncMessageProcessor - GTW: modem2:
> AsyncMessageProcessor thread started.
> 292 2011-10-15 22:26:59,401 [Thread-5] DEBUG
> org.smslib.modem.AModemDriver - GTW: modem2: clearBuffer() called.
> 1238 2011-10-15 22:27:00,347 [NotifyQueueManager] DEBUG
> org.smslib.notify.NotifyQueueManager$NotificationQueueManager -
> NotifyQueueManager end...
> 1238 2011-10-15 22:27:00,347 [DelayQueueManager] DEBUG
> org.smslib.queues.AbstractQueueManager$DelayQueueManager -
> DelayQueueManager end...
> 1293 2011-10-15 22:27:00,402 [Thread-5] DEBUG
> org.smslib.modem.AModemDriver - GTW: modem2: SEND :(27)
> 1338 2011-10-15 22:27:00,447 [NotifyQueueManager] DEBUG
> org.smslib.threading.AServiceThread - Running...
> 1339 2011-10-15 22:27:00,448 [NotifyQueueManager] DEBUG
> org.smslib.notify.NotifyQueueManager$NotificationQueueManager -
> NotifyQueueManager running...
> 1439 2011-10-15 22:27:00,548 [WatchDog] DEBUG
> org.smslib.threading.AServiceThread - Stopped.
> 1439 2011-10-15 22:27:00,548 [main] INFO
> org.smslib.modem.ModemGateway - GTW: modem1: Stopping gateway...
> 1439 2011-10-15 22:27:00,548 [main] DEBUG
> org.smslib.modem.AModemDriver - GTW: modem1: SEND :AT+WATH=31(cr)
> 1441 2011-10-15 22:27:00,550 [main] ERROR
> org.smslib.smsserver.SMSServer - SMSServer error!
> java.lang.NullPointerException
> at org.smslib.modem.SerialModemDriver.write(SerialModemDriver.java:
> 166)
> at org.smslib.modem.AModemDriver.write(AModemDriver.java:302)
> at
> org.smslib.modem.athandler.ATHandler_Wavecom.done(ATHandler_Wavecom.java:
> 52)
> at org.smslib.modem.ModemGateway.stopGateway(ModemGateway.java:198)
> at org.smslib.Service.stopService(Service.java:354)
> at org.smslib.Service.startService(Service.java:233)
> at org.smslib.Service.startService(Service.java:196)
> at org.smslib.smsserver.SMSServer.run(SMSServer.java:337)
> at org.smslib.smsserver.SMSServer.main(SMSServer.java:568)
>
>
>
> =============================================================================================================================================
> SMServer.conf
> settings.delete_after_processing=yes
> settings.outbound_interval=1
> settings.inbound_interval=30
> settings.send_mode = async
>
> gateway.0=modem1, SerialModem
> modem1.port=/dev/ttyUSB0
> modem1.baudrate=38400
> modem1.manufacturer=Wavecom
> modem1.model=M1306B
> modem1.protocol=PDU
> modem1.pin=0000
> modem1.inbound=yes
> modem1.outbound=yes
> modem1.smsc_number=
>
> gateway.1=modem2, SerialModem
> modem2.port=/dev/ttyUSB1
> modem2.baudrate=38400
> modem2.anufacturer=Wavecom
> modem2.model=M1306B
> modem2.protocol=PDU
> modem2.pin=0000
> modem2.inbound=yes
> modem2.outbound=yes
> modem2.smsc_number=
>
> interface.0=mysql, Database
> mysql.type=mysql
> mysql.url=jdbc:mysql://localhost:3306/jsms?autoReconnect=true
> mysql.driver=com.mysql.jdbc.Driver
> mysql.username=root
> mysql.password=
> mysql.tables.sms_in= smsserver_in
> mysql.tables.sms_out= smsserver_out
> mysql.tables.calls= smsserver_calls
> mysql.batch_size=20
> mysql.retries=2
> mysql.update_outbound_on_statusreport=yes
>
>
>
> =============================================================================================================================================
> lsusb result:
> Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching
> Hub
> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 001 Device 006: ID 067b:2303 Prolific Technology, Inc. PL2303
> Serial Port
> Bus 001 Device 005: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
> Bus 001 Device 004: ID 067b:2303 Prolific Technology, Inc. PL2303
> Serial Port
> Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching
> Hub
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>
>
> =============================================================================================================================================
> CommTest Result:
> Found port: /dev/ttyUSB0
> Trying at 9600... no device found (java.io.IOException: Not
> all params are supported by kernel)
> Trying at 14400... no device found
> (javax.comm.UnsupportedCommOperationException: Baud rate not
> supported)
> Trying at 19200... no device found (java.io.IOException: Not
> all params are supported by kernel)
> Trying at 28800... no device found
> (javax.comm.UnsupportedCommOperationException: Baud rate not
> supported)
> Trying at 33600... no device found
> (javax.comm.UnsupportedCommOperationException: Baud rate not
> supported)
> Trying at 38400... no device found (java.io.IOException: Not
> all params are supported by kernel)
> Trying at 56000... no device found
> (javax.comm.UnsupportedCommOperationException: Baud rate not
> supported)
> Trying at 57600... no device found (java.io.IOException: Not
> all params are supported by kernel)
> Trying at 115200... no device found (java.io.IOException: Not
> all params are supported by kernel)
>
> Found port: /dev/ttyUSB1
> Trying at 9600... no device found (java.io.IOException: Not
> all params are supported by kernel)
> Trying at 14400... no device found
> (javax.comm.UnsupportedCommOperationException: Baud rate not
> supported)
> Trying at 19200... no device found (java.io.IOException: Not
> all params are supported by kernel)
> Trying at 28800... no device found
> (javax.comm.UnsupportedCommOperationException: Baud rate not
> supported)
> Trying at 33600... no device found
> (javax.comm.UnsupportedCommOperationException: Baud rate not
> supported)
> Trying at 38400... no device found (java.io.IOException: Not
> all params are supported by kernel)
> Trying at 56000...java.io.IOException: Not all params are
> supported by kernel
> at com.sun.comm.LinuxSerial.nativeSetSerialPortParams(Native Method)
> at com.sun.comm.LinuxSerial.setFlowControlMode(LinuxSerial.java:374)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 57)
> at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
> 43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> at org.smslib.helper.SerialPort.setFlowControlMode(SerialPort.java:
> 580)
> at misc.CommTest.main(CommTest.java:53)
> no device found (javax.comm.UnsupportedCommOperationException: Baud
> rate not supported)
> Trying at 57600... no device found
> Trying at 115200... Getting Info... Found:
>
> Test complete.
>
> --
> 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].
> For more options, visit this group at
> http://groups.google.com/group/smslib?hl=en.
>
>
--
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].
For more options, visit this group at
http://groups.google.com/group/smslib?hl=en.