From bcf42ad179fa850b30d719bddd74057d562acf8f Mon Sep 17 00:00:00 2001 From: busticated Date: Fri, 13 Dec 2019 15:34:21 -0800 Subject: [PATCH 1/3] update particle-usb to v0.5.2 --- npm-shrinkwrap.json | 24 ++++++++++++------------ package.json | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index e03d16c32..cdf45a8b2 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -2033,9 +2033,9 @@ } }, "@babel/runtime-corejs2": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs2/-/runtime-corejs2-7.7.4.tgz", - "integrity": "sha512-hKNcmHQbBSJFnZ82ewYtWDZ3fXkP/l1XcfRtm7c8gHPM/DMecJtFFBEp7KMLZTuHwwb7RfemHdsEnd7L916Z6A==", + "version": "7.7.6", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs2/-/runtime-corejs2-7.7.6.tgz", + "integrity": "sha512-QYp/8xdH8iMin3pH5gtT/rUuttVfIcOhWBC3wh9Eh/qs4jEe39+3DpCDLgWXhMQgiCTOH8mrLSvQ0OHOCcox9g==", "optional": true, "requires": { "core-js": "^2.6.5", @@ -2043,9 +2043,9 @@ }, "dependencies": { "core-js": { - "version": "2.6.10", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.10.tgz", - "integrity": "sha512-I39t74+4t+zau64EN1fE5v2W31Adtc/REhzWN+gWRRXg6WH5qAsZm62DHpQ1+Yhe4047T55jvzz7MUqF/dBBlA==", + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz", + "integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==", "optional": true }, "regenerator-runtime": { @@ -2436,9 +2436,9 @@ "optional": true }, "@types/node": { - "version": "10.17.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.6.tgz", - "integrity": "sha512-0a2X6cgN3RdPBL2MIlR6Lt0KlM7fOFsutuXcdglcOq6WvLnYXgPQSh0Mx6tO1KCAE8MxbHSOSTWDoUxRq+l3DA==", + "version": "10.17.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.9.tgz", + "integrity": "sha512-+6VygF9LbG7Gaqeog2G7u1+RUcmo0q1rI+2ZxdIg2fAUngk5Vz9fOCHXdloNUOHEPd1EuuOpL5O0CdgN9Fx5UQ==", "optional": true }, "acorn": { @@ -8719,9 +8719,9 @@ } }, "particle-usb": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/particle-usb/-/particle-usb-0.5.1.tgz", - "integrity": "sha512-IObi7aabsWLUpRorIvvFx2pWezmYaHbiJ07kKsykorSCwT/MpgCrdD0RfIJZjn4dsUqzJO83SpWeHqhiZzQ6ig==", + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/particle-usb/-/particle-usb-0.5.2.tgz", + "integrity": "sha512-Tj7ntei6O0WrCeHe7WHGaMql5kffEpb3eG0lpbJEVPTx5xwljqwB7ZHTCxzmTtrmP0ioJ88yyOs3MAfXXtjhAw==", "optional": true, "requires": { "@babel/runtime-corejs2": "^7.3.4", diff --git a/package.json b/package.json index e1e9b7ad2..5ebbbf72a 100644 --- a/package.json +++ b/package.json @@ -102,7 +102,7 @@ "sinon-chai": "^3.3.0" }, "optionalDependencies": { - "particle-usb": "^0.5.1", + "particle-usb": "^0.5.2", "serialport": "^8.0.5" }, "engines": { From d26a3a3d6c44fcdaef9108e5e9ee4b8ec10e0dbd Mon Sep 17 00:00:00 2001 From: busticated Date: Fri, 13 Dec 2019 15:35:10 -0800 Subject: [PATCH 2/3] update binary-version-reader to v0.7.4 --- npm-shrinkwrap.json | 44 ++++++-------------------------------------- package.json | 2 +- 2 files changed, 7 insertions(+), 39 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index cdf45a8b2..2f9e5cca7 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -2636,7 +2636,8 @@ "assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==" + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true }, "assign-symbols": { "version": "1.0.0", @@ -2841,47 +2842,14 @@ "optional": true }, "binary-version-reader": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/binary-version-reader/-/binary-version-reader-0.6.5.tgz", - "integrity": "sha512-/7qMz4ta+/5LGz3aalMNWXXGLAeOgvs8Oscl+0f2yAgJBSxuhU6OuY2tWMysMiLM4gIP0ka9MnE8chx8//9OBw==", + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/binary-version-reader/-/binary-version-reader-0.7.4.tgz", + "integrity": "sha512-H0ToVv41KD57gC0tjWzIpMTsqnrJwSgh7Tao5GXGD/jl1PaILHnO4nPHf42PEWUxhL6zmhwlm5hpYaZkNLtZPw==", "requires": { "buffer-crc32": "^0.2.5", - "chai": "^3.5.0", "h5.buffers": "^0.1.1", "when": "^3.7.3", - "xtend": "^4.0.0" - }, - "dependencies": { - "chai": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-3.5.0.tgz", - "integrity": "sha1-TQJjewZ/6Vi9v906QOxW/vc3Mkc=", - "requires": { - "assertion-error": "^1.0.1", - "deep-eql": "^0.1.3", - "type-detect": "^1.0.0" - } - }, - "deep-eql": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz", - "integrity": "sha1-71WKyrjeJSBs1xOQbXTlaTDrafI=", - "requires": { - "type-detect": "0.1.1" - }, - "dependencies": { - "type-detect": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz", - "integrity": "sha1-C6XsKohWQORw6k6FBZcZANrFiCI=" - } - } - }, - "type-detect": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-1.0.0.tgz", - "integrity": "sha1-diIXzAbbJY7EiQihKY6LlRIejqI=" - } + "xtend": "^4.0.2" } }, "binaryextensions": { diff --git a/package.json b/package.json index 5ebbbf72a..a26e59945 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ } ], "dependencies": { - "binary-version-reader": "^0.6.5", + "binary-version-reader": "^0.7.4", "chalk": "^2.4.2", "cli-spinner": "^0.2.10", "cli-table": "^0.3.1", From 0e413267f95cb1789614e601d323fd8f3c581a96 Mon Sep 17 00:00:00 2001 From: busticated Date: Fri, 13 Dec 2019 15:38:36 -0800 Subject: [PATCH 3/3] add specs and lookup keys to support B5 SoM --- settings.js | 7 +-- src/cmd/cloud.js | 1 + src/cmd/constants.js | 1 + src/lib/deviceSpecs/specifications.js | 67 ++++++++++++++++++++++++++- src/lib/utilities.js | 1 + 5 files changed, 73 insertions(+), 4 deletions(-) diff --git a/settings.js b/settings.js index ee6c65ae0..2b675e257 100644 --- a/settings.js +++ b/settings.js @@ -80,9 +80,10 @@ var settings = { 12: 'Argon', 13: 'Boron', 14: 'Xenon', - 22: 'A Som', - 23: 'B Som', - 24: 'X Som', + 22: 'A SoM', + 23: 'B SoM', + 24: 'X SoM', + 25: 'B5 SoM', 88: 'Duo', 103: 'Bluz' }, diff --git a/src/cmd/cloud.js b/src/cmd/cloud.js index 2975301cd..953614571 100644 --- a/src/cmd/cloud.js +++ b/src/cmd/cloud.js @@ -33,6 +33,7 @@ const PLATFORMS = extend(utilities.knownPlatforms(), { 'a-series': 22, 'b-series': 23, 'x-series': 24, + 'b5som': 25, 'o': 82, 'd': 88, 'bl': 103, diff --git a/src/cmd/constants.js b/src/cmd/constants.js index 43939d9b0..d359b8360 100644 --- a/src/cmd/constants.js +++ b/src/cmd/constants.js @@ -11,6 +11,7 @@ module.exports.platformsById = { 22: 'A SoM', 23: 'B SoM', 24: 'X SoM', + 25: 'B5 SoM', 31: 'Raspberry Pi', 88: 'Duo', 103: 'Bluz' diff --git a/src/lib/deviceSpecs/specifications.js b/src/lib/deviceSpecs/specifications.js index 8f46a9c05..53984d33e 100644 --- a/src/lib/deviceSpecs/specifications.js +++ b/src/lib/deviceSpecs/specifications.js @@ -679,7 +679,6 @@ const specs = { defaultProtocol: 'udp', productId: 14, }, - '2b04:d018': { productName: 'X SoM', tcpServerKey: { @@ -745,6 +744,72 @@ const specs = { }, defaultProtocol: 'udp', productId: 24, + }, + '2b04:d019': { + productName: 'B5 SoM', + tcpServerKey: { + address: '2082', + size: 512, + format: 'der', + alt: '1', + alg: 'rsa', + addressOffset: 384, + portOffset: 450 + }, + udpServerKey: { + address: '3298', + size: 320, + format: 'der', + alt: '1', + alg: 'ec', + variant: 'gen3', + addressOffset: 192, + portOffset: 258 + }, + tcpPrivateKey: { + address: '34', + size: 612, + format: 'der', + alt: '1', + alg: 'rsa' + }, + udpPrivateKey: { + address: '3106', + size: 192, + format: 'der', + alt: '1', + alg: 'ec' + }, + userFirmware: { + address: '0x000D4000', + alt: '0' + }, + systemFirmwareOne: { + address: '0x00030000', + alt: '0' + }, + otaRegion: { + address: '0x80289000', + alt: '2' + }, + otaFlag: { + address: '1753', + alt: '1', + size: '1' + }, + radioStack: { + address: '0x00001000', + alt: '0' + }, + knownApps: { + }, + serial: { + vid: '2b04', + pid: 'c019', + serialNumber: 'Particle_B_SoM' + }, + defaultProtocol: 'udp', + productId: 25, } }; diff --git a/src/lib/utilities.js b/src/lib/utilities.js index b6e37fbc7..70c56ecbe 100644 --- a/src/lib/utilities.js +++ b/src/lib/utilities.js @@ -342,6 +342,7 @@ module.exports = { 'asom': 22, 'bsom': 23, 'xsom': 24, + 'b5som': 25, 'oak': 82, 'duo': 88, 'bluz': 103,