google-code-export / smslib

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

StatusReportMessages it seems not working with wavecom modem #469

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am running my application on linux, using WAVECOM modem connected by serial 
port. 
In my code when I try to send a message with 
msg.setStatusReport(true);
Message is sent correctly, but after a while I am receiving a 
InboundBinaryMessage instead of a StatusReportMessage. 
What am I doing wrong? Are there any known incompatibility with WAVECOM modems? 
Is possible decode a binary messsage and process information on it?

Thanks in advance
J.-

Original issue reported on code.google.com by j.cruz.m...@gmail.com on 7 Mar 2012 at 8:40

GoogleCodeExporter commented 9 years ago
Update-
InboundBinaryMessage receipt has memLocation property with "SR" value, so is 
clear that is a status reports message.-

Original comment by j.cruz.m...@gmail.com on 7 Mar 2012 at 8:46

GoogleCodeExporter commented 9 years ago
Hi,

Are you saying that using instanceof indicates a binary message?
I've worked with Wavecoms and never encountered this - which model do you have?
If you cast to StatusReportMessage, is this message useful?

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

GoogleCodeExporter commented 9 years ago

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

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Thanks T. for your response.
I have run some tests with this code:

            logger.info("SMS received : {} ", inboundMessage);
            if (inboundMessage instanceof StatusReportMessage) {
                logger.info("Message received is {} ", Message.MessageTypes.STATUSREPORT.name());
            } else if (inboundMessage instanceof InboundBinaryMessage) {
                logger.info("Is a binary message. Take a look : {} ", inboundMessage.getClass());
                try {
                    StatusReportMessage msgReport = (StatusReportMessage) inboundMessage;
                } catch (ClassCastException e) {
                    logger.info("Casting operation not allowed ");
                }
            }

Output is clear:

07 mar 2012 19:01:31,993 |  INFO | ThreadReceptor:65 | SMS received : 
===============================================================================
<< InboundBinaryMessage >>
-------------------------------------------------------------------------------
 Gateway Id: 1
 Message UUID: 233d9afb-d3b4-4f84-9975-5b7a7cd5c4c6
 Encoding: 8-bit
 Date: Sun Oct 19 22:33:47 ART 2166
 Dispatched via SMSC: null
 Binary: 44F92130600273312921306002
 Originator: null
 Memory Index: 1
 Multi-part Memory Index: 
 Memory Location: SR
 Source / Destination Ports: -1 / -1
===============================================================================

07 mar 2012 19:01:31,995 |  INFO | ThreadReceptor:69 | Is a binary message. 
Take a look : class org.smslib.InboundBinaryMessage 
07 mar 2012 19:01:31,996 |  INFO | ThreadReceptor:73 | Casting operation not 
allowed 

So, casting operation is not allowed for InboundBinaryMessage to 
StatusReportMessage :\.
My WAVECOM modem is a Q2686H.

Thanks a lot.
Juan.-

Original comment by j.cruz.m...@gmail.com on 7 Mar 2012 at 10:11

GoogleCodeExporter commented 9 years ago
Can you please set the log level to DEBUG and post the PDUs? Or a full log from 
the sendmessage example, including the receipt of the status report.

Original comment by T.Delenikas on 9 Mar 2012 at 8:59

GoogleCodeExporter commented 9 years ago

Hello T., sorry for the delay . 
Here you have both logs, log when message is being sent and log when status 
reports is being received.
I hope this help us to figure out what is going on.
Thanks a lot again.

Juan.-

Original comment by j.cruz.m...@gmail.com on 13 Mar 2012 at 5:34

Attachments:

GoogleCodeExporter commented 9 years ago
Hi,

I can see the following PDU:

000000FF0006840D81453914450668F62130312042142921303120

Unfortunately, I don't know what is this... But it's *not* a delivery status 
report. Seems like a malformed inbound message. I cannot decode it using other 
tools as well...

Original comment by T.Delenikas on 17 Mar 2012 at 8:17

GoogleCodeExporter commented 9 years ago
Ok, Thanks a lot for your help. I need to think in some workaround for this 
problem.

Original comment by j.cruz.m...@gmail.com on 20 Mar 2012 at 7:34

GoogleCodeExporter commented 9 years ago
Ok - if you have any feedback, please reopen.

Original comment by T.Delenikas on 20 Mar 2012 at 8:35