Ok, this is where I have some problems : looking just at at2_pdu_encode(), I think the UDH never gets converted to 7 bit chars, but always remains as 8 bit chars.
another question that is probably not related : on my Siemens M20, whenever I send a SM (using at2) which contains characters which should be 'escaped' acording to the GSM charset (for example - the square brackets which I like to use), the modem rejects the message with error 304 "invalid PDU mode parameter". I found out that if I encode the message length byte (UDL) in the PDU to cound 'escaped' characters as 2 chars (one for the char and one for the ESC), the modem accepts the message. Does that sounds reasonable ? do other modems count escaped chars as one char ? is it a bug in the modem ? >From the GSM documentation I could understand that the UDL should count GSM 7 bit characters, but from the siemens documentation I got two quote - from the 'Developer's Guide : SMS with the SMS PDU-mode' : "The UDL field gives an integer representation of the number of characters within the User Data field to follow" but from the M20 manual (in german) : "UDL (user DATA length) value must agree exact with the byte length of the string". When I recieve a message, the UDL field indicates the number of septets (counting ESC as a char) in the message. Do you think that the M20 doesn't follow the GSM standard here ? Oded Arbel m-Wise Inc. [EMAIL PROTECTED] -- What's in it doesn't count - it's the presntation that matters. -- Fishizm -----Original Message----- From: Andreas Fink [mailto:[EMAIL PROTECTED]] Sent: Monday, January 14, 2002 9:19 AM To: Oded Arbel Subject: RE: A question about PDU encoding in smsc_at2 >oh - I get it : the UDH is already encoded correctly using the right DCS >before the call to at2_pdu_encode(), and then at2_pdu_encode() only >needs to translate the bitstream to hex strings, and in the length >computation it computes how many septets are in the already encoded bit >stream - right ? Im not sure if thats the case. However at the end, the UDH must contain the number of final octets. so at2_pdu_encode will most probably call the 7 to 8 bit conversion but calculate the length for the udh before that. The routine was copied out of previous at driver without any changes (meaning it always worked but I didnt write it). -- Andreas Fink Fink-Consulting ------------------------------------------------------------------ Tel: +41-61-6932730 Fax: +41-61-6932729 Mobile: +41-79-2457333 Address: A. Fink, Schwarzwaldallee 16, 4058 Basel, Switzerland E-Mail: [EMAIL PROTECTED] Homepage: http://www.finkconsulting.com ------------------------------------------------------------------ Something urgent? Try http://www.smsrelay.com/ Nickname afink