Skip to content

Commit 4865bf5

Browse files
committed
Version 5.2.6
1 parent a8f4773 commit 4865bf5

71 files changed

Lines changed: 1741 additions & 483 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

App/Application/Info.plist

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>CFBundleCatalogVersionString</key>
6+
<string>5.3.0</string>
57
<key>CFBundleDevelopmentRegion</key>
68
<string>$(DEVELOPMENT_LANGUAGE)</string>
79
<key>CFBundleDisplayName</key>
@@ -19,9 +21,9 @@
1921
<key>CFBundlePackageType</key>
2022
<string>APPL</string>
2123
<key>CFBundleShortVersionString</key>
22-
<string>5.2.0</string>
24+
<string>5.2.6</string>
2325
<key>CFBundleVersion</key>
24-
<string>187</string>
26+
<string>203</string>
2527
<key>ENVIRONMENT</key>
2628
<string>$(APP_ENVIRONMENT)</string>
2729
<key>ITSAppUsesNonExemptEncryption</key>
@@ -39,6 +41,8 @@
3941
<string>Required to send anonymous usage analytics and for sending device position to the web cloud dashboard.</string>
4042
<key>NSUserTrackingUsageDescription</key>
4143
<string>Required to collect data - which firmware and BLE peripheral are mainly used.</string>
44+
<key>UIDesignRequiresCompatibility</key>
45+
<true/>
4246
<key>UILaunchStoryboardName</key>
4347
<string>LaunchScreen</string>
4448
<key>UIRequiredDeviceCapabilities</key>

App/Controllers/Node/List/Cells/NodeCell.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class NodeCell: BaseTableViewCell {
2525

2626
@IBOutlet weak var customModelLabel: UILabel!
2727
@IBOutlet weak var maturityLabel: UILabel!
28-
28+
2929
@IBOutlet weak var nodeRunningSecondLabel: UILabel!
3030
@IBOutlet weak var nodeRunningThirdInfoLabel: UILabel!
3131

@@ -51,4 +51,9 @@ class NodeCell: BaseTableViewCell {
5151
containerView.backgroundColor = .white
5252
containerView.applyShadow()
5353
}
54+
55+
override public func prepareForReuse() {
56+
super.prepareForReuse()
57+
self.maturityLabel.isHidden = true
58+
}
5459
}

App/Controllers/Node/List/Cells/NodeViewModel.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ class NodeViewModel: BaseCellViewModel<Node, NodeCell> {
8989
if firmware.maturity != Maturity.release {
9090
view.maturityLabel.isHidden = false
9191
view.maturityLabel.text = firmware.maturity?.description
92+
} else {
93+
view.maturityLabel.isHidden = true
9294
}
9395

9496
view.firmwareLabel.isHidden = false

App/Controllers/Node/List/NodeListViewController.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,13 @@ final class NodeListViewController: BaseViewController<NodeListDelegate, NodeLis
109109
BlueManager.shared.discoveryStop()
110110
}
111111

112-
override func viewDidAppear(_ animated: Bool) {
113-
super.viewDidAppear(animated)
114-
}
115-
116-
override func configureView() {
117-
super.configureView()
118-
}
112+
// override func viewDidAppear(_ animated: Bool) {
113+
// super.viewDidAppear(animated)
114+
// }
115+
//
116+
// override func configureView() {
117+
// super.configureView()
118+
// }
119119

120120
deinit {
121121
BlueManager.shared.removeDelegate(self)

BlueMS.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 54;
6+
objectVersion = 77;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -374,7 +374,7 @@
374374
BBE68871B275F8DB25D16E52 /* XCLocalSwiftPackageReference "Packages/STUserProfiling_iOS" */,
375375
BEC3400CD5A8D47AA97649C6 /* XCLocalSwiftPackageReference "Packages/STWelcome_iOS" */,
376376
);
377-
preferredProjectObjectVersion = 54;
377+
preferredProjectObjectVersion = 77;
378378
projectDirPath = "";
379379
projectRoot = "";
380380
targets = (

Packages/STBlueSDK_iOS/Sources/STBlueSDK/Advertise/AdvertiseParser.swift

Lines changed: 1 addition & 187 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ open class AdvertiseParser: AdvertiseFilter {
4949
}
5050

5151
let deviceId = vendorData[1 + offset].nodeId
52-
let deviceType = getNodeType(deviceId: deviceId, protocolVersion: protocolVersion)
52+
let deviceType = NodeTypeMapper.getNodeType(deviceId: deviceId, protocolVersion: protocolVersion)
5353
let isSleeping = vendorData[1 + offset].isSleeping
5454
let hasGeneralPourpose = vendorData[1 + offset].hasGeneralPurpose
5555
let featureMap = vendorData.extractUInt32(fromOffset: 2 + offset, endian: .big)
@@ -76,192 +76,6 @@ open class AdvertiseParser: AdvertiseFilter {
7676
}
7777
}
7878

