@mentra/bluetooth-sdk 3.2.1-beta.379 → 3.2.1-beta.392
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/java/com/mentra/bluetoothsdk/DeviceManager.kt +7 -3
- package/android/src/main/java/com/mentra/bluetoothsdk/GeneratedChangelogCatalog.kt +2 -2
- package/android/src/main/java/com/mentra/bluetoothsdk/GeneratedReleaseMetadata.kt +5 -5
- package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/G1.kt +2 -2
- package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/G2.kt +8 -7
- package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/MentraLive.kt +10 -8
- package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/MentraNex.kt +12 -8
- package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/SelectedDeviceAddress.kt +17 -0
- package/android/src/test/java/com/mentra/bluetoothsdk/DeviceIdentityPairingTest.kt +59 -0
- package/android/src/test/java/com/mentra/bluetoothsdk/sgcs/G1PairingTest.kt +105 -0
- package/android/src/test/java/com/mentra/bluetoothsdk/sgcs/G2PairingTargetTest.kt +90 -0
- package/android/src/test/java/com/mentra/bluetoothsdk/sgcs/MentraLivePairingTargetTest.kt +65 -0
- package/android/src/test/java/com/mentra/bluetoothsdk/sgcs/MentraNexPairingTest.kt +151 -0
- package/android/src/test/java/com/mentra/bluetoothsdk/sgcs/SelectedDeviceAddressTest.kt +27 -0
- package/build/generated/changelogCatalog.d.ts +2 -2
- package/build/generated/changelogCatalog.js +2 -2
- package/build/generated/changelogCatalog.js.map +1 -1
- package/build/generated/releaseMetadata.js +5 -5
- package/build/generated/releaseMetadata.js.map +1 -1
- package/ios/Source/BluetoothSdkDefaults.swift +1 -1
- package/ios/Source/DeviceManager.swift +7 -3
- package/ios/Source/GeneratedChangelogCatalog.swift +2 -2
- package/ios/Source/GeneratedReleaseMetadata.swift +5 -5
- package/ios/Source/sgcs/G1.swift +21 -6
- package/ios/Source/sgcs/G1ConnectionTarget.swift +13 -0
- package/ios/Source/sgcs/Mach1.swift +19 -7
- package/ios/Source/sgcs/MentraNex.swift +8 -31
- package/ios/Source/sgcs/NexConnectionTarget.swift +15 -0
- package/ios/Source/sgcs/VuzixConnectionTarget.swift +15 -0
- package/ios/Tests/DeviceIdentityPairingTests.swift +49 -0
- package/ios/Tests/SGCConnectionTargetTests.swift +48 -0
- package/package.json +2 -2
- package/src/generated/changelogCatalog.ts +2 -2
- package/src/generated/releaseMetadata.ts +5 -5
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
@testable import MentraBluetoothSDK
|
|
2
|
+
import XCTest
|
|
3
|
+
|
|
4
|
+
final class SGCConnectionTargetTests: XCTestCase {
|
|
5
|
+
func testG1RejectsAnotherPairsLegacyUUID() {
|
|
6
|
+
XCTAssertFalse(G1ConnectionTarget.matchesCachedPeripheral(name: "Even G1_12_L_123456", searchID: "_47_", cachedSearchID: nil))
|
|
7
|
+
XCTAssertTrue(G1ConnectionTarget.matchesCachedPeripheral(name: "Even G1_47_L_123456", searchID: "_47_", cachedSearchID: nil))
|
|
8
|
+
XCTAssertFalse(G1ConnectionTarget.matchesCachedPeripheral(name: "Even G1_470_R_123456", searchID: "_47_", cachedSearchID: nil))
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
func testG1NamelessBackgroundReconnectRequiresRecordedTarget() {
|
|
12
|
+
XCTAssertTrue(G1ConnectionTarget.matchesCachedPeripheral(name: nil, searchID: "_47_", cachedSearchID: "_47_"))
|
|
13
|
+
XCTAssertFalse(G1ConnectionTarget.matchesCachedPeripheral(name: nil, searchID: "_47_", cachedSearchID: "_12_"))
|
|
14
|
+
XCTAssertFalse(G1ConnectionTarget.matchesCachedPeripheral(name: nil, searchID: "_47_", cachedSearchID: nil))
|
|
15
|
+
XCTAssertFalse(G1ConnectionTarget.matchesCachedPeripheral(name: "Even G1_12_L_123456", searchID: "_47_", cachedSearchID: "_47_"))
|
|
16
|
+
XCTAssertFalse(G1ConnectionTarget.matchesCachedPeripheral(name: nil, searchID: "NOT_SET", cachedSearchID: "NOT_SET"))
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
func testNexExplicitSelectionExcludesSavedAndPreferredFallbacks() {
|
|
20
|
+
XCTAssertFalse(nex(name: "Nex1-old", target: "Nex1-new"))
|
|
21
|
+
XCTAssertFalse(nex(name: "Nex1-new-extra", target: "Nex1-new"))
|
|
22
|
+
XCTAssertTrue(nex(name: "Nex1-new", target: "Nex1-new"))
|
|
23
|
+
XCTAssertFalse(nex(name: "Nex1-old", target: ""))
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
func testNexDiscoveryNeverConnectsAndSavedReconnectStillWorks() {
|
|
27
|
+
XCTAssertFalse(nex(name: "Nex1-old", target: nil, discovery: true))
|
|
28
|
+
XCTAssertFalse(nex(name: "Nex1-new", target: "Nex1-new", discovery: true))
|
|
29
|
+
XCTAssertTrue(nex(name: "Nex1-old", target: nil))
|
|
30
|
+
XCTAssertTrue(nex(name: "Nex1-renamed", target: nil))
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
func testVuzixCurrentLinkMustMatchTheSelectedBracketedID() {
|
|
34
|
+
XCTAssertTrue(VuzixConnectionTarget.matches(name: "Vuzix Z100 [abc123]", target: "abc123"))
|
|
35
|
+
XCTAssertTrue(VuzixConnectionTarget.matches(name: "Vuzix Z100 [abc123]", target: "Vuzix Z100 [abc123]"))
|
|
36
|
+
XCTAssertFalse(VuzixConnectionTarget.matches(name: "Vuzix Z100 [old123]", target: "abc123"))
|
|
37
|
+
XCTAssertFalse(VuzixConnectionTarget.matches(name: nil, target: "abc123"))
|
|
38
|
+
XCTAssertFalse(VuzixConnectionTarget.matches(name: "", target: ""))
|
|
39
|
+
XCTAssertEqual(VuzixConnectionTarget.identifier("abc123"), "abc123")
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
private func nex(name: String, target: String?, discovery: Bool = false) -> Bool {
|
|
43
|
+
NexConnectionTarget.shouldConnect(
|
|
44
|
+
name: name, target: target, discoveryOnly: discovery,
|
|
45
|
+
savedName: "Nex1-old", preferredID: "old", discoveredID: "old"
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mentra/bluetooth-sdk",
|
|
3
|
-
"version": "3.2.1-beta.
|
|
3
|
+
"version": "3.2.1-beta.392",
|
|
4
4
|
"description": "SDK for communicating with smart glasses",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"react-native": "src/index.ts",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"registry": "https://registry.npmjs.org/"
|
|
115
115
|
},
|
|
116
116
|
"dependencies": {
|
|
117
|
-
"@mentra/cloud-protocol": "3.2.1-beta.
|
|
117
|
+
"@mentra/cloud-protocol": "3.2.1-beta.392"
|
|
118
118
|
},
|
|
119
119
|
"devDependencies": {
|
|
120
120
|
"@types/node": "^25.9.3",
|
|
@@ -3,11 +3,11 @@ export const GENERATED_RELEASE_CHANGELOGS = Object.freeze(
|
|
|
3
3
|
[
|
|
4
4
|
{
|
|
5
5
|
"version": "3.2.1",
|
|
6
|
-
"markdown": "
|
|
6
|
+
"markdown": "- Mentra Miniapp SDK: `session.stream.preview({source: \"call\"})` and the `<StreamPreview>` component (from `@mentra/miniapp/react`) show the live video of a call your miniapp owns inside its UI. Requires the `CAMERA` permission; the lease survives the UI closing and ends with `handle.stop()` or the meeting. See [Stream preview](https://docs.mentraglass.com/app-devs/core-concepts/stream-preview)."
|
|
7
7
|
},
|
|
8
8
|
{
|
|
9
9
|
"version": "3.2.0",
|
|
10
|
-
"markdown": "
|
|
10
|
+
"markdown": "- Breaking Bluetooth SDK change: `forgetWifiNetwork(ssid)` now returns `WifiForgetResult` instead of `WifiStatusChangeEvent`. Migrate status-only consumers to the semantic `outcome`; the requested network remains `ssid`, while optional post-command connectivity is reported by `connected`, `currentSsid`, and `localIp`."
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
"version": "3.1.1",
|
|
@@ -12,9 +12,9 @@ export interface BluetoothSdkReleaseMetadata {
|
|
|
12
12
|
export const BLUETOOTH_SDK_RELEASE_METADATA: Readonly<BluetoothSdkReleaseMetadata> = Object.freeze({
|
|
13
13
|
"schemaVersion": 1,
|
|
14
14
|
"familyBaseVersion": "3.2.1",
|
|
15
|
-
"releaseIdentity": "3.2.1-beta.
|
|
16
|
-
"releaseSetId": "mentra-3.2.1-beta.
|
|
17
|
-
"sourceCommit": "
|
|
18
|
-
"otaManifestUrl": "https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.2.1/mentra-live-ota-3.2.1-beta.
|
|
19
|
-
"otaManifestSha256": "
|
|
15
|
+
"releaseIdentity": "3.2.1-beta.392",
|
|
16
|
+
"releaseSetId": "mentra-3.2.1-beta.392",
|
|
17
|
+
"sourceCommit": "bbae280bb8e4bc806c5a48132da53e1142dacad9",
|
|
18
|
+
"otaManifestUrl": "https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.2.1/mentra-live-ota-3.2.1-beta.392.json",
|
|
19
|
+
"otaManifestSha256": "054af4bc31556c705a80e3dd8a0af77383d7af984c2f6fd236c471c4b1d001ff"
|
|
20
20
|
})
|