initial commit
This commit is contained in:
Коммит
400fba14cd
|
@ -0,0 +1,23 @@
|
|||
# Visual Studio #
|
||||
.settings/
|
||||
.vs/
|
||||
.vscode/
|
||||
|
||||
# Node #
|
||||
node_modules/
|
||||
npm-debug.log
|
||||
|
||||
# Builds #
|
||||
dist/*
|
||||
out/*
|
||||
tmp/*
|
||||
|
||||
# Mac OS #
|
||||
.DS_Store
|
||||
.DS_Store?
|
||||
|
||||
# Windows #
|
||||
Thumbs.db
|
||||
|
||||
# Linux #
|
||||
*.swp
|
|
@ -0,0 +1,7 @@
|
|||
Contributors should submit an update to this file with a commit in order to receive recognition. Thank you for your contributions.
|
||||
|
||||
List of Contributors
|
||||
====================
|
||||
|
||||
Microsoft Corporation
|
||||
Microsoft Open Technologies, Inc
|
|
@ -0,0 +1,2 @@
|
|||
## 2016.09.30 Version 0.5.0
|
||||
* Initial Release
|
|
@ -0,0 +1,22 @@
|
|||
Device Discovery Command Line Utility
|
||||
Copyright (c) Microsoft Corporation
|
||||
All rights reserved.
|
||||
|
||||
MIT License
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the ""Software""), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/dist/devdisco.js" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/dist/devdisco.js" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
|
@ -0,0 +1,7 @@
|
|||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\dist\devdisco.js" %*
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\dist\devdisco.js" %*
|
||||
)
|
|
@ -0,0 +1,16 @@
|
|||
const babel = require('gulp-babel');
|
||||
const gulp = require('gulp');
|
||||
|
||||
gulp.task('build', ['compile', 'copyfiles']);
|
||||
gulp.task('default', ['compile', 'copyfiles']);
|
||||
|
||||
gulp.task('compile', () => {
|
||||
return gulp.src('src/**/*.js')
|
||||
.pipe(babel({ presets: ['es2015', 'stage-0'] }))
|
||||
.pipe(gulp.dest('dist'));
|
||||
});
|
||||
|
||||
gulp.task('copyfiles', () => {
|
||||
return gulp.src('src/**/*.csv')
|
||||
.pipe(gulp.dest('dist'));
|
||||
});
|
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
"name": "device-discovery-cli",
|
||||
"version": "0.1.0",
|
||||
"description": "device discovery and management command line utility",
|
||||
"bin": {
|
||||
"devdisco": "./dist/devdisco.js"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "./node_modules/.bin/gulp build",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"keywords": [
|
||||
"CLI",
|
||||
"device",
|
||||
"discovery",
|
||||
"IoT"
|
||||
],
|
||||
"author": "Microsoft Corporation",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"dns": "^0.2.2",
|
||||
"mdns-js": "^0.5.0",
|
||||
"node-arp": "^1.0.5",
|
||||
"node-wifiscanner": "^0.2.1",
|
||||
"vow": "^0.4.12",
|
||||
"serialport": "^4.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-preset-es2015": "^6.14.0",
|
||||
"babel-preset-stage-0": "^6.5.0",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-babel": "^6.1.2"
|
||||
},
|
||||
"babel": {
|
||||
"presets": [
|
||||
"es2015",
|
||||
"stage-0"
|
||||
]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
# device-discovery-cli
|
||||
|
||||
> A cross platform command line utility which can discover devices connected via Ethernet, Wi-Fi and USB.
|
||||
|
||||
*Issues with the output should be reported on the <https://github.com/Microsoft/device-discovery-cli/issues>.*
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --global device-discovery-cli
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
$ devdisco
|
||||
|
||||
Usage: devdisco <cmd>
|
||||
|
||||
where <cmd> is one of:
|
||||
list, update, upgrade, version
|
||||
|
||||
Sample:
|
||||
|
||||
devdisco list -eth list the Ethernet devices
|
||||
devdisco list -usb list the USB serial devices
|
||||
devdisco list -wifi list the Wi-Fi devices
|
||||
devdisco list -eth rp2 list the Ethernet devices which looks like Raspberry Pi2
|
||||
|
||||
devdisco@1.0.0 /usr/bin/devdisco
|
||||
|
||||
## Sample Output
|
||||
|
||||
##### Ethernet Devices
|
||||
|
||||
IP Address MAC Address Type Host Name
|
||||
|
||||
10.172.14.69 08:00:27:d7:27:ef raspberrypi (Raspberry Pi) raspberrypi
|
||||
10.172.15.84 00:15:5d:0f:9d:01 tessel (Tessel 2) tessel2
|
||||
10.172.14.219 00:0c:29:35:fa:9f huzzah (Adafruit HUZZAH ESP8266)
|
||||
10.172.15.98 78:2b:cb:b5:1c:9c ?
|
||||
10.172.14.81 00:0c:29:77:f7:68 ?
|
||||
10.172.14.61 00:1b:21:c6:92:ca ?
|
||||
10.172.15.69 24:be:05:1f:88:42 ?
|
||||
10.172.15.143 00:15:5d:0f:08:00 ?
|
||||
10.172.15.29 34:17:eb:ce:8d:8d ?
|
||||
10.172.15.92 b8:27:eb:41:22:8d ?
|
||||
10.172.14.47 64:00:6a:95:ca:5b ?
|
||||
10.172.14.167 64:00:6a:76:fd:49 ?
|
||||
10.172.14.184 50:65:f3:56:11:1f ?
|
||||
10.172.14.42 68:05:ca:0c:2e:77 ?
|
||||
10.172.15.148 94:57:a5:cc:99:86 ?
|
||||
|
||||
|
||||
##### USB UART Devices
|
||||
|
||||
COM Port Device Id Device Type
|
||||
|
||||
COM1 PCI\VEN_8086&DEV_1D26&SUBSYS_158A103C
|
||||
COM2 PCI\VEN_8086&DEV_1D26&SUBSYS_158A103D tessel (Tessel 2)
|
||||
|
||||
##### Wi-Fi Access Points:
|
||||
|
||||
SSID MAC Address Device Type Channel Signal (dB)
|
||||
|
||||
MSFTLAB 94:57:a5:cc:99:86 ? 1 -50.5
|
||||
MyTessel 94:57:a5:cc:99:87 tessel (Tessel 2) 11 -67.5
|
||||
|
||||
## License
|
||||
|
||||
[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)
|
Загрузка…
Ссылка в новой задаче