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

@dawee/bossajs

v0.9.1

Published

Node bindings for [Bossa](https://github.com/shumatech/BOSSA), the open source Atmel SAM-BA DFU utility.

Downloads

4

Readme

Bossa.js

Node bindings for Bossa, the open source Atmel SAM-BA DFU utility.

Currently only working on macOS. Other platforms coming soon.

Installing

yarn add bossajs

Or from source:

git submodule update --init
yarn rebuild

Windows

Only win32 is supported.

As a superuser install Python and MSVS build tools:

npm install --global --production windows-build-tools

Then build the app as:

npm config set arch ia32 
git submodule update --init
node-gyp configure --arch x86
node-gyp rebuild

Usage

import { Bossa } from 'bossaja';

const PORT = '/dev/tty.usb1';
const bossa = new Bossa();

await bossa.connect(PORT);

try {
    const buffer = Buffer.from([0xd, 0xe, 0xa, 0xd, 0xb, 0xe, 0xe, 0xf]);
    await bossa.write(buffer, 0x2000);
    await bossa.verify(buffer, 0x2000);
} finally {
    await bossa.close();
}

API Documentation

Constructor

  • Bossa() / Bossa(opts)

    opts is an optional object of options.

    {
        debug: boolean,
    }

Methods

  • connect(port) -> Promise

    Connect to the device.

  • close() -> Promise

    Close the connection.

  • info() -> Promise<Object>

    Return info about the device.

  • read(offset, size) -> Promise<Buffer>

    Read size bytes starting from offset.

  • write(buffer, offset) -> Promise

    Write buffer to device starting from offset.

  • verify(buffer, offset) -> Promise

    Verify the data at offset is equivalent to buffer.

Events

Inherits from EventEmitter.

  • progress -> (progress, total)

    Progress update of the current operation (in device pages).

Testing

Testing is possible on a development board running the SAM-BA bootloader, e.g. the Atmel SAMD21 Xplained Pro.

PORT=/dev/tty.usb1 yarn test

Copyright and License

Bossa.js is © 2019, Sports Performance Tracking. It is released under a BSD 3-clause license, which you can find in LICENSE.

Bossa is © 2011-2016, ShumaTech. It is also released under a BSD 3-clause license, which you can find in extern/bossa/LICENSE.