Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tessel

Package Overview
Dependencies
Maintainers
3
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tessel

Tessel command line tools and programmatic access library.

  • 0.3.19
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

tessel cli and module

This is the Node module for communicating with Tessel by the commandline, pushing code and controlling network settings / configuration, or for programmatically interacting with Tessel.

npm install tessel

Module API

You can interact with Tessel programmatically.

var tessel = require('tessel');

Module

This module creates a single-threaded local server to which multiple processes can connect to a single Tessel over USB, as well as a TesselClient object that acts as a connection to the Tessel.

var tessel = require('tessel-client');

# Object  tessel.descriptors
Hash of USB descriptors.

{
  TESSEL_VID: 0x1d50, TESSEL_PID: 0x6097,
  TESSEL_OLD_VID: 0x1fc9, TESSEL_OLD_PID: 0x2002,
  NXP_ROM_VID: 0x1fc9, NXP_ROM_PID: 0x000c
}

# tessel.connect( port, host ) → TesselClient
Connects to a local Tessel server.

# tessel.connectServer( path, callback(err, port) )
Connects a detached child server to a Tessel USB port. Returns the port at which the local Tessel server is listening.

# tessel.detectModems( callback(err, paths) )
Retrieve the path of each Tessel connected by USB in an array.

# tessel.selectModem( onnotfound(), callback(err, path) )
Interactive menu for selecting a Tessel to connect to. Will continue to poll until a suitable client is found, calling the onnotfound callback (perhaps continuously). Once a device is found, if multiple options exist, user is prompted for a selection. Then the callback is passed the path of the chosen device.

# tessel.acquire( [path, ], callback(err, client) )
Acquires a Tessel client, either interactively (via selectModem) or directly given the supplied path. The callback is passed a TesselClient object.

# tessel.bundleFiles( relpath, args, files, callback(err, bundle) )
relpath is the starting path of the application relative to root. args is the process.argv array. files is a map of tessel filesystem paths to local filesystem paths from the computer. This function returns to the callback with a bundle that can be deployed to Tessel.

TesselClient object

Created by tessel.connect.

# DuplexStream  client.stdout
Stream of output from the client module.

# client.send( json )
Sends a message to be read by process.on('message', callback) by the child script.

# client.wifiStatus( callback(err, wifiStatus) )
Returns the status of the board's Wifi. wifiStatus has the properties "connected" and "ip".

# client.configureWifi( ssid, pass, security, [opts,] callback(err, wifiStatus) )
Connects to the given Wifi network. security can be one of "wpa2", "wep", or null. pass can be null if no security is chosen. err is true if the network could not be connected to. An optional opts object allows an integer timeout number to be specified in seconds.

# client.deployBundle( tarbundle, opts, onScriptStart(err) )
Deploys a tar bundle of code to the device. opts can have a flag save to write the bundle to the local filesystem, or flash to flash the device instead of running from RAM.

# client.erase()
Erases internal flash on the device of any running code.

# client.stop()
Stops the current script.

# client.deploy( filepath, argv, onScriptStart(err) )
Given a file path, automatically deploys the file and its nearest directory with a package.json file to Tessel.

# client → emits "script-start"
Emitted when a client script starts.

# client → emits "script-stop"
Emitted when a client script exits.

License

MIT or Apache 2.0, at your option

FAQs

Package last updated on 18 Dec 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc