Code Monkey home page Code Monkey logo

sms-pdu's People

Watchers

James Cloos avatar 大熊 avatar

sms-pdu's Issues

Non international phone number not encode propery

What steps will reproduce the problem?
1. Encode to PDU message "Hello" with Service Number +381650000900 and target 
phone 0654702293.   


What is the expected output? What do you see instead?
Encoded PDU is 0011000C918361450722390000AA05C8329BFD06 and this PDU GMS modem 
rejects with cms error 500.

But if we use international number of target phone +381654702293 instead of 
0654702293, PDU encode properly

What version of the product are you using? On what operating system?
Last available version r11 - Windows 7.

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 16 Feb 2015 at 8:50

Text address patch

Sometimes network operator sends sms with text address (mostly ads or
notification about nwe services). To decode it change PopAddress method and
add check:

if (0x0D == addressType >> 4) {
    address = Decode7bit(address, (int)Math.Truncate(address.Length * 4.0 /
7.0));
    } 

Regards,
Janek

Original issue reported on code.google.com by [email protected] on 8 Mar 2010 at 9:13

Encode7bit/Encode8bit

Is there an update of this library on its way, specifically support for 
SMS.Compose() with 7 & 8bit encoding?

Original issue reported on code.google.com by [email protected] on 27 Aug 2009 at 8:38

Minor error in last-part of multimessage

Hi, great project :)

Reproduce is simple:

string s_pdu2 = 
"06915404939099640A9154050515800000113071903202401E0500039A0202EC6550980E32A7DDE
432A84E0685CD20B43D4C7601";
SMS sms = new SMS();
SMS.Fetch(sms, ref s_pdu2);

this will return rubbish-text.


The solution (please change project sourcecode):

1. Add function to SMSBase:
public static byte[] PeekBytes(string source, int byteIndex, int length)
{
    string bytes = source.Substring(byteIndex * 2, length * 2);

    return GetBytes(bytes);
}

2. Change function Fetch in SMS where 'if (sms._userDataStartsWithHeader)' to 
(remember to add byte sms._userDataHeaderLength):
if (sms._userDataStartsWithHeader)
{
     sms._userDataHeaderLength = PeekByte( source);

     sms._userDataHeader = PeekBytes(source, 1, sms._userDataHeaderLength);
}

3. Still in Fetch, find:
            switch ((SMSEncoding)sms._dataCodingScheme & SMSEncoding.ReservedMask)
            {
                case SMSEncoding._7bit:
                    sms._message = Decode7bit(source, userDataLength);
                    break;

and change it to:
            switch ((SMSEncoding)sms._dataCodingScheme & SMSEncoding.ReservedMask)
            {
                case SMSEncoding._7bit:
                    sms._message = Decode7bit(source, userDataLength);
                    if (sms._userDataStartsWithHeader && sms._userDataHeaderLength > 0)
                        sms._message = sms._message.Remove(0, ((sms._userDataHeaderLength + 1) * 8 + ((sms._userDataHeaderLength + 1) * 8) % 7) / 7);
                    break;


Don't know about _8bit or UCS2 part, but it will work for _7bit.

Regards, Ole

Original issue reported on code.google.com by [email protected] on 17 Mar 2011 at 9:42

error in type of phone number(81 or 91)

line 278 in SMSBase.cs, function EncodePhoneNumber
"int header = (phoneNumber.Length << 8) + 0x81 | (isInternational ? 0x10 : 
0x20);"

Code "0x81 | (isInternational ? 0x10 : 0x20);" result in 0x91 for international 
numbers and 0xA1 for others, bu it is not correct:
http://www.developershome.com/sms/cmgwCommand.asp
"The second parameter of the +CMGW AT command, address_type.... They are 
129(0x81) and 145(0x91)..."

I consider that correct is:
"int header = (phoneNumber.Length << 8) + (isInternational ? 0x91 : 0x81);"

Thank you...

Original issue reported on code.google.com by [email protected] on 15 Aug 2013 at 9:07

Decoding multipart SMS - Unicode

What steps will reproduce the problem?
1. When try to decode Unicode multipart SMS message (in Cyrillic), at the 
beginning of decoded text there is two unknown characters...
2. Send message from phone to GMS modem: 
"Обзидана народним телом, столећима је наша 
народна душа муцала и мучила се тражећи 
језик"


What is the expected output? What do you see instead?
Expected output of first part is text: "Обзидана народним 
телом, столећима је наша народна душа 
муцала и му"
And I see: "Ԁ̀ȁОбзидана народним телом, 
столећима је наша народна душа муцала и му"
HERE IS PDU: 
"0791836105009000440C918361450722390008512051711392408C050003000201041E043104370
43804340430043D04300020043D04300440043E0434043D0438043C002004420435043B043E043C0
02C002004410442043E043B0435045B0438043C04300020045804350020043D04300448043000200
43D04300440043E0434043D0430002004340443044804300020043C044304460430043B043000200
4380020043C0443"


Expected output of second part is "чила се тражећи језик"
And I see: "Ԁ̀Ȃчила се тражећи језик"
HERE IS PDU: 
"0791836105009000440C918361450722390008512051711303403005000300020204470438043B0
430002004410435002004420440043004360435045B043800200458043504370438043A" 



What version of the product are you using? On what operating system?
I use last available update - r11 and Windows 7.    

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 15 Feb 2015 at 4:41

problem with decode function

hello every body i m new in c# this is a greate library i have two issues when 
i decode single sms less than 160 chars its shows nothing message field 
empty.multipart supported and other how can i  contatenate incoming multipart 
sms..into one sms if possible please give me any example  thanks in advance

Original issue reported on code.google.com by [email protected] on 29 Apr 2011 at 12:14

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.