I got a little issue with the example provided in example/example.js.
When the script is listing my INBOX messages I got the following error:
TypeError: message.getScts is not a function
at module.exports.self.processMessage (/home/ilya/git/test-gsm-adrian/node_modules/serialport-gsm/lib/functions/modem.js:1476:29)
at EventEmitter.item.logic (/home/ilya/git/test-gsm-adrian/node_modules/serialport-gsm/lib/functions/modem.js:1284:28)
at /home/ilya/git/test-gsm-adrian/node_modules/serialport-gsm/lib/functions/modem.js:1032:50
at Array.forEach (<anonymous>)
at /home/ilya/git/test-gsm-adrian/node_modules/serialport-gsm/lib/functions/modem.js:960:16
at Array.forEach (<anonymous>)
at SerialPort.modem.dataReceived (/home/ilya/git/test-gsm-adrian/node_modules/serialport-gsm/lib/functions/modem.js:958:11)
at SerialPort.emit (node:events:379:20)
at addChunk (node:internal/streams/readable:313:12)
at readableAddChunk (node:internal/streams/readable:288:9)
I tried to debug by adding a log at line 1471 of node_modules/serialport-gsm/lib/functions/modem.js:
self.processMessage = (message, messageIndex) => {
console.log(message) //my new line
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi, thanks for your work.
I got a little issue with the example provided in
example/example.js
. When the script is listing my INBOX messages I got the following error:I tried to debug by adding a log at line 1471 of node_modules/serialport-gsm/lib/functions/modem.js:
And the buggy message is logged as following:
I used a workaround by changing the line 1475 to:
It is not a smart fix but it seems to work. I hope this report can help you in any way. I can provide more information if needed.