Skip to content
Open
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
10 changes: 8 additions & 2 deletions app/StackChan/Utils/BlufiUtil.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,14 @@ class BlufiUtil: NSObject,CBCentralManagerDelegate,CBPeripheralDelegate {

var wifiSetCharacteristicCall: ((Data) -> Void)? = nil

/// Service UUID
private let targetServiceUUIDs: [CBUUID] = [CBUUID(string: "e2e5e5e0-1234-5678-1234-56789abcdef0")]
/// Service UUIDs. The firmware advertises two distinct 128-bit UUIDs:
/// - Base (e2e5e5e0-...) exposed by startBleServer() — runtime control
/// - Alt (e2e5e5ff-...) exposed by startAppConfigServer() — pairing/Wi-Fi setup
/// Scanning for both lets the app find the device in both modes.
private let targetServiceUUIDs: [CBUUID] = [
CBUUID(string: "e2e5e5e0-1234-5678-1234-56789abcdef0"),
CBUUID(string: "e2e5e5ff-1234-5678-1234-56789abcdef0"),
]

private let scanOptions: [String: Any] = [
CBCentralManagerScanOptionAllowDuplicatesKey: true
Expand Down