@jmkristian/node-vara
v1.0.2
Published
Communicate via radio in the style of node net, using a VARA FM or VARA HF modem.
Downloads
9
Readme
node-vara
Communicate via radio in the style of node Net, using a VARA FM or HF modem.
const VARA = require('@jmkristian/node-vara');
const Bunyan = require('bunyan');
var server = new VARA.Server ({
host: 'vara-fm-server-host', // default: localhost
port: 8300, // default: 8300
dataPort: 8301, // default: port + 1
logger: Bunyan.createLogger({name: 'VARA'}), /* default: no logging
An object compatible with the Bunyan logger interface, or null. */
},
function onConnection(connection) {
console.log('connection'
+ ' from ' + connection.remoteAddress
+ ' to ' + connection.localAddress);
connection.write(...); // transmit data
connection.pipe(...); // receive data
});
server.listen({
host: ['A1CALL-1', 'B2CALL-10'] // This server's call signs.
},
function onListening(info) { // called when the server begins listening
console.log('VARA listening %o', info);
});