I solved adding an empty parameter on Modem:

Modem modem = new Modem("modem1", "/dev/ttyUSB1", "9600", "0000",
                    "0000", "393916263333","0000");

Seems that the last parameter is the memory location....but what is that? I 
followed this guide for the configuration: 
http://smslib.org/doc/v4/UsingGSMModems

Thanks

Il giorno mercoledì 4 febbraio 2015 19:27:52 UTC+1, Daniele Renda ha 
scritto:
>
> Hi,
> I'm new to Smslib. I'm trying to make a simple test case on my Raspberry 
> pi.
> I installed Rxtx library that works fine:
>
> root@raspberrypi:~# javaDjava.library.path=/usr/lib/rxtx:/usr/lib/jni 
> -jar smslib-dep-dev-20140810.184201-3-all.jar 
> log4j:WARN No appenders could be found for logger (org.smslib.threading.
> CallbackManager).
> log4j:WARN Please initialize the log4j system properly.
> log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for 
> more info.
> SMSLib - A universal API for sms messaging
> Copyright (c) 2002-2014, smslib.org
> This software is distributed under the terms of the
> Apache v2.0 License (http://www.apache.org/licenses/LICENSE-2.0.html).
> SMSLib Version: dev-SNAPSHOT
> OS Version: Linux / arm / 3.18.5+
> JAVA Version: 1.8.0_33
> JAVA Runtime Version: 1.8.0_33-b05
> JAVA Vendor: Oracle Corporation
> JAVA Class Path: smslib-dep-dev-20140810.184201-3-all.jar
>
> Running port autodetection / diagnostics...
>
> WARNING:  RXTX Version mismatch
>         Jar version = RXTX-2.2pre1
>         native lib Version = RXTX-2.2pre2
> ====== Found port: /dev/ttyUSB1
> >> Trying at   9600...  Getting Info... Found: AT+CGMME220
> >> Trying at  14400...  Getting Info... Found: AT+CGMME220
> >> Trying at  19200...  Getting Info... Found: AT+CGMME220
> >> Trying at  28800...  Getting Info... Found: AT+CGMME220
> >> Trying at  33600...  Getting Info... Found: AT+CGMME220
> >> Trying at  38400...  Getting Info... Found: AT+CGMME220
> >> Trying at  56000...  Getting Info... Found: AT+CGMME220
> >> Trying at  57600...  Getting Info... Found: AT+CGMME220
> >> Trying at 115200...  Getting Info... Found: AT+CGMME220
> ====== Found port: /dev/ttyUSB0
> >> Trying at   9600...  Getting Info... Found: AT+CGMME220
> >> Trying at  14400...  Getting Info... Found: AT+CGMME220
> >> Trying at  19200...  Getting Info... Found: AT+CGMME220
> >> Trying at  28800...  Getting Info... Found: AT+CGMME220
> >> Trying at  33600...  Getting Info... Found: AT+CGMME220
> >> Trying at  38400...  Getting Info... Found: AT+CGMME220
> >> Trying at  56000...  Getting Info... Found: AT+CGMME220
> >> Trying at  57600...  Getting Info... Found: AT+CGMME220
> >> Trying at 115200...  Getting Info... Found: AT+CGMME220
>
> Test complete.
>
>
> This is my simple code:
>
> public static void main(String[] args) {
>         try {
>             log.debug("Avvio il servizio");
>             Service.getInstance().start();
>
>             Modem modem = new Modem("modem1", "/dev/ttyUSB1", "115200", 
> "0000",
>                     "0000", "");
>             Service.getInstance().registerGateway(modem);
>             log.debug("Modem registrato");
>             OutboundMessage m = new OutboundMessage("393470841943",
>                     "Hello there!");
>             Service.getInstance().send(m);
>             log.debug("Invio sms");
>
>             log.debug("Stop servizio");
>             
> ...

-- 
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/msgid/smslib/339edd8e-8068-4ae1-a928-d7e62a6f530d%40googlegroups.com.

Reply via email to