We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
gsm.js
` function err(message) { console.log('Usage: node send_sms.js /path/to/device xxxxyyzz "Foo Bar"'); process.exit(); } var device = process.argv[2]; var receiver = process.argv[3]; var text = process.argv[4]; if(!device || !receiver || !text) err(); var modem = require('modem').Modem(); modem.open('/dev/ttyS0', function() { modem.sms({ receiver:receiver, text:text, 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(',')); }); }); `
console error:
node gsm.js /dev/ttyS0 +359894587672 "test node" DEPRECATION: Please use require('serialport') instead of require('serialport').SerialPort ^C
require('serialport')
require('serialport').SerialPort
modem.js
1: var pdu = require('pdu'); 2: var sp = require('serialport'); 3: var EventEmitter = require('events').EventEmitter; ...... 81: modem.open = function(device, callback) { 82: modem.port = new sp.SerialPort(device, { 83: parser: sp.parsers.raw 84: });
Cant find that DEPRECATION error!
The text was updated successfully, but these errors were encountered:
Go read up on the newer documentation for SerialPort, some stuff changed, don't use sp.SerialPort anymore
Sorry, something went wrong.
No branches or pull requests
Hi,
gsm.js
console error:
modem.js
Cant find that DEPRECATION error!
The text was updated successfully, but these errors were encountered: