Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pduParser.generate() User Data Length not correct in 7-bit mode #1

Open
hieucdtspk opened this issue Jul 9, 2014 · 1 comment
Open

Comments

@hieucdtspk
Copy link

Dear Emil Sedgh,

Thanks for your great PDU lib.

I have some test on module 'modem' that uses your pdu lib and I got problem while sending message in 7bit mode.
I found in pduParser.generate() the user data length (TP-UDL) in this case not calculated correctly and this leads to some characters at the end trimmed out, this should be base on original text string length rather than encoded pdu string base.

This is ref for the fix: http://subnets.ru/saved/sms_pdu_format.html

Btw, in pduParser.decode7Bit(), in the loop to built ascii string to return, I have also break if the char code is 0 (string terminator) to avoid of unnecessary character while printing on console (\u0000).

Regards,
HieuNguyen.

@emilsedgh
Copy link
Owner

Hi.
If you have fixed those issues, make a pull request and I'll merge it and release a new version.

Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants