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

Cutting off last characters sending SMS #4

Closed
leoncc opened this issue Jul 27, 2014 · 7 comments
Closed

Cutting off last characters sending SMS #4

leoncc opened this issue Jul 27, 2014 · 7 comments

Comments

@leoncc
Copy link

leoncc commented Jul 27, 2014

When using the modem.sms function I am experiencing that the last few characters are cut of when viewing the sms message on the receiving phone.

function sendSMS() {
console.log('Attempting to send SMS');
modem.sms({
receiver: '0761234567',
text: 'Test text from app.js on Mac.',
encoding: '7bit'
}, function (err, sent_ids) {
console.log('>>', arguments);
if (err)
console.log('Error sending sms:', err);
else
console.log('Message sent successfully, here are reference ids:', sent_ids.join(','));
});
}

For instance: Test text from app.js on Mac. gets cut off toTest text from app.js on M

Have you experienced this?

Thanks
Leon

@emilsedgh
Copy link
Owner

emilsedgh/pdu#1

I will fix it in a couple of weeks.

Thank you for the bug report.

@leoncc
Copy link
Author

leoncc commented Jul 28, 2014

Hi,

Attached pdu.js for the pdu package on npm.

I fixed decode7Bit to ignore \u0000 char (line 186 - 191).
I fixed cutting off of last few characters (line 294).

Regards
Leon

On 27 Jul 2014, at 11:27 AM, Emil Sedgh [email protected] wrote:

emilsedgh/pdu#1

I will fix it in a couple of weeks.

Thank you for the bug report.


Reply to this email directly or view it on GitHub.

@emilsedgh
Copy link
Owner

Hi.
I cannot see any attachment.

@engkan2kit
Copy link

I am experiencing this too.

@leoncc
Copy link
Author

leoncc commented Sep 8, 2015

Hi,

In the scenario I wanted to use SMSs I discovered I needed a bit more. I want to be able to send SMSs in a queued manner (if things get busy), process delivery reports, receive SMS etc. I downloaded the Gammu SMSD deamon from wammu.eu. Unfortunately you need to compile it with cmake, but I found that relatively easy. It works for me, but maybe your scenario is different.

Regards
Leon

@leoncc leoncc closed this as completed Sep 8, 2015
@engkan2kit
Copy link

My scenario is this:
I have multiple GSM modems. I have a main nodejs app that stores the sms message and destination in mongodb. Each GSM modem has node.js app(same script but different device addresses) that is connected to the main app and fetches queued messages in the mongoDB. Also, whenever the main app stores the mongodb, it notifies all gsm node that there is a new data to be fetch( to avoid polling the database). Right now I am using only one GSM modem. I have experience this problem(cutting of lasst few characters as well as corrupted multiple messages when more that 160 characters are sent.). I suspect the problem is with the PDU so I am thinking of not using the PDU and directly use the Text mode of GSM modems since mine supports it.

It's like a load balancing application for GSM. Any ready GSM can send a message.

@leoncc
Copy link
Author

leoncc commented Sep 8, 2015

Most important I think is that only one application should communicate with one modem as while you are busy sending other messages might come in, for instance delivery reports if you request them. I have one deamon running per modem, which handles the sending and receiving. In my case I also need to process incoming SMSs.

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

3 participants