Skip to content

Commit

Permalink
Merge pull request #17 from SiliconLabs/release-2.8.1
Browse files Browse the repository at this point in the history
Release 2.8.1 |  Bug fixes, Matter QR Code Info, Device Version.
  • Loading branch information
mantosh83 committed Apr 10, 2024
2 parents b890166 + 5dc4aa5 commit 0d6b210
Show file tree
Hide file tree
Showing 14 changed files with 338 additions and 106 deletions.
2 changes: 1 addition & 1 deletion Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def shared_pods
pod 'MZTimerLabel', '~> 0.5.4'
pod 'PureLayout', '~> 3.1.4'
pod 'SVProgressHUD', '~> 2.2.5'
pod 'UICircularProgressRing', '~> 4.1.0'
pod 'UICircularProgressRing'
pod 'WYPopoverController', :git => 'https://github.com/sammcewan/WYPopoverController.git'
pod 'XMLDictionary', '~> 1.4.1'
pod 'Realm', '~> 4.3.2'
Expand Down
16 changes: 8 additions & 8 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PODS:
- ActionSheetPicker-3.0 (2.3.1)
- AEXML (4.6.1)
- AEXML (4.7.0)
- ChameleonFramework (2.1.0):
- ChameleonFramework/Default (= 2.1.0)
- ChameleonFramework/Default (2.1.0)
Expand All @@ -17,7 +17,7 @@ PODS:
- MockingbirdFramework (0.20.0)
- MZTimerLabel (0.5.4)
- Nimble (10.0.0)
- OCMock (3.9.1)
- OCMock (3.9.3)
- PureLayout (3.1.9)
- Quick (5.0.1)
- Realm (4.3.2):
Expand All @@ -33,7 +33,7 @@ PODS:
- RxSwift (6.2.0)
- SVProgressHUD (2.2.5)
- SwiftAlgorithms (1.0.0)
- UICircularProgressRing (4.1.0)
- UICircularProgressRing (8.0.0)
- WYPopoverController (0.3.9)
- XMLDictionary (1.4.1)

Expand All @@ -58,7 +58,7 @@ DEPENDENCIES:
- RxCocoa (~> 6.2.0)
- RxSwift (~> 6.2.0)
- SVProgressHUD (~> 2.2.5)
- UICircularProgressRing (~> 4.1.0)
- UICircularProgressRing
- WYPopoverController (from `https://github.com/sammcewan/WYPopoverController.git`)
- XMLDictionary (~> 1.4.1)

Expand Down Expand Up @@ -100,7 +100,7 @@ CHECKOUT OPTIONS:

SPEC CHECKSUMS:
ActionSheetPicker-3.0: 2f5e3fde6b3205a7318f9338e4ec0f373ce7e75c
AEXML: 1e255ecc6597212f97a7454a69ebd3ede64ac1cf
AEXML: 5ff2a4695529348cda96b8b872cf73212ad050d7
ChameleonFramework: d21a3cc247abfe5e37609a283a8238b03575cf64
Charts: ce0768268078eee0336f122c3c4ca248e4e204c5
Crashlytics: a33af323773f73904037dc2e684cd2f0d29f4fe2
Expand All @@ -111,7 +111,7 @@ SPEC CHECKSUMS:
MockingbirdFramework: 54e35fbbb47b806c1a1fae2cf3ef99f6eceb55e5
MZTimerLabel: cd9bfb9304540ef2a9e163384fca9c978f0dbf83
Nimble: 5316ef81a170ce87baf72dd961f22f89a602ff84
OCMock: 9491e4bec59e0b267d52a9184ff5605995e74be8
OCMock: 300b1b1b9155cb6378660b981c2557448830bdc6
PureLayout: 5fb5e5429519627d60d079ccb1eaa7265ce7cf88
Quick: 749aa754fd1e7d984f2000fe051e18a3a9809179
Realm: 5e92902e2875dff4bb0fd02f67bb737c3d5db2bc
Expand All @@ -121,10 +121,10 @@ SPEC CHECKSUMS:
RxSwift: d356ab7bee873611322f134c5f9ef379fa183d8f
SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6
SwiftAlgorithms: 38dda4731d19027fdeee1125f973111bf3386b53
UICircularProgressRing: 5a32c01f54474571b1e66e8fa050c0f83d6d981b
UICircularProgressRing: 19927375b2b21b5fa5fd9582f15ccdef9659da16
WYPopoverController: a9db25ac2841a686acdc0f3a99bdb21545db32f4
XMLDictionary: fa07b6ff422b3a91d47a5de9bc82e3fc04fbd167

PODFILE CHECKSUM: ccf13e60e9ab41471864f78e72f744756afc259a
PODFILE CHECKSUM: 71204225fb042ea391e08f6d4636edc71735cda5

