Oh, good to know. This is a known issue with HUAWEIs, *but* in other models
the sending completely fails if you don't set the SMSC yourself. In your
model, the sending fails silently...

On 2 June 2010 00:10, Silvio Moreto <[email protected]> wrote:

> Hey!
> Thanks for the help, but it works!!
> I put the smsc number and force protocol PDU.
> The modem Huawei E156C is compatible too!
>
> Thankful
> -
>
>
> On Tue, Jun 1, 2010 at 5:08 PM, Thanasis <[email protected]> wrote:
>
>> Hi,
>>
>> What you've already posted IS the log. You just need to increase the
>> logging level from INFO to DEBUG in order for SMSLib to output everything.
>>
>>  On 31 May 2010 22:52, Silvio Moreto <[email protected]> wrote:
>>
>>> I tried to put lo4j.properties in everywhere, but I don't know where the
>>> log is...
>>> How can I do that?
>>> below my code and the System.out ...
>>>
>>> thanks for help!!!!!
>>>
>>>
>>> package smsManager;
>>>
>>> import java.io.IOException;
>>> import org.smslib.OutboundMessage;
>>> import org.smslib.SMSLibException;
>>> import org.smslib.Service;
>>> import org.smslib.modem.SerialModemGateway;
>>> import smsManager.interfaces.Send;
>>>
>>> /**
>>>  *
>>>  * @author Silvinho
>>>  */
>>> public class Sender implements Send{
>>>
>>>     private Service srv;
>>>     private SerialModemGateway gateway;
>>>     private OutboundMessage msg;
>>>
>>>     public Sender()
>>>     {
>>>         try {
>>>             srv = new Service();
>>>             gateway = new SerialModemGateway("modem.com22", "COM22",
>>> 460800, "huawei", "SGH-J700i");
>>>             gateway.setInbound(true);
>>>             gateway.setOutbound(false);
>>>             gateway.setSimPin("8888");
>>>             srv.addGateway(gateway);
>>>             srv.startService();
>>>             System.out.println();
>>>         System.out.println("Modem Information:");
>>>         System.out.println("  Manufacturer: " +
>>> gateway.getManufacturer());
>>>         System.out.println("  Model: " + gateway.getModel());
>>>         System.out.println("  Serial No: " + gateway.getSerialNo());
>>>         System.out.println("  SIM IMSI: " + gateway.getImsi());
>>>         System.out.println("  Signal Level: " + gateway.getSignalLevel()
>>> + "%");
>>>         System.out.println("  Battery Level: " +
>>> gateway.getBatteryLevel() + "%");
>>>         System.out.println();
>>>
>>>         } catch (SMSLibException ex) {
>>>             ex.printStackTrace();
>>>         } catch (IOException ex) {
>>>             ex.printStackTrace();
>>>         } catch (InterruptedException ex) {
>>>             ex.printStackTrace();
>>>         }
>>>     }
>>>
>>>     public void sendMessage(String number, String text) {
>>>         try {
>>>             msg = new OutboundMessage(number, text);
>>>             //msg.setSrcPort(505);
>>>             //msg.setDstPort(505);
>>>             srv.sendMessage(msg);
>>>             System.out.println("Message Sended!");
>>>         } catch (Exception ex) {
>>>             ex.printStackTrace();
>>>         }
>>>     }
>>>
>>>     public Send getSender()
>>>     {
>>>         return this;
>>>     }
>>>
>>>     public void stopService() {
>>>         try {
>>>             srv.stopService();
>>>         } catch (Exception ex) {
>>>             ex.printStackTrace();
>>>         }
>>>     }
>>>
>>>     public void startService() {
>>>         if(srv != null)
>>>         {
>>>             try {
>>>                 srv.startService();
>>>             } catch (Exception ex) {
>>>                 ex.printStackTrace();
>>>             }
>>>         }
>>>     }
>>>
>>>     public static void main(String[] args) {
>>>         Sender s = new Sender();
>>>         s.sendMessage("+551688176400", "X");
>>>         s.stopService();
>>>
>>>     }
>>> }
>>>
>>>
>>>
>>> SLF4J: Class path contains multiple SLF4J bindings.
>>> SLF4J: Found binding in
>>> [jar:file:/C:/Users/Silvinho%20is%20my%20boy/Documents/NetBeansProjects/ZelousServer/src/lib/slf4j-jdk14-1.6.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>> SLF4J: Found binding in
>>> [jar:file:/C:/Users/Silvinho%20is%20my%20boy/Documents/NetBeansProjects/ZelousServer/src/lib/slf4j-log4j12-1.6.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
>>> explanation.
>>>  31/05/2010 11:53:40 org.smslib.helper.Logger logInfo
>>>
>>> INFO: SMSLib: A Java API library for sending and receiving SMS via a GSM
>>> modem or other supported gateways.
>>> This software is distributed under the terms of the Apache v2.0 License.
>>> Web Site: http://smslib.org
>>> 31/05/2010 11:53:40 org.smslib.helper.Logger logInfo
>>>
>>> INFO: Version: 3.4.5
>>> 31/05/2010 11:53:40 org.smslib.helper.Logger logInfo
>>>
>>> INFO: JRE Version: 1.6.0_18
>>> 31/05/2010 11:53:40 org.smslib.helper.Logger logInfo
>>>
>>> INFO: JRE Impl Version: 16.0-b13
>>> 31/05/2010 11:53:40 org.smslib.helper.Logger logInfo
>>>
>>> INFO: O/S: Windows 7 / x86 / 6.1
>>> 31/05/2010 11:53:40 org.smslib.helper.Logger logInfo
>>> INFO: GTW: modem.com22: Starting gateway, using Generic AT Handler.
>>> 31/05/2010 11:53:40 org.smslib.helper.Logger logInfo
>>> INFO: GTW: modem.com22: Opening: COM22 @460800
>>> 31/05/2010 11:53:46 org.smslib.helper.Logger logInfo
>>> INFO: GTW: modem.com22: GSM: Registered to home network.
>>> 31/05/2010 11:53:46 org.smslib.helper.Logger logInfo
>>> INFO: GTW: modem.com22: MEM: Storage Locations Found: MESMSR
>>> 31/05/2010 11:53:46 org.smslib.helper.Logger logInfo
>>> INFO: GTW: modem.com22: Gateway started.
>>>
>>> Modem Information:
>>>   Manufacturer: huawei
>>>   Model: E156C
>>>   Serial No: 358641024487422
>>>   SIM IMSI: ** MASKED **
>>>   Signal Level: 25%
>>>   Battery Level: 0%
>>>
>>> Message Sended!
>>> 31/05/2010 11:53:47 org.smslib.helper.Logger logInfo
>>> INFO: GTW: modem.com22: Stopping gateway...
>>> 31/05/2010 11:53:47 org.smslib.helper.Logger logInfo
>>> INFO: GTW: modem.com22: Closing: COM22 @460800
>>> 31/05/2010 11:53:47 org.smslib.helper.Logger logInfo
>>> INFO: GTW: modem.com22: Gateway stopped.
>>> -
>>>
>>>
>>> On Mon, May 31, 2010 at 4:12 AM, Thanasis <[email protected]> wrote:
>>>
>>>> Hi,
>>>>
>>>> I don't think that this is an initialization issue... If, for example,
>>>> you wouldn't be able to register to your network, SMSLib would complain 
>>>> well
>>>> before sending the message.
>>>>
>>>> Can you post (or send me) the complete log of the SendMessage sample?
>>>>
>>>> On 31 May 2010 06:09, Silvio Moreto <[email protected]> wrote:
>>>>
>>>>> Hi!
>>>>> I'm writting a code to send and receive SMS based on the source
>>>>> examples.
>>>>> Well, I ran the code and don't get any error on send a SMS, but the
>>>>> message was not delivered....
>>>>> Why this happen? I'm thinking that is because the SIM card was not
>>>>> initialized.. maybe?
>>>>>
>>>>> I'm using a 3g modem Huawei E156C and the trace is below:
>>>>>
>>>>>
>>>>> SLF4J: Class path contains multiple SLF4J bindings.
>>>>> SLF4J: Found binding in [jar:file:/C:/Users/Silvinho%20is%20my%20boy/
>>>>> Documents/NetBeansProjects/ZelousServer/src/lib/slf4j-jdk14-1.6.0.jar!/
>>>>> org/slf4j/impl/StaticLoggerBinder.class]
>>>>> SLF4J: Found binding in [jar:file:/C:/Users/Silvinho%20is%20my%20boy/
>>>>> Documents/NetBeansProjects/ZelousServer/src/lib/slf4j-
>>>>> log4j12-1.6.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
>>>>> explanation.
>>>>> 30/05/2010 23:50:16 org.smslib.helper.Logger logInfo
>>>>> INFO: SMSLib: A Java API library for sending and receiving SMS via a
>>>>> GSM modem or other supported gateways.
>>>>> This software is distributed under the terms of the Apache v2.0
>>>>> License.
>>>>> Web Site: http://smslib.org
>>>>> 30/05/2010 23:50:16 org.smslib.helper.Logger logInfo
>>>>> INFO: Version: 3.4.5
>>>>> 30/05/2010 23:50:16 org.smslib.helper.Logger logInfo
>>>>> INFO: JRE Version: 1.6.0_18
>>>>> 30/05/2010 23:50:16 org.smslib.helper.Logger logInfo
>>>>> INFO: JRE Impl Version: 16.0-b13
>>>>> 30/05/2010 23:50:16 org.smslib.helper.Logger logInfo
>>>>> INFO: O/S: Windows 7 / x86 / 6.1
>>>>> 30/05/2010 23:50:16 org.smslib.helper.Logger logInfo
>>>>> INFO: GTW: modem.com24: Starting gateway, using Generic AT Handler.
>>>>> 30/05/2010 23:50:16 org.smslib.helper.Logger logInfo
>>>>> INFO: GTW: modem.com24: Opening: COM24 @57600
>>>>> 30/05/2010 23:50:23 org.smslib.helper.Logger logInfo
>>>>> INFO: GTW: modem.com24: GSM: Registered to home network.
>>>>> 30/05/2010 23:50:23 org.smslib.helper.Logger logInfo
>>>>> INFO: GTW: modem.com24: MEM: Storage Locations Found: MESMSR
>>>>> 30/05/2010 23:50:23 org.smslib.helper.Logger logInfo
>>>>> INFO: GTW: modem.com24: Gateway started.
>>>>>
>>>>> MESSAGE SEND!
>>>>>
>>>>> 30/05/2010 23:50:23 org.smslib.helper.Logger logInfo
>>>>> INFO: GTW: modem.com24: Stopping gateway...
>>>>> 30/05/2010 23:50:23 org.smslib.helper.Logger logInfo
>>>>> INFO: GTW: modem.com24: Closing: COM24 @57600
>>>>> 30/05/2010 23:50:23 org.smslib.helper.Logger logInfo
>>>>> INFO: GTW: modem.com24: Gateway stopped.
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "SMSLib User Group" group.
>>>>> To post to this group, send email to [email protected].
>>>>> To unsubscribe from this group, send email to
>>>>> [email protected]<smslib%[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 User Group" group.
>>>> To post to this group, send email to [email protected].
>>>> To unsubscribe from this group, send email to
>>>> [email protected]<smslib%[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 User Group" group.
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to
>>> [email protected]<smslib%[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 User Group" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<smslib%[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 User Group" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<smslib%[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 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