open-index/open-npm huggingface dataset:
npm package: @particle/device-control-core
Description: Core components for controlling Particle devices via a control request interface
Author: Particle Industries, Inc.
Latest version: 0.2.4

<!-- This file was automatically generated from README.md.template. Do not modify it directly. -->

# @particle/device-control-core

Core components for controlling Particle devices via a control request interface.

:warning: _This is an internal utility package, not intended for direct use - you probably want one of the higher-level packages like [`@particle/device-control-ble`](../device-control-ble)_

_NOTE: The `@particle/device-control-core` package declares `@particle/device-constants` as a [`peerDependency`](https://docs.npmjs.com/cli/v8/configuring-npm/package-json#peerdependencies) - this ensures your app only ever has one copy of that dependency_

## Supported Platforms

* [Photon](doc/api.md#PhotonDevice)
* [P1](doc/api.md#P1Device)
* [Electron](doc/api.md#ElectronDevice)
* [Argon](doc/api.md#ArgonDevice)
* [Boron](doc/api.md#BoronDevice)
* [Xenon](doc/api.md#XenonDevice)
* [E SoM X](doc/api.md#ESoMXDevice)
* [A SoM](doc/api.md#ASoMDevice)
* [B SoM](doc/api.md#BSoMDevice)
* [X SoM](doc/api.md#XSoMDevice)
* [B5 SoM](doc/api.md#B5SoMDevice)
* [Asset Tracker](doc/api.md#AssetTrackerDevice)
* [Tracker M](doc/api.md#TrackerMDevice)
* [P2](doc/api.md#P2Device)


## Links

* [API reference](doc/api.md)
npm package: @particle/device-os-flash-util
Description: Device OS Flashing Utility
Latest version: 0.15.1

![Build Status](https://github.com/particle-iot/device-os-flash-util/actions/workflows/ci.yaml/badge.svg)

# Device OS Flashing Utility

device-os-flash is a tool that simplifies flashing of Particle devices. It can flash official Device OS releases, as well as user-provided module binaries – via DFU or a debugger.

## Status

**This tool was developed for Particle internal purposes.** 

It is currently functioning well for all [supported Particle devices](https://docs.particle.io/reference/product-lifecycle/product-lifecycle-policy-status/), is actively utilized within Particle and is available to be used by Particle customers. However, it is important to note that there is no long-term commitment to providing ongoing updates for this tool. As such, our [Product Lifecycle Policy](https://docs.particle.io/reference/product-lifecycle/product-lifecycle-stages/) does not apply to this particular tool.

## Installation

Install with npm globally:

```sh
npm install --global @particle/device-os-flash-util
```

**Prerequisites:**

- [OpenOCD](http://openocd.org). It is recommended to use the version of OpenOCD that is bundled with [Workbench](https://www.particle.io/workbench).
- [dfu-util](http://dfu-util.sourceforge.net). Installing the latest version available via your package manager should be sufficient.
- Node.js 12 or higher.

**Supported Debuggers:**

- [Particle Debugger](https://store.particle.io/products/particle-debugger).
- [ST-LINK/V2](https://www.st.com/en/development-tools/st-link-v2.html).

## Getting Started

The examples below cover most of the use case scenarios. For the full list of available options, see the tool's help:

```sh
device-os-flash -h
```

**Flashing all detected devices with Device OS 2.3.0 via DFU:**

```sh
device-os-flash --all-devices 2.3.0
```

device-os-flash automatically downloads release binaries from GitHub. If you are experiencing rate limiting errors, set your GitHub [access token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) via the `GITHUB_TOKEN` environment variable.

**Same as above, but do not flash [Tinker](https://github.com/particle-iot/device-os/tree/develop/user/applications/tinker):**

```sh
device-os-flash --all-devices --no-user 2.3.0
```

**Flashing a user application to all detected devices:**

```sh
device-os-flash --all-devices my_app.bin
```

**Flashing specific devices:**

```sh
device-os-flash -d my_boron -d my_electon 2.3.0
```

Resolving device names requires a valid Particle API token. If you are signed in via the Particle CLI, device-os-flash will use the token from the CLI's configuration file. Alternatively, the token can be specified via the `PARTICLE_TOKEN` environment variable.

**Flashing all detected devices via OpenOCD:**

```sh
device-os-flash --all-devices --openocd 2.3.0
```
npm package: @particle/device-os-protobuf
Description: Particle Device OS Protobuf Definitions
Latest version: 2.9.0

[![CircleCI](https://circleci.com/gh/particle-iot/device-os-protobuf/tree/main.svg?style=svg)](https://circleci.com/gh/particle-iot/device-os-protobuf/tree/main)

# Particle Device OS Protobuf Definitions

Particle devices expose Control Requests over USB and BLE for functionality like device information and Wi-Fi setup. This repo contains the definition for all these control requests in Protobuf format. 

Note that most common Javascript use cases Device OS Protobuf usage over USB would be better accommodated by [particle-usb](https://github.com/particle-iot/particle-usb) rather than this project because it provides a higher level API that is easier to use and covers protobuf transmission over USB (not just encoding/decoding);

Device OS declares all control request IDs in [system-control.h](https://github.com/particle-iot/device-os/blob/develop/system/inc/system_control.h). Additionally, Device OS depends on `control/*.proto` files in this repo via a `git submodule`.

iOS and Android applications also depend on `control/*.proto` files directly via a `git submodule`.

See the [protobuf definitions reference](/docs/protobuf.md) for more details about specific requests.

## Usage
### Node.js

Install package with `npm install @particle/device-os-protobuf`

See [docs/reference.md](/docs/reference.md) for public api documentation

See `src/*.test.js` files for basic usage examples.

See `particle-usb` for production usage examples.

### Development

Ensure you have installed dependencies via `npm install`.

Edit the protocol buffer definitions in [`proto`](proto).

Generate the [protobufjs JavaScript & JSON](https://www.npmjs.com/package/protobufjs) files and markdown documentation with `npm run build`. Make sure to do this before asking for PR reviews/merging.

Ensure `npm run test:ci` is passing

Building the [protobuf definitions reference](/docs/protobuf.md) is done with `npm run build:docs:protobuf`. This command uses Docker to remove the dependency on [`protoc-gen-doc`](https://github.com/pseudomuto/protoc-gen-doc) tool.

## Release

Packages are only released from the `main` branch after peer review via the following process.

1. make sure you have the latest:
	* `$ git checkout main`
	* `$ git pull`
1. make sure tests pass
	* `$ npm test:ci`
1. Tag a new version:
    * `npm version` 
1. Cut the release:
    * `$ git push origin main --follow-tags`
    * CircleCI will publish the package to npm.