COCOAPODS: 1.12.1
21 changes: 11 additions & 10 deletions SiliconLabsApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -5645,7 +5645,8 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Fabric/run\" d4644999f9acaab70a6af52eebed37881b8dc107 3ac40070001448c72125e7becb3d822cc0a1f74a30c6327231b6eb046bdd7e4e\n";
shellScript = "
";
};
0C2FCBD31F9A542300F4F259 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
Expand Down Expand Up @@ -6909,7 +6910,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_RESOURCE_RULES_PATH = "";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 10;
CURRENT_PROJECT_VERSION = 11;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 52444FG85C;
DISPLAY_NAME = "EFR Connect";
Expand All @@ -6922,12 +6923,12 @@
"GCC_PREPROCESSOR_DEFINITIONS[arch=*]" = "$(inherited)";
INFOPLIST_FILE = "$(SRCROOT)/SiliconLabsApp/SupportingFiles/BlueGecko/Info.plist";
INFOPLIST_KEY_UIStatusBarStyle = UIStatusBarStyleLightContent;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.8.0;
MARKETING_VERSION = 2.8.1;
PRODUCT_BUNDLE_IDENTIFIER = com.silabs.BlueGeckoDemoApp;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -6947,11 +6948,11 @@
CLANG_ENABLE_MODULES = YES;
CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = NO;
CODE_SIGN_ENTITLEMENTS = "$(SRCROOT)/SiliconLabsApp/SupportingFiles/BlueGecko/Entitlements.entitlements";
CODE_SIGN_IDENTITY = "iPhone Distribution: Silicon Laboratories Inc (52444FG85C)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Silicon Laboratories Inc (52444FG85C)";
CODE_SIGN_IDENTITY = "iPhone Distribution";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_RESOURCE_RULES_PATH = "";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 10;
CURRENT_PROJECT_VERSION = 11;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 52444FG85C;
Expand All @@ -6964,16 +6965,16 @@
GCC_PREFIX_HEADER = "$(SRCROOT)/SiliconLabsApp/SupportingFiles/BlueGecko/BlueGecko.pch";
INFOPLIST_FILE = "$(SRCROOT)/SiliconLabsApp/SupportingFiles/BlueGecko/Info.plist";
INFOPLIST_KEY_UIStatusBarStyle = UIStatusBarStyleLightContent;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.8.0;
MARKETING_VERSION = 2.8.1;
PRODUCT_BUNDLE_IDENTIFIER = com.silabs.BlueGeckoDemoApp;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "BlueGeckoDemoApp Distribution";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "BlueGeckoDemoApp Distribution";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = BlueGeckoSimplicityDemoApp_Distribution;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OBJC_BRIDGING_HEADER = "SiliconLabsApp-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-O";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ - (BOOL)writeIfAllowedToPeripheral:(CBPeripheral *)peripheral withWriteType:(CBC
}
return NO;
}

NSLog(@" == Success flow Step-5 == write 1'st and last data to peripheral %@ data == ", dataToWrite);
writeType = [self checkIfCharacteristicSupportsChosenWriteType:writeType];
[peripheral writeValue:dataToWrite forCharacteristic:self.characteristic type:writeType];
[self postRegisterLogNotification: [SILLogDataModel prepareLogDescriptionForWriteValueOfCharacteristic:self.characteristic andPeripheral:peripheral andError:*error andData:dataToWrite]];
Expand Down
18 changes: 15 additions & 3 deletions SiliconLabsApp/Models/SILOTAFirmwareUpdateManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#import "SILHomeKitManager.h"
#endif

static NSTimeInterval const kSILDurationBeforeUpdatingDFUStatusToWaiting = 2.0;
static NSTimeInterval const kSILDurationBeforeUpdatingDFUStatusToWaiting = 10.0;
static NSInteger const kSILOTAByteAlignment = 4;
static unsigned char kSILOTAByteAlignmentPadding[] = {0xFF, 0xFF, 0xFF, 0xFF};
static char const kSILInitiateDFUData = 0x00;
Expand Down Expand Up @@ -128,8 +128,12 @@ - (void)cycleDeviceWithInitiationByteSequence:(BOOL)initiatingByteSequence
self.fileCompletion = completion;

if (initiatingByteSequence && ![self.peripheral hasOTADataCharacteristic]) {
[self writeSingleByteValue:kSILInitiateDFUData toCharacteristic:[self.peripheral otaControlCharacteristic]];
NSLog(@" ===== Success flow Step-3 == write initial single byte value 0x00 ====== ");

const char kSILInitiateDFUDataTemp = 0x00;
[self writeSingleByteValue:kSILInitiateDFUDataTemp toCharacteristic:[self.peripheral otaControlCharacteristic]];
} else {
NSLog(@" ==== fail flow Step-2 == write single byte value ====== ");
[self disconnectConnectedPeripheral];
}

Expand All @@ -142,6 +146,7 @@ - (void)cycleDeviceWithInitiationByteSequence:(BOOL)initiatingByteSequence
}

- (void)endCycleDevice {
NSLog(@" ===== Step-4 == Remove Peripherals Observer from scan list ====== ");
[self.centralManager removeScanForPeripheralsObserver:self];
}

Expand All @@ -156,6 +161,7 @@ - (void)uploadFile:(SILOTAFirmwareFile *)file
self.fileCompletion = completion;
self.fileProgress = progress;
self.firmwareUpdateMode = SILFirmwareModeUpdateFile;

[self uploadFile:file];
}

Expand Down Expand Up @@ -235,7 +241,8 @@ - (void)peripheral:(CBPeripheral *)peripheral didWriteValueForCharacteristic:(CB

- (void)uploadFile:(SILOTAFirmwareFile *)file {
self.expectingToDisconnectFromPeripheral = NO;
[self writeSingleByteValue:kSILInitiateDFUData toCharacteristic:[self.peripheral otaControlCharacteristic]];
const char kSILInitiateDFUDataTemp = 0x00;
[self writeSingleByteValue:kSILInitiateDFUDataTemp toCharacteristic:[self.peripheral otaControlCharacteristic]];
self.otaControlWriteMode = SILOTAControlWriteModeInitiating;

// TODO: Move something executing here to a background queue. There is too much happening on the main queue at this
Expand All @@ -248,6 +255,8 @@ - (void)uploadFile:(SILOTAFirmwareFile *)file {
// WriteWithoutResponse.
self.length = [SILOTAFirmwareUpdateManager maximumByteAlignedWriteValueLengthForPeripheral:self.peripheral forType:CBCharacteristicWriteWithoutResponse];
if (self.location < self.fileData.length) {

// steps to upload data
[self writeFileDataToCharacteristic:[self.peripheral otaDataCharacteristic]];
}
} else {
Expand All @@ -268,6 +277,7 @@ - (void)writeFileDataToCharacteristic:(CBCharacteristic *)characteristic {
NSInteger requiredAdditionalLength = kSILOTAByteAlignment - lengthPastByteAlignmentBoundary;
[mutableData appendBytes:kSILOTAByteAlignmentPadding length:requiredAdditionalLength];
}

data = [[NSData alloc] initWithData:mutableData];
self.location = self.location + currentLength;
} else {
Expand All @@ -279,6 +289,7 @@ - (void)writeFileDataToCharacteristic:(CBCharacteristic *)characteristic {
self.currentWriteCharacteristic = characteristic;
}

NSLog(@" == Success flow Step-8 == write FW data to peripheral- %@ data == ", data);
[self.peripheral writeValue:data forCharacteristic:characteristic type:self.delegate.characteristicWriteType];
});
}
Expand Down Expand Up @@ -314,6 +325,7 @@ - (void)writeSingleByteValue:(char)value toCharacteristic:(CBCharacteristic *)ch
SILCharacteristicTableModel *characteristicTableModel = [[SILCharacteristicTableModel alloc] initWithCharacteristic:characteristic];
NSData *data = [NSData dataWithBytes:&value length:1];
[characteristicTableModel setIfAllowedFullWriteValue:data];
NSLog(@" == Success flow Step-4 == write type %ld == ", (long)writeType);
[characteristicTableModel writeIfAllowedToPeripheral:self.peripheral withWriteType:writeType error:&error];
});
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21225" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="KVr-QK-lRQ">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="KVr-QK-lRQ">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21207"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
Expand Down Expand Up @@ -42,27 +42,19 @@
<rect key="frame" x="16" y="0.0" width="382" height="36"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Firmware Version:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LoQ-p0-uGa">
<rect key="frame" x="0.0" y="0.0" width="122" height="36"/>
<rect key="frame" x="0.0" y="0.0" width="130" height="36"/>
<constraints>
<constraint firstAttribute="width" constant="130" id="zVE-3d-vvl"/>
</constraints>
<fontDescription key="fontDescription" name="Roboto-Medium" family="Roboto" pointSize="15"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1R1-aO-oR3">
<rect key="frame" x="132" y="0.0" width="250" height="36"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="1610.2.1" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ngb-gD-s1M">
<rect key="frame" x="0.0" y="9" width="250" height="18"/>
<fontDescription key="fontDescription" name="Roboto-Regular" family="Roboto" pointSize="15"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="ngb-gD-s1M" firstAttribute="centerX" secondItem="1R1-aO-oR3" secondAttribute="centerX" id="86d-TH-yiE"/>
<constraint firstItem="ngb-gD-s1M" firstAttribute="centerY" secondItem="1R1-aO-oR3" secondAttribute="centerY" id="HNB-uT-XaU"/>
<constraint firstItem="ngb-gD-s1M" firstAttribute="width" secondItem="1R1-aO-oR3" secondAttribute="width" id="bAQ-3T-FSF"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="- -" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ngb-gD-s1M">
<rect key="frame" x="140" y="0.0" width="242" height="36"/>
<fontDescription key="fontDescription" name="Roboto-Regular" family="Roboto" pointSize="15"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
</subviews>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ - (IBAction)didTapCancelButton:(id)sender {
}

- (IBAction)didTapStartOTAButton:(id)sender {
NSLog(@" == Success flow Step-1 == Click upload start button == ");
[self.delegate otaSetupViewControllerEnterDFUModeForFirmwareUpdate:self.firmwareUpdateViewModel.otaFirmwareUpdate];
}

Expand Down

0 comments on commit 0d6b210

Please sign in to comment.