npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

thsq-device-flasher

v1.0.62

Published

Thingsquare device flash utility

Downloads

26

Readme

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 [email protected]

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

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