You must enable the debug output from log4j. << and does it cause any problem if i use MessageClasses.ALL and just after reading, delete all messages from modem? >>
Actually, this is what I always suggest. Do not leave messages in your phone, always read them out and delete them. Your phone's memory capacity is somehow limited. On Feb 12, 4:47 pm, onerekiz <[email protected]> wrote: > Hi Thanasis > here is some logs on modem start: > > 0 [main] INFO smslib - 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 > 0 [main] INFO smslib - Version: 3.4.5 > 15 [main] INFO smslib - JRE Version: 1.6.0_16 > 15 [main] INFO smslib - JRE Impl Version: 14.2-b01 > 15 [main] INFO smslib - O/S: Windows XP / x86 / 5.1 > 47 [Thread-6] INFO smslib - GTW: modem.com1: Starting gateway, using > Siemens MC35i AT Handler. > 62 [Thread-6] INFO smslib - GTW: modem.com1: Opening: COM1 @57600 > 6765 [Thread-6] INFO smslib - GTW: modem.com1: GSM: Registered to home > network. > 6890 [Thread-6] INFO smslib - GTW: modem.com1: MEM: Storage Locations > Found: SMME > 6953 [Thread-6] INFO smslib - CNMI: No best match, returning: 1 > 7062 [Thread-6] INFO smslib - GTW: modem.com1: Gateway started. > Modem Information: > Manufacturer: SIEMENS > Model: MC35i > Serial No: ************** > SIM IMSI: ************ > Signal Level: 100% > Battery Level: 0% > > After this my thread chaecks unread messages from tihs method: > > public synchronized List<InboundMessage> getUnReadMessages(){ > List<InboundMessage> unReadMessages = new > ArrayList<InboundMessage>(); > try{ > System.out.println("Will get unread Messages ?"); > service.readMessages(unReadMessages, > MessageClasses.UNREAD); > System.out.println("Got unread Messages."); > System.out.println("size:"+unReadMessages.size()); > }catch(Exception e){ > e.printStackTrace(); > log.error("Error on getting > UnReadMessages!"+e.toString()); > } > return unReadMessages; > > } > > on every cycle it prints these and does not give any error: > > Will get unread Messages ? > Got unread Messages. > size:0 > > As you mentioned modem does notunderstand that command. > How can i be sure for this? > and does it cause any problem if i use MessageClasses.ALL and just > after reading, delete all messages from modem? > > Thanks... > > On 12 Şubat, 14:16, Thanasis <[email protected]> wrote: > > > > > It would help if you could post a log, but it seems that your modem > > does not understand that command. > > > On Feb 12, 11:39 am, onerekiz <[email protected]> wrote: > > > > i have Siemens MC35i gsm modem. > > > i can get ALL messages but cannot get UNREAD messages. > > > what can cause this > > > anybody can help, please? > > > > i use it like in the examples. here some code from my app: > > > new SerialModemGateway("modem.com1", "COM1", 57600, "Siemens", > > > "MC35i"); > > > gateway.setProtocol(Protocols.PDU); > > > gateway.setInbound(true); > > > gateway.setOutbound(false); > > > > service.readMessages(unReadMessages, MessageClasses.ALL); //works > > > service.readMessages(unReadMessages, MessageClasses.UNREAD); //does > > > not work!- Hide quoted text - > > - Show quoted text - -- 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.
