All Projects → mwittig → etherport-client

mwittig / etherport-client

Licence: MIT license
Client-side virtual serial port for Etherport. Used to implement firmata-compatible boards and relays.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to etherport-client

Cserialport
基于C++的轻量级开源跨平台串口类库Lightweight cross-platform serial port library based on C++
Stars: ✭ 296 (+1380%)
Mutual labels:  serial-ports, serialport
Cserialport
The latest modified version of Remon Spekreijse's serial port class
Stars: ✭ 64 (+220%)
Mutual labels:  serial-ports, serialport
Androidserialport
Android串口通信示例
Stars: ✭ 497 (+2385%)
Mutual labels:  serial-ports, serialport
serial.nim
A Nim library for accessing serial ports.
Stars: ✭ 59 (+195%)
Mutual labels:  serial-ports, serialport
Common
Yet another serial port debugger.
Stars: ✭ 245 (+1125%)
Mutual labels:  serial-ports, serialport
serialPort
Android通用的串口通信库
Stars: ✭ 39 (+95%)
Mutual labels:  serial-ports, serialport
Ninjaterm
A serial port terminal that's got your back.
Stars: ✭ 24 (+20%)
Mutual labels:  serial-ports, serialport
serialport
PHP Serial Port
Stars: ✭ 42 (+110%)
Mutual labels:  serial-ports, serialport
Libserial
Serial Port Programming in C++
Stars: ✭ 201 (+905%)
Mutual labels:  serial-ports, serialport
Rubyserial
FFI Ruby library for RS-232 serial port communication
Stars: ✭ 142 (+610%)
Mutual labels:  serial-ports, serialport
Node Serialport
Access serial ports with JavaScript. Linux, OSX and Windows. Welcome your robotic JavaScript overlords. Better yet, program them!
Stars: ✭ 5,015 (+24975%)
Mutual labels:  serial-ports, serialport
esp8266-web-control-panel
WeMos D1 / D1R2 (ESP8266) Web Control Panel via WiFi using Johnny Five (JavaScript) and Socket.IO
Stars: ✭ 18 (-10%)
Mutual labels:  johnny-five, firmata
Androidserialport
Android Serial Port , 基本的Android 串口通信库
Stars: ✭ 99 (+395%)
Mutual labels:  serial-ports, serialport
nodebots-interchange
Project related to creating hardware backpacks for your nodebot to make them more capable.
Stars: ✭ 47 (+135%)
Mutual labels:  board, firmata
RxSerialPort
基于Rxjava2.x的串口通信library
Stars: ✭ 11 (-45%)
Mutual labels:  serial-ports, serialport
ble-serial
"RFCOMM for BLE" a UART over Bluetooth low energy (4.0+) bridge for Linux, Mac and Windows
Stars: ✭ 134 (+570%)
Mutual labels:  serialport
hackathon-board
node.js based webapp to manage Hackathon events
Stars: ✭ 18 (-10%)
Mutual labels:  board
serial2mqtt
Serial to MQTT adapter serivce
Stars: ✭ 21 (+5%)
Mutual labels:  serialport
OpenAmiga600RamExpansion
Open Hardware 1 MB Chip RAM Expansion for the Commodore Amiga 600 Computer
Stars: ✭ 48 (+140%)
Mutual labels:  board
obb-rules
Orion's Belt BattleGrounds battle engine
Stars: ✭ 13 (-35%)
Mutual labels:  board

etherport-client

Client-side virtual serial port for Rick Waldron's Etherport. Etherport-client is used to implement firmata-compatible boards and tethering hubs to control a board by a remote entity.

Usage Examples

The following usage examples can also be found in the examples directory of this package/project. Note, you'll need to manually install the required packages to run the examples (see require statements in the example code).

Tethering a Johnny Five IO-Plugin

Create an EtherPortClient with host and port properties referring to the peer transport endpoint of the EtherPort instance. Next, bind the resulting object to an IO-plugin using remote-io (see example below).

var EtherPortClient = require('etherport-client').EtherPortClient;
var RemoteIO = require('remote-io');
var RaspiIO = require('raspi-io');
var io = new RaspiIO();

io.on('ready', function() {
    console.log("ready");

    var sp = new EtherPortClient({
        host: '192.168.178.70',
        port: 41234
    });


    //listen for remote firmata messages
    var remoteIO = new RemoteIO({
        serial: sp,
        io: io
    });
});

Tethering a Serial Port (Chaining)

You can also simply chain Serial Port objects. For example, if you have a host with an Arduino board connected via USB and you want to access the Arduino board from a remote computer, you chain the Serial Ports on the host as follows.

var EtherPortClient = require('etherport-client').EtherPortClient;
var chainSerialPorts = require('etherport-client').chainSerialPorts;
var SerialPort = require("serialport").SerialPort;

chainSerialPorts(
    new EtherPortClient({
        host: '192.168.178.70',
        port: 41234
    }),
    new SerialPort("/dev/ttyUSB1", {
        baudrate: 57600
    })
);

Using StandardFirmataWiFi with ESP8266

By default, StandardFirmataWiFi with ESP8266 is a TCP Server. Thus, you'll need a TCP client transport for J5.

var five = require("johnny-five");
var EtherPortClient = require("etherport-client").EtherPortClient;
// update host to the IP address for your ESP board
var board = new five.Board({
    port: new EtherPortClient({
        host: "10.0.0.17",
        port: 3030
    }),
    timeout: 1e5,
    repl: false
});

board.on("ready", function() {
    console.log("READY!");
    var led = new five.Led(2);
    led.blink(500);
});

Debugging

For debugging purposes the debug package with topic "etherport-client" is used.

License

The MIT License (MIT), Copyright (c) 2015-2019 Marcus Wittig

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].