From afe45b59cd3b2a6a82d12b802b31150e83410364 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Mon, 14 Feb 2022 09:49:29 +0100 Subject: [PATCH] fix: update serialport API --- src/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 979a1b7..23fbde0 100644 --- a/src/index.js +++ b/src/index.js @@ -1,4 +1,4 @@ -const SerialPort = require('serialport') +const { SerialPort } = require('serialport') const { api } = require('./api') const { EventCategory } = require('./utils') @@ -8,7 +8,8 @@ const commandsWithoutPrefixedResponse = ['AT+CLAC', 'AT+CGSN', 'AT+CGMM', 'AT+CG class ModemPort extends SerialPort { constructor (port, opts) { - super(port, { + super({ + path: port, autoOpen: false, baudRate: 115200, dataBits: 8,