nguyenbahuong / smslib

Automatically exported from code.google.com/p/smslib
0 stars 0 forks source link

Speedy up ReadMessage time in loop, which by default takes =>30 seconds of showing new sms to output. #460

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Dear All
i want to speedy up the ReadMessage time, i mean which is running in loop. soon 
after the sms has been received, it should show output with in a second. 
because once the sms is read by the ReadMessage.java  next it take about 15 to 
30second to show new next message from phone.

Regards

Original issue reported on code.google.com by mabf...@gmail.com on 9 Feb 2012 at 8:06

GoogleCodeExporter commented 9 years ago
Dear more ever is that my phone takes 5 to 6 seconds to get new sms from 
another phone and it take more than 25 seconds to give in output...please help 
me it taking me into trouble for waiting so longer to get new message output 
after 30seconds and another message more 30 seconds and hence i get output of 2 
messages in 1 minute thats  taking too longer time..

Regards

Original comment by mabf...@gmail.com on 10 Feb 2012 at 8:47

GoogleCodeExporter commented 9 years ago
How many messages do you have in your phone's inbox??? 30 seconds for an inbox 
readout is somewhat high...

What is your phone, baud rate, setup?

Original comment by T.Delenikas on 10 Feb 2012 at 8:18

GoogleCodeExporter commented 9 years ago
i am using LG-KG200 with following setting code.. soon after message is 
recieved i delete it from inbox,, so inbox get empty after message 
received...first i used to read message from sim and i change it to phone 
memory to read from but same delay issue..please help me in solving this issue

some code portion is below

SerialModemGateway gateway = new SerialModemGateway("modem.com10", "COM10", 
9600, "LG", "KG200");

                        // Set the modem protocol to PDU (alternative is TEXT). PDU is the default, anyway...
            gateway.setProtocol(Protocols.PDU);

            // Do we want the Gateway to be used for Inbound messages?
                        gateway.setInbound(true);

            // Do we want the Gateway to be used for Outbound messages?
            gateway.setOutbound(true);

            // Let SMSLib know which is the SIM PIN.
            gateway.setSimPin("0000");

                        gateway.setSmscNumber("+9230******");

                        // i am sending sms aswel.. for acknowledgment purpose
                        Service.getInstance().setOutboundMessageNotification(outboundNotification);

            Service.getInstance().setInboundMessageNotification(inboundNotification);
            Service.getInstance().setCallNotification(callNotification);
            Service.getInstance().setGatewayStatusNotification(statusNotification);
            Service.getInstance().setOrphanedMessageNotification(orphanedMessageNotification);

            Service.getInstance().addGateway(gateway);

            Service.getInstance().startService();
            msgList = new ArrayList<InboundMessage>();
            Service.getInstance().readMessages(msgList, MessageClasses.ALL);
            for (InboundMessage msg : msgList)
        ......................................................................................

thanks

Original comment by mabf...@gmail.com on 11 Feb 2012 at 4:27

GoogleCodeExporter commented 9 years ago
Issue 461 has been merged into this issue.

Original comment by T.Delenikas on 16 Feb 2012 at 3:20

GoogleCodeExporter commented 9 years ago
This is not logical...

Are you sure you are not imposing any delays from the xxxNotification methods?

Original comment by T.Delenikas on 16 Feb 2012 at 3:22

GoogleCodeExporter commented 9 years ago
yes i am not imposing any delay.
then y there is delay is being plz help me
what is the normal sms reading rate in smslib  you calculated so far..
Regards

Original comment by mabf...@gmail.com on 22 Feb 2012 at 8:33

GoogleCodeExporter commented 9 years ago
Cannot reproduce this. If you are not delaying things from the notification 
methods, it must be some sort of modem issue.

Original comment by T.Delenikas on 7 Mar 2012 at 9:00