bluetooth-programmer
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -0,7 +1,19 @@ | ||
var fs=require('fs'); | ||
var BTP=require('../bluetooth-programmer.js'); | ||
var BTDevices=[]; | ||
var currentID=false; | ||
//search all connected ports for Bluetooth devices and discover their baud rate. | ||
BTP.find(foundDevices); | ||
console.log('Searching for any BlueTooth devices connected via USB or serial') | ||
fs.readFile( | ||
'lastID', | ||
function (err,data) { | ||
currentID=Number(data); | ||
if(!currentID) | ||
currentID=0; | ||
currentID++; | ||
BTP.find(foundDevices); | ||
//search all connected ports for Bluetooth devices and discover their baud rate. | ||
console.log('Searching for any BlueTooth devices connected via USB or serial'); | ||
} | ||
); | ||
@@ -12,2 +24,3 @@ | ||
BTDevices=devices; | ||
console.log(devices); | ||
console.log('Found BT Devices :\n####>',devices); | ||
@@ -42,3 +55,10 @@ | ||
console.log('setting Name'); | ||
this.BTName('DNZ38400'); | ||
this.BTName('DNZ38400-'+currentID); | ||
fs.writeFile( | ||
'lastID', | ||
currentID, | ||
function (err) { | ||
currentID++; | ||
} | ||
); | ||
console.log('setting Pin'); | ||
@@ -86,2 +106,2 @@ this.BTPin('1314'); | ||
console.log('finished board 0'); | ||
} | ||
} |
{ | ||
"name": "bluetooth-programmer", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Api to make programming bluetooth modules via USB or Serial simple and easy.", | ||
@@ -10,5 +10,4 @@ "main": "bluetooth-programmer.js", | ||
"dependencies": { | ||
"serialport": "~1.4.6" | ||
"serialport": "*" | ||
}, | ||
"devDependencies": {}, | ||
"scripts": { | ||
@@ -15,0 +14,0 @@ "test": "echo \"Error: no test specified\" && exit 1" |
Sorry, the diff of this file is not supported yet
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
100974
9
368
2
1
+ Added@serialport/binding-mock@10.2.2(transitive)
+ Added@serialport/bindings-cpp@13.0.0(transitive)
+ Added@serialport/bindings-interface@1.2.2(transitive)
+ Added@serialport/parser-byte-length@13.0.0(transitive)
+ Added@serialport/parser-cctalk@13.0.0(transitive)
+ Added@serialport/parser-delimiter@12.0.013.0.0(transitive)
+ Added@serialport/parser-inter-byte-timeout@13.0.0(transitive)
+ Added@serialport/parser-packet-length@13.0.0(transitive)
+ Added@serialport/parser-readline@12.0.013.0.0(transitive)
+ Added@serialport/parser-ready@13.0.0(transitive)
+ Added@serialport/parser-regex@13.0.0(transitive)
+ Added@serialport/parser-slip-encoder@13.0.0(transitive)
+ Added@serialport/parser-spacepacket@13.0.0(transitive)
+ Added@serialport/stream@13.0.0(transitive)
+ Addeddebug@4.4.0(transitive)
+ Addedms@2.1.3(transitive)
+ Addednode-addon-api@8.3.0(transitive)
+ Addednode-gyp-build@4.8.4(transitive)
+ Addedserialport@13.0.0(transitive)
- Removedasync@0.9.0(transitive)
- Removedbindings@1.2.1(transitive)
- Removedminimist@0.0.10(transitive)
- Removednan@1.3.0(transitive)
- Removedoptimist@0.6.1(transitive)
- Removedserialport@1.4.10(transitive)
- Removedsf@0.1.7(transitive)
- Removedwordwrap@0.0.3(transitive)
Updatedserialport@*