Hi, I've seen this sequence of FFs before, but had nothing to do with the actual message. Those strange FFs are sign of a communication failure, maybe a buffer overflow or something going wrong with the serial port connecting the phone.
Try to work with different baud rates. Start with 9600, test and increase baud rate. I could bet that this has nothing to do with the originator string. On Mar 2, 2:34 pm, sgr <[email protected]> wrote: > Hi, > > I have trouble parsing a PDU message with an originator address other > than an international phone number. Let me briefly explain the purpose > and setup before I go into the message specifics. > > I need to receive an SM sent by a business partner. They probably send > the SM via a bulk SMS gateway, using an arbitrary string as the > originator address. I also have access to a bulk SMS gateway, so I can > approximate what the partner sends us. I receive the SM on a GSM-Modem > (Siemens M20), using the smsserver component of smslib. I'm > interpreting the received SM by implementing > org.smslib.smsserver.interfaces.Interface#MessagesReceived. > I've tested the implementation by sending an SMS to the modem from my > mobile phone. Works like a charm. > > However, things change when I receive messages from certain originator > addresses of type D0, for example, "Renz Stefan". All PDU data > following the originator address block seems to be garbled, looking at > the resulting SmsDeliveryPdu object. I've seen TP-PIDs of 0x21 and > 0x58, where 0x00 is expected. Also, the TP-SCTS is either way in the > future, or in the past (by years). > > Here's the raw PDU that I read from the modem (e.g. by issuing AT > +CMGR=...): > 0891534875001040F30414D0D2B25B0F0000000000000F30204420B2AF0F90A0CBE6B01B000 > 00130FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF > FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF > FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF > FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF > > Using a different originator, say, using now "Stefan Renz" instead of > "Renz Stefan", works out well: the SMS is well parsable by the > PduParser: > here's the raw PDU String I copied from the terminal program: > 0891534875001040F30414D0537AD91C7683A465B71E0000013020017560400CC7F79B0C6AB > FE5EEB4FB0C > > The only difference between the two are the originator address, and > the time sent. Immediately striking is the fact that the garbled > message is much longer and seems to be somewhat padded. > > In order to play with those messages, I directly use > org.ajwcc.pduUtils.gsm3040.PduParser#parse, passing in those raw PDU > strings, and looking at the resulting Pdu objects. > > Does anyone have an idea of where I go wrong, or what the problem may > be? The whole issue looks rather strange to me, especially since the > PDU data received on the modem already looks garbled. > > Thanks in advance, > Stefan -- 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.
