javascript - Send SMS with Node.JS SerialPort -
i'm trying title says using enfora modem purpose. however, though works correctly in minicom, won't work in node.js application. here's code i'm using:
serialport.write('at+cmgf=1\r'); serialport.write('at+cmgs="04141430632"\r'); serialport.write('mensaje'+string.fromcharcode(26)+'\r'); i've tried replacing string.fromcharcode(26) next options. none of has worked.
'\^z' '^z' '^(z)' '\^(z)' '<ctrl+z>' '<ctrl-z>' '\#' '#' '\u001a' buffer([0x1a]) i sincerely believe problematic part of code, because ok message first 2 lines, 3rd 1 returns nothing, because doesn't processed.
any help on appreciated.
assuming 0x1a byte need send, need send in buffer correctly. cannot concatenate. if do, end literally string mensaje\u001a, instead of character 0x1a.
try this:
serialport.write('mensaje'); serialport.write(new buffer[0x1a]); serialport.write('\r'); javascript node.js serial-port sms
No comments:
Post a Comment