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

thsq-device-flasher

Package Overview
Dependencies
Maintainers
2
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

thsq-device-flasher

Thingsquare device flash utility

  • 1.0.60
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-25%
Maintainers
2
Weekly downloads
 
Created
Source

Description

thsq-device-flasher is an interactive command line tool for automated flashing of hardware running the Thingsquare system.

Principle of operation

This tool creates a set of device identities on the Thingsquare backend, produces binary flash images that corresponds to those device identities, and flashes those binary images to the devices. Before flashing each device, the tool reads out the EUI of the device and associates it with the device identity on the backend.

Installation

npm install -g thsq-device-flasher

Requirements

Software installation requirements:

  • This script is intended to be run using either of the TI flasher utilities srfprog or Uniflash.
  • NodeJS

Thingsquare configuration requirements:

  • A product configuration on a suitable Thingsquare backend
  • A valid product frontend
  • A user account with a valid API token
  • A valid firmware binary (.bin) for the devices to be flashed

Usage

thsq-device-flasher <options> <binfile>

Required options:

  • -u <token>: API access token

Optional options:

  • -b <backend>: backend stack address (defaults to developer.thingsquare.com)
  • -f <frontend>: product frontend ID (defaults to 0ac48bf3-9fab-4bad-8455-e394808eda6b)
  • -s <email addresses>: comma separated list of users to automatically share new devices with
  • -p <platform>: platform name of newly created devices (defaults to thsq-device-flasher)
  • -P <picture>: a path to a custom device icon
  • -t <flasher tool>: srfprog or uniflash
  • -T <Uniflash path>: full path including Uniflash executable

When run, the tool asks how to flash the new device. Type a letter and press return. The possible options are:

  • [number]: pre-invite device to an existing network designated by the number typed
  • u: flash the device as unbonded, ready to be invited into a network
  • n: generate a new network ID for the new device (useful for access points)
  • r: reflash the connected device with the same identity as it was previously flashed with

Example usage

$ thsq-device-flasher -u 1234abcd1234abcd1234abcd tjo.bin
OK: binfile tjo.bin, md5: d41d8cd98f00b204e9800998ecf8427e
OK: located srfprog utility in path
Logging in...
OK: logged in as user tjo@thingsquare.com

-----------------------------------------------

Found 2 networks:
 * 1: xid cf7b44cb6faf7e45 with 2 devices e.g. Elis gw
 * 2: xid b6e24a2675b543b3 with 101 devices e.g. t904

Menu options:
  1-2 : generate and flash devices in given network
  n: generate and flash device in new network
  s: erase and read MAC of connected device
  l: list existing devices
  h: show this message
  q: quit

FAQs

Package last updated on 02 Oct 2022

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