Roave / shorty

An asynchronous SMPP client and server built on Node.js. Shorty is sponsored and maintained by SMS Cloud, a subsidiary of Roave
http://roave.com/
GNU General Public License v3.0
92 stars 52 forks source link

PDU Parser short_message Field Issue #20

Open bashardouba opened 8 years ago

bashardouba commented 8 years ago

To anyone facing issues with the PDU Parser's (pdu-parser.js) short_message field:

   else if (field.type === "string") {

        var length = result[field.length_field];

        var temp = new Buffer(length);

        // buffer.copy(temp, 0, offset, offset + field.length);
        // field.length is undefined
        // the author should have used length which he defined above
        buffer.copy(temp, 0, offset, offset + length);

        result[field.name] = temp;
        offset += length;

    }
navsaini53 commented 8 years ago

and unable to decode short_message in delivery_sm

var h = "78 a8 ff 02 00 00 00 00 04 00 00 00 00 00 00 00 01 00 00 00 01 00 00 00 58 a6 ff 02 00 00 00 00 00 00 00 00 00 00 00 00 68 dd 30 40 01 00 00 00 98 a3 ... "

string is in buffer and ending with ... three dots

bashardouba commented 8 years ago

Are you using the client/server examples?

bashardouba commented 8 years ago

Please check ur email. I sent u a full client/server trial.

navsaini53 commented 8 years ago

ok

ochart2 commented 8 years ago

thanks, worked for me. pity it couldn't be merged into the tree

sms-assistent commented 7 years ago

Thanks for you patch. After update nodejs not works submit_sm, your post help to me fixed bugs.

GURUcle commented 6 years ago

Hi can also have full client/server trial please?

bashardouba commented 6 years ago

Hi, Please provide an email to send you this. Not sure if it still works though but worth a try. Thanks

GURUcle commented 6 years ago

Hi here is my emalil. kameetac@gmail.com

On 28 September 2017 at 08:16, bashardouba notifications@github.com wrote:

Hi, Please provide an email to send you this. Not sure if it still works though but worth a try. Thanks

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Roave/shorty/issues/20#issuecomment-332738434, or mute the thread https://github.com/notifications/unsubscribe-auth/AcwOTmIz5UpLj-KPK_LqNh4J26I_2IY5ks5smzmpgaJpZM4G50Ck .

GURUcle commented 6 years ago

Thank you

On 28 September 2017 at 16:14, Papacle Kameeta kameetac@gmail.com wrote:

Hi here is my emalil. kameetac@gmail.com

On 28 September 2017 at 08:16, bashardouba notifications@github.com wrote:

Hi, Please provide an email to send you this. Not sure if it still works though but worth a try. Thanks

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Roave/shorty/issues/20#issuecomment-332738434, or mute the thread https://github.com/notifications/unsubscribe-auth/AcwOTmIz5UpLj-KPK_LqNh4J26I_2IY5ks5smzmpgaJpZM4G50Ck .

rmihaig commented 6 years ago

Hi, i have the same issue, char packet_bytes[] = { 0x61, 0x73, 0x64 }; and using from example, pdu.short_message.toString('ascii') but nothing appears in console i have NodeJS v4.2.6 Can you please give me the patch also? rmihaig@gmail.com

pawel-smpp commented 2 years ago

Can I please have the patch as well? I'm facing the very same issue. Any help would be appreciated