From 78bc7ffe76f3dc2b516790bddf8392ff2004382f Mon Sep 17 00:00:00 2001 From: Ruslan Kyba Date: Mon, 15 Jul 2024 19:24:13 +0300 Subject: [PATCH] docs: updare readme --- README.md | 15 +++++++++++++++ lib/index.js | 1 - 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9b28fd2..6e2416a 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,21 @@ eSSP.command('GET_SERIAL_NUMBER').then(result => { console.log('Serial number:', result.info.serial_number) return }) + +const portOptions = { baudRate: 9600 } + +eSSP.open('COM1', portOptions) +``` + +## Config values +```javascript +const options = { + fixedKey: '123', // device internal encryption key + encryptAllCommand: true, // should command commands also be encrypted + id: 0, // device id in case multiple acceptors connected to the host + timeout: 1000, // command response timeout after wich command considered failed + commandRetries: 20 // how many time to retry before throwing error or emitting ERROR event + } ``` ## Methods diff --git a/lib/index.js b/lib/index.js index f1ff9ee..6655bf1 100644 --- a/lib/index.js +++ b/lib/index.js @@ -35,7 +35,6 @@ class SSP extends EventEmitter { // Initialize config const { fixedKey = '0123456701234567', ...otherConfig } = config this.config = { - debug: false, encryptAllCommand: true, id: 0, timeout: 1000,