# reset-usb

> reset a usb device on linux with ioctl

Latest version **1.0.0** (published 2016-05-14) · 0 weekly downloads

## Install

```sh
npm install reset-usb
pnpm add reset-usb
yarn add reset-usb
bun add reset-usb
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-05-14 |
| First published | 2014-11-05 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 3 |
| Author | Ryan Day |
| Maintainers | soldair |

## Links

- npm: https://www.npmjs.com/package/reset-usb
- Repository: https://github.com/soldair/reset-usb
- Homepage: https://github.com/soldair/reset-usb#readme
- Issues: https://github.com/soldair/reset-usb/issues
- npm.io page: https://npm.io/package/reset-usb

## Dependencies (2)

- [nan](https://npm.io/package/nan.md) ^2.3.3
- [tty-to-usb-device](https://npm.io/package/tty-to-usb-device.md) 0.0.1

## Recent versions

- 1.0.0 (latest) — 2016-05-14
- 0.0.1 — 2014-11-19
- 0.0.0 — 2014-11-05

## README

reset-usb
=========

reset a usb device. simulate plug/unplug.

```js
var reset = require("reset-usb")

reset('/dev/bus/usb/002/007',function(err,data){
  console.log(err,data);
  if(!err) console.log('success!');
})

```
you can also specify the path to a usb serial tty device and ```tty-to-usb-device`` will find it for you.

```js

var reset = require("reset-usb")
reset('/dev/ttyACM0',function(err,data){
  console.log(err,data);
  if(!err) console.log('success!');
})


```


and the bad news.
-----------------

- requires linux.  ioctls are supported in different ways cross platform. it would be nice for this to work on osx.
- requires sudo. usb devices are owned by root. you have to be root to restart them =(

---
_Source: https://npm.io/package/reset-usb · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
