Commit 38b05d214ef7e2f7a5981cce290ef8a6198e1984

Authored by Adhidarma Hadiwinoto
1 parent 19c0847ab1
Exists in master

Registrasi pertama dilakukan setelah modem open

Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff

... ... @@ -310,12 +310,13 @@ async function sendSMS(destination, msg) {
310 310 }
311 311  
312 312 function init() {
313   - registerModem(modemInfo);
314 313 port = new SerialPort(config.modem.device, { baudRate: 115200 }, (err) => {
315 314 if (err) {
316 315 logger.warn(`Error opening modem. ${err}. Terminating modem ${config.modem.device}.`);
317 316 process.exit(1);
318 317 }
  318 +
  319 + registerModem(modemInfo);
319 320 });
320 321 port.pipe(parserReadLine);
321 322