Closed Xsmael closed 5 years ago
I was finally able to do it, and this is the code, for any one needing it:
modem.open('COM11', options);
modem.on('open', data => {
modem.initializeModem(function(p) {
fs.readFile('tts2.amr', function(err,amr_data) {
if(!err) {
let fsize= fs.statSync('tts2.amr').size;
modem.executeCommand('AT+FSCREATE=C:\\User\\tts2.amr',(result) => { log.debug(result); });
modem.executeCommand('AT+FSWRITE=C:\\User\\tts2.amr,0,'+fsize+',100',(result) => {
modem.port.write(amr_data);
});
});
}
});
});
});
Hello bro, I need send wav audio over serialport sim800c can you help me for that anny at command can do that like ivr system auto answer
What have you already tried ?
I am desperatly trying to upload some audio file to the internal memory of a SIM800C, so far this is what I've been able to do, but the uploaded file seems void, and doesnt play any sound. But with
AT+FSLS=C:\\
I can see the file is there.Here is what I have tried:
I've seen this post but it doesnt suit to me, because it uses a tool (AmrFile Download.exe) to do the job manually, I need to do it programmatically. I thought if that tool could do it so can I, there must be a way, but have not yet found...
What really bugs me is how is the file located from my computer, and its content read before even loading it. I've kept the audio file
tts2.amr
in the same directory than the nodejs script since the AT commands shows me no way to specify a path for the source file it only considers the destination, so I've no clue how to do it, and I feel it doesnt work like that.