Skip to content

Commit

Permalink
Merge branch 'master' into log-shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
gniezen authored Jan 7, 2025
2 parents ebca21f + 5e76ac7 commit dea68bd
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
16 changes: 16 additions & 0 deletions lib/core/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ device.detect = (driverId, options, cb) => {
hidDevice: options.hidDevice,
};

device.log(`Found ${devdata.hidDevice.productName}`);
device.log(`USB Vendor ID: 0x${devdata.hidDevice.vendorId.toString(16).toUpperCase().padStart(4, '0')}, USB Product ID: 0x${devdata.hidDevice.productId.toString(16).toUpperCase().padStart(4, '0')}`);

if ((driverId === 'AbbottFreeStyleLibre')
&& devdata.hidDevice.vendorId === 6753 && devdata.hidDevice.productId === 14672) {
// This is an attempt to upload a Libre 2, which is not yet supported
Expand Down Expand Up @@ -327,6 +330,9 @@ device.detect = (driverId, options, cb) => {
throw new Error('No device was selected.');
}

device.log(`Found ${webUSBDevice.manufacturerName} ${webUSBDevice.productName}`);
device.log(`USB Vendor ID: 0x${webUSBDevice.vendorId.toString(16).toUpperCase().padStart(4, '0')}, USB Product ID: 0x${webUSBDevice.productId.toString(16).toUpperCase().padStart(4, '0')}`);

devdata.usbDevice = webUSBDevice;

device.deviceInfoCache[driverId] = _.cloneDeep(devdata);
Expand Down Expand Up @@ -383,6 +389,16 @@ device.detect = (driverId, options, cb) => {
productId: usbProductId,
};

device.log(`USB Vendor ID: 0x${usbVendorId.toString(16).toUpperCase().padStart(4, '0')}, USB Product ID: 0x${usbProductId.toString(16).toUpperCase().padStart(4, '0')}`);

for (let j = 0; j < driverManifest.usb.length; j++) {
if (driverManifest.usb[j].vendorId === usbVendorId
&& driverManifest.usb[j].productId === usbProductId
&& driverManifest.usb[j].driver != null) {
device.log('USB Driver:', driverManifest.usb[j].driver.toUpperCase());
}
}

if (driverId === 'Dexcom' && devdata.vendorId === 8867 && devdata.productId === 72) {
// This is an attempt to upload a Dexcom G7, which is not yet supported
return cb('E_G7_UNSUPPORTED');
Expand Down
10 changes: 5 additions & 5 deletions lib/core/driverManifests.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const driverManifests = {
bitrate: 19200,
usb: [
{ vendorId: 6753, productId: 13328, driver: 'tusb3410' }, // Abbott cable
{ vendorId: 1027, productId: 24577 }, // FTDI cable
{ vendorId: 1027, productId: 24577, driver: 'ftdi' }, // FTDI cable
],
},
AbbottFreeStyleLibre: {
Expand Down Expand Up @@ -126,7 +126,7 @@ const driverManifests = {
usb: [
{ vendorId: 1027, productId: 24577, driver: 'ftdi' }, // FTDI cable
{ vendorId: 1659, productId: 8963, driver: 'pl2303' },
{ vendorId: 6790, productId: 29987 }, // CH340 cable
{ vendorId: 6790, productId: 29987, driver: 'ch340' }, // CH340 cable
],
},
OneTouchUltra2: {
Expand All @@ -137,7 +137,7 @@ const driverManifests = {
usb: [
{ vendorId: 1027, productId: 24577, driver: 'ftdi' }, // FTDI cable
{ vendorId: 1659, productId: 8963, driver: 'pl2303' },
{ vendorId: 6790, productId: 29987 }, // CH340 cable
{ vendorId: 6790, productId: 29987, driver: 'ch340' }, // CH340 cable
],
},
TrueMetrix: {
Expand Down Expand Up @@ -185,7 +185,7 @@ const driverManifests = {
stopBits: 2,
usb: [
{ vendorId: 3835, productId: 17, driver: 'cp2102' }, // Arkray cable
{ vendorId: 1027, productId: 24577 }, // FTDI cable
{ vendorId: 1027, productId: 24577, driver: 'ftdi' }, // FTDI cable
],
},
GlucocardShine: {
Expand Down Expand Up @@ -215,7 +215,7 @@ const driverManifests = {
stopBits: 2,
usb: [
{ vendorId: 3835, productId: 17, driver: 'cp2102' }, // Arkray cable
{ vendorId: 1027, productId: 24577 }, // FTDI cable
{ vendorId: 1027, productId: 24577, driver: 'ftdi' }, // FTDI cable
],
},
AbbottLibreView: {
Expand Down

0 comments on commit dea68bd

Please sign in to comment.