Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,14 @@ public static final class MASS_STORAGE_DEVICE {
"verisense",
};

/** A Verisense in NeuroLynQ mode says so in its USB product string, e.g.
* "Verisense-NeuroLynQ-01-2511210195BC" (verisense-firmware hal_usb_cdc.c,
* USB_PRODUCT_NAME_MODE_MARKER). It keeps the stock VID/PID, so this is the only
* way a host can tell it from a stock unit (DEV-1047). */
public static final String[] VERISENSE_NEUROLYNQ = new String[] {
"-NeuroLynQ-",
};

public static final String[] SHIMMER3R_DFU_DEVICE_BUS_DESCRITION = new String[] { "DFU in HS Mode" };

public static final class SERVICE_DESCRIPTION {
Expand Down Expand Up @@ -351,6 +359,14 @@ public static boolean isSpanNrf52840(String usbVendorId, String usbProductString
&& usbProductString!=null
&& UtilShimmer.stringContainsItemFromListUpperCaseCheck(usbProductString, SH_SEARCH.SPAN_NRF52840);
}

/** Whether a Verisense is in NeuroLynQ mode, from its USB product string (iProduct).
* A NeuroLynQ-mode Verisense serves the ShimmerGQ $ dock protocol and not its native
* one, so the two need different drivers. */
public static boolean isVerisenseNeuroLynQ(String usbProductString) {
return usbProductString!=null
&& UtilShimmer.stringContainsItemFromListUpperCaseCheck(usbProductString, SH_SEARCH.VERISENSE_NEUROLYNQ);
}

public static DEVICE_TYPE getDeviceTypeFromLabel(String label){
for (DEVICE_TYPE deviceType:DEVICE_TYPE.values()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package com.shimmerresearch.driverUtilities;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import org.junit.Test;

/**
* How the host tells a NeuroLynQ-mode Verisense from a stock one (DEV-1047).
* <p>
* Both enumerate as 1915:520F. The NeuroLynQ firmware adds "-NeuroLynQ" after the name
* prefix in its USB product string, whichever prefix it has, and nothing else changes.
* The first string is the bench node's on 2026-09-24.
*/
public class API_00013_VerisenseNeuroLynQMarkerTest {

@Test
public void recognisesTheNeuroLynQMarker() {
assertTrue(HwDriverShimmerDeviceDetails.isVerisenseNeuroLynQ("Verisense-NeuroLynQ-01-2511210195BC"));
}

/** Without a passkey ID, and with the factory string an unprovisioned unit reports */
@Test
public void recognisesItWithoutAPasskeyOrAProductionConfig() {
assertTrue(HwDriverShimmerDeviceDetails.isVerisenseNeuroLynQ("Verisense-NeuroLynQ-2511210195BC"));
assertTrue(HwDriverShimmerDeviceDetails.isVerisenseNeuroLynQ("Verisense-NeuroLynQ-FFFFFFFF95BC"));
}

/** The marker follows whatever name prefix the production config carries */
@Test
public void recognisesItAfterAProvisionedPrefix() {
assertTrue(HwDriverShimmerDeviceDetails.isVerisenseNeuroLynQ("Acme-NeuroLynQ-01-2511210195BC"));
}

@Test
public void aStockVerisenseIsNotNeuroLynQ() {
assertFalse(HwDriverShimmerDeviceDetails.isVerisenseNeuroLynQ("Verisense-01-2511210195BC"));
assertFalse(HwDriverShimmerDeviceDetails.isVerisenseNeuroLynQ("Verisense-FFFFFFFF95BC"));
}

/** The nRF52840 Span says NeuroLynQ too, but it is a Span, not a node */
@Test
public void theSpanIsNotANode() {
assertFalse(HwDriverShimmerDeviceDetails.isVerisenseNeuroLynQ("NeuroLynQ Span"));
}

@Test
public void noProductStringIsNotNeuroLynQ() {
assertFalse(HwDriverShimmerDeviceDetails.isVerisenseNeuroLynQ(null));
assertFalse(HwDriverShimmerDeviceDetails.isVerisenseNeuroLynQ(""));
}
}