79-
extension AdvertiseParser {
80-
public func getNodeType(deviceId: UInt8, protocolVersion: UInt8) -> NodeType {
81-
if protocolVersion == 0x01 {
82-
//SDK V1
83-
switch deviceId {
84-
case 0x00:
85-
return .generic
86-
case 0x01:
87-
return .stevalWesu1
88-
case 0x02:
89-
return .sensorTile
90-
case 0x03:
91-
return .blueCoin
92-
case 0x04:
93-
return .stEvalIDB008VX
94-
case 0x05:
95-
return .stEvalBCN002V1
96-
case 0x06:
97-
return .sensorTileBox
98-
case 0x07:
99-
return .discoveryIOT01A
100-
case 0x08:
101-
return .stEvalSTWINKIT1
102-
case 0x09:
103-
return .stEvalSTWINKT1B
104-
case 0x0A:
105-
return .bL475eIot01A
106-
case 0x0B:
107-
return .bU585iIot02A
108-
case 0x0C:
109-
return .astra
110-
case 0x0D:
111-
return .sensorTileBoxPro
112-
case 0x0E:
113-
return .stWinBox
114-
case 0x0F:
115-
return .proteus
116-
case 0x10:
117-
return .stdesCBMLoRaBLE
118-
case 0x11:
119-
return .sensorTileBoxProB
120-
case 0x12:
121-
return .stWinBoxB
122-
case 0x13:
123-
return .sensorTileBoxProC
124-
case 0xC3:
125-
return .robKit1
126-
case 0x80:
127-
return .nucleo
128-
case 0x7F:
129-
return .nucleoF401RE
130-
case 0x7E:
131-
return .nucleoL476RG
132-
case 0x7D:
133-
return .nucleoL053R8
134-
case 0x7C:
135-
return .nucleoF446RE
136-
case 0x7B:
137-
return .nucleoU575ZIQ
138-
case 0x7A:
139-
return .nucleoU5A5ZJQ
140-
case 0x8D:
141-
return .nucleoWB0X
142-
case 0x8E:
143-
return .wba65RiNucleoBoard
144-
case 0x8F:
145-
return .wb05NucleoBoard
146-
case 0x90:
147-
return .wba2NucleoBoard
148-
case 0x91:
149-
return .wba5mWpanBoard
150-
case 0x92:
151-
return .stm32wba65iDk1Board
152-
case 0x9A:
153-
return .stm67w61MNucleoBoard
154-
case 0x86:
155-
return .wbOtaBoard
156-
case 0x81...0x8A:
157-
return .wb55NucleoBoard
158-
case 0x8B...0x8C:
159-
return .wba55CGNucleoBoard
160-
default:
161-
return .generic
162-
}
163-
} else {
164-
//SDK V2
165-
switch deviceId {
166-
case 0x00:
167-
return .generic
168-
case 0x01:
169-
return .stevalWesu1
170-
case 0x02:
171-
return .sensorTile
172-
case 0x03:
173-
return .blueCoin
174-
case 0x04:
175-
return .stEvalIDB008VX
176-
case 0x05:
177-
return .stEvalBCN002V1
178-
case 0x06:
179-
return .sensorTileBox
180-
case 0x07:
181-
return .discoveryIOT01A
182-
case 0x08:
183-
return .stEvalSTWINKIT1
184-
case 0x09:
185-
return .stEvalSTWINKT1B
186-
case 0x0A:
187-
return .bL475eIot01A
188-
case 0x0B:
189-
return .bU585iIot02A
190-
case 0x0C:
191-
return .astra
192-
case 0x0D:
193-
return .sensorTileBoxPro
194-
case 0x0E:
195-
return .stWinBox
196-
case 0x0F:
197-
return .proteus
198-
case 0x10:
199-
return .stdesCBMLoRaBLE
200-
case 0x11:
201-
return .sensorTileBoxProB
202-
case 0x12:
203-
return .stWinBoxB
204-
case 0x13:
205-
return .sensorTileBoxProC
206-
case 0xC3:
207-
return .robKit1
208-
case 0x80:
209-
return .nucleo
210-
case 0x7F:
211-
return .nucleoF401RE
212-
case 0x7E:
213-
return .nucleoL476RG
214-
case 0x7D:
215-
return .nucleoL053R8
216-
case 0x7C:
217-
return .nucleoF446RE
218-
case 0x7B:
219-
return .nucleoU575ZIQ
220-
case 0x7A:
221-
return .nucleoU5A5ZJQ
222-
223-
//WB boards range 0x81->0x86
224-
case 0x81:
225-
return .wb55NucleoBoard
226-
case 0x82:
227-
return .stm32wb5mmDkBoard
228-
case 0x83:
229-
return .wb55UsbDoungleBoard
230-
case 0x84:
231-
return .wb15CCNucleoBoard
232-
case 0x85:
233-
return .wb1mWpan1Board
234-
case 0x86:
235-
return .wbOtaBoard
236-
237-
//WBA boards range 0x8B -> 0x8C
238-
case 0x8B:
239-
return .wba55CGNucleoBoard
240-
case 0x8C:
241-
return .stm32Wba55gDk1Board
242-
case 0x8D:
243-
return .nucleoWB0X
244-
case 0x8E:
245-
return .wba65RiNucleoBoard
246-
case 0x8F:
247-
return .wb05NucleoBoard
248-
249-
case 0x90:
250-
return .wba2NucleoBoard
251-
case 0x91:
252-
return .wba5mWpanBoard
253-
case 0x92:
254-
return .stm32wba65iDk1Board
255-
case 0x9A:
256-
return .stm67w61MNucleoBoard
257-
258-
default:
259-
return .generic
260-
}
261-
}
262-
}
263-
}
264-
26579
fileprivate extension UInt8 {
26680
private static let nucleoBitMask: UInt8 = 0x80
26781
private static let isSleepingBitMask: UInt8 = 0x70
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//
2+
// LeAdvertiseFilter.swift
3+
//
4+
// Copyright (c) 2025 STMicroelectronics.
5+
// All rights reserved.
6+
//
7+
// This software is licensed under terms that can be found in the LICENSE file in
8+
// the root directory of this software component.
9+
// If no LICENSE file comes with this software, it is provided AS-IS.
10+
//
11+
12+
import Foundation
13+
14+
public protocol LeAdvertiseFilter {
15+
16+
/**
17+
* @param data: advertise data from centralManager(_ central: CBCentralManager, didDiscover peripheral: CBPeripheral, advertisementData: [String : Any], rssi RSSI: NSNumber)
18+
* @return nill if the advertise doesn't contain all the needed info, otherwise a info object that is used to build the Lenode
19+
*/
20+
func filter(_ data:[String:Any]) -> LeAdvertiseInfo?
21+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
//
2+
// LeAdvertiseInfo.swift
3+
//
4+
// Copyright (c) 2025 STMicroelectronics.
5+
// All rights reserved.
6+
//
7+
// This software is licensed under terms that can be found in the LICENSE file in
8+
// the root directory of this software component.
9+
// If no LICENSE file comes with this software, it is provided AS-IS.
10+
//
11+
12+
import Foundation
13+
14+
public protocol LeAdvertiseInfo {
15+
var name: String? { get }
16+
var address: String? { get }
17+
var deviceId: UInt8 { get }
18+
var firmwareId: UInt8 { get }
19+
var protocolId: UInt16 { get }
20+
var payloadData: Data { get set }
21+
var protocolVersion: UInt8 { get }
22+
var type: NodeType { get }
23+
}

0 commit comments

Comments
 (0)