Ssp
Node.JS implementation of Encrypted Smiley ® Secure Protocol (eSSP, SSP)
Install / Use
/learn @kybarg/SspREADME
<a name="readme-top"></a>
@kybarg/ssp
Node.JS implemenation of Encrypted Smiley ® Secure Protocol (eSSP, SSP)
Supported devices: NV9USB, NV10USB, BV20, BV50, BV100, NV200, NV200 Spectral, SMART Hopper, SMART Payout, NV11, NV22
[!WARNING]
NV11 is not fully tested and supported. Maintainer is required.
Table of Contents
Basis usage
const sspLib = require('@kybarg/ssp')
let eSSP = new sspLib({
id: 0x00,
timeout: 3000,
fixedKey: '0123456701234567',
})
eSSP.on('READ_NOTE', result => {
console.log('READ_NOTE', result)
})
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
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
pollingInterval: 300, // interval between poll messages
}
Methods
All methods return Promise
eSSP.open('COM1')- Connect deviceeSSP.close()- Disconnect deviceeSSP.initEncryption()- Initializing Diffie-Hellman key exchange and enable encryptioneSSP.enable()- Enable device and start listen eventseSSP.disable()- Disable device and stop listen eventseSSP.poll()- Start/Stop polling the deviceeSSP.command('COMMAND_NAME')- Execute command and get answer
License
Distributed under the MIT License. See LICENSE.txt for more information.
Related Skills
node-connect
349.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
