Hi Thanasis,
Thanks for your replay as I have mentioned  earlier
I added following code in CommTest file at the end  

code:-
SerialModemGateway gateway = new SerialModemGateway("test", portfound, 
9600, "", "");

                    System.out.println();
                        System.out.println("Modem Information:");
                        System.out.println("  Manufacturer: " + 
gateway.getManu$
                        System.out.println("  Model: " + 
gateway.getModel());
                        System.out.println("  Serial No: " + 
gateway.getSerialN$
                        System.out.println("  SIM IMSI: " + 
gateway.getImsi());
                        System.out.println("  Signal Level: " + 
gateway.getSign$
                        System.out.println("  Battery Level: " + 
gateway.getBat$
                        System.out.println();

where portfound value is coming as '/dev/ttyUSB0'.
I have also used latest stable version  3.5.4 and when I used  
comm-linux_all_arm-2.0.0.jar  (
http://www.java2s.com/Code/Jar/c/Downloadcommlinuxallarm200jar.htm)
I am not getting null pointer exception  but not getting any output .
I supposed to get  Manufacturer,model,serial no etc as a output
but not getting anything while commtest code gives output at one line as
"Trying at   9600...  Getting Info... Found: AT+CGMMSIMCOM_SIM600"
detailed output is already posted in topic.

so I am thinking whether comm.jar for armlinux is compatible with smslib or 
not.
Any suggestion?

On Saturday, 4 January 2014 00:33:17 UTC+5:30, Thanasis Delenikas wrote:
>
> Hi,
>
> You are saying that CommTest runs OK but another app does not?
> What is the second one? The ReadMessages sample? Is it a modified CommTest?
>
> By the way, SMSLib v3.4.2 is pretty old...
>
>
> On 3 January 2014 11:38, harish7 via SMSLib Discussion Group <
> smslib+noreply-apn2wqcpvc2_atjunwmphqky3piaadxtsft5anmp0wxqwo...@googlegroups.com<javascript:>
> > wrote:
>
>> I am using smslib 3.4.2 ,OS raspbian pi, jdk  jdk-7-oracle-armhf  and GSM 
>> modem simcom sim600
>>
>> i am trying to run CommTest.java(
>> https://github.com/smslib/smslib-v3/blob/master/src/java/misc/CommTest.java
>> )
>>
>> I modified program and added following code at the end by capturing 
>> successful serial port id
>>
>> code:-
>>  SerialModemGateway gateway = new SerialModemGateway("test", portfound, 
>> 9600, "", "");
>>
>>                     System.out.println();
>>                         System.out.println("Modem Information:");
>>                         System.out.println("  Manufacturer: " + 
>> gateway.getManu$
>>                         System.out.println("  Model: " + 
>> gateway.getModel());
>>                         System.out.println("  Serial No: " + 
>> gateway.getSerialN$
>>                         System.out.println("  SIM IMSI: " + 
>> gateway.getImsi());
>>                         System.out.println("  Signal Level: " + 
>> gateway.getSign$
>>                         System.out.println("  Battery Level: " + 
>> gateway.getBat$
>>                         System.out.println();
>>
>> here portfound value is coming as "/dev/ttyUSB0"
>>  
>> I am getting following output
>>
>>
>> Searching for devices...
>>
>> Found port: /dev/ttyUSB0
>>        Trying at   9600...  Getting Info... Found: AT+CGMMSIMCOM_SIM600
>>        Trying at  14400...  no device found 
>> (gnu.io.UnsupportedCommOperationException: Invalid Parameter)
>>        Trying at  19200...  no device found
>>        Trying at  28800...  no device found 
>> (gnu.io.UnsupportedCommOperationException: Invalid Parameter)
>>        Trying at  33600...  no device found 
>> (gnu.io.UnsupportedCommOperationException: Invalid Parameter)
>>        Trying at  38400...  no device found 
>> (gnu.io.UnsupportedCommOperationException: Invalid Parameter)
>>        Trying at  56000...  no device found 
>> (gnu.io.UnsupportedCommOperationException: Invalid Parameter)
>>        Trying at  57600...  no device found
>>        Trying at 115200...  no device found
>>
>> Test complete.=/dev/ttyUSB0
>>
>> Modem Information:
>> log4j:WARN No appenders could be found for logger (smslib).
>> log4j:WARN Please initialize the log4j system properly.
>> log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for 
>> more info.
>>  exception null
>> 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.getManufacturer(ATHandler.java:221)
>> at org.smslib.modem.ModemGateway.getManufacturer(ModemGateway.java:895)
>>  at javarasp.CommTest.main(CommTest.java:141)
>> not getting what exactly I am missing
>>
>> -- 
>> 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/0d987e1b-9a84-43aa-80fc-f52325ed097b%40googlegroups.com
>> .
>>
>
>

-- 
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/7e3054bb-9114-41c2-8d11-4706f4dce53c%40googlegroups.com.

Reply via email to