Skip to content

Commit

Permalink
Merge pull request #347 from NordicSemiconductor/develop
Browse files Browse the repository at this point in the history
Version 3.1.2
  • Loading branch information
philips77 authored Apr 15, 2021
2 parents c1bdfe9 + 1e3380c commit 7f1ed61
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 41 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
## Changelog
- **3.1.2**:
- Bugfix: Fixed DevicePropertyCharacteristic.pressure with missing resolution when converting to Data (#344).
- Bugfix: Fixed calculating message sequence when Seq > 8191 (#345).

- **3.1.1**:
- Bugfix: `SegmentedAccessMessage` overflow crash (#339).
Expand Down
2 changes: 1 addition & 1 deletion Documentation/SETTING_UP.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Using CocoaPods:
You can use [Swift Package Manager](https://swift.org/package-manager/) and specify dependency in `Package.swift` by adding this:

```swift
.package(url: "https://github.com/NordicSemiconductor/IOS-nRF-Mesh-Library", .upToNextMinor(from: "3.1.1"))
.package(url: "https://github.com/NordicSemiconductor/IOS-nRF-Mesh-Library", .upToNextMinor(from: "3.1.2"))
```

Also, have a look at [Swift Package Manager @ CryptoSwift](https://github.com/krzyzanowskim/CryptoSwift/blob/master/README.md#swift-package-manager).
Expand Down
4 changes: 2 additions & 2 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PODS:
- CryptoSwift (1.3.8)
- nRFMeshProvision (3.1.1):
- nRFMeshProvision (3.1.2):
- CryptoSwift (= 1.3.8)

DEPENDENCIES:
Expand All @@ -16,7 +16,7 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
CryptoSwift: 01b0f0cba1d5c212e5a335ff6c054fb75a204f00
nRFMeshProvision: c1287c0156085336176e317ac2f707541c162e4c
nRFMeshProvision: 56e071395addfb9cc984bc7fbe56716bb4b9c343

PODFILE CHECKSUM: 69a81463322ef34ca0a20b98e90da2701d94e4ec

Expand Down
4 changes: 2 additions & 2 deletions Example/Pods/Local Podspecs/nRFMeshProvision.podspec.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Example/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 10 additions & 25 deletions Example/Pods/Pods.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Example/nRFMeshProvision.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1364,7 +1364,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = "$(inherited)";
LINK_WITH_STANDARD_LIBRARIES = YES;
MARKETING_VERSION = 3.1.1;
MARKETING_VERSION = 3.1.2;
MODULE_NAME = ExampleApp;
OTHER_LDFLAGS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = com.nordicsemi.nRFProvisioner;
Expand All @@ -1391,7 +1391,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = "$(inherited)";
LINK_WITH_STANDARD_LIBRARIES = YES;
MARKETING_VERSION = 3.1.1;
MARKETING_VERSION = 3.1.2;
MODULE_NAME = ExampleApp;
OTHER_LDFLAGS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = com.nordicsemi.nRFProvisioner;
Expand Down
2 changes: 1 addition & 1 deletion nRFMeshProvision.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

Pod::Spec.new do |s|
s.name = 'nRFMeshProvision'
s.version = '3.1.1'
s.version = '3.1.2'
s.summary = 'A Bluetooth Mesh library'
s.description = <<-DESC
nRF Mesh is a Bluetooth Mesh compliant library that has many features such as provisioning, configuration and control of Bluetooth Mesh compliant nodes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -704,13 +704,20 @@ private extension NetworkPdu {
return transportPdu[0] & 0x80 > 1
}

/// The 24-bit Seq Auth used to transmit the first segment of a
/// segmented message, or the 24-bit sequence number of an unsegmented
/// message.
/// The 24-bit message sequence number used to transmit the first segment
/// of a segmented message, or the 24-bit sequence number of an unsegmented
/// message. This should be prefixed with 32-bit IV Index to get Seeq Auth.
///
/// If the Seq is 0x647262 and SeqZero is 0x1849, the message sequence
/// should be 0x6451849. See Bluetooth Mesh Profile 1.0.1 chapter 3.5.3.1.
var messageSequence: UInt32 {
if isSegmented {
let sequenceZero = (UInt16(transportPdu[1] & 0x7F) << 6) | UInt16(transportPdu[2] >> 2)
return (sequence & 0xFFE000) | UInt32(sequenceZero)
if (sequence & 0x1FFF < sequenceZero) {
return (sequence & 0xFFE000) + UInt32(sequenceZero) - (0x1FFF + 1)
} else {
return (sequence & 0xFFE000) + UInt32(sequenceZero)
}
} else {
return sequence
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,7 @@ internal extension DevicePropertyCharacteristic {

// Float as UInt32:
case .pressure(let value):
return value.toData(ofLength: 4, withRange: 0...Decimal(UInt32.max))
return value.toData(ofLength: 4, withRange: 0...Decimal(UInt32.max), withResolution: 0.1)

// UInt32 with 0xFFFFFFFF as unknown:
case .timeSecond32(let value):
Expand Down

0 comments on commit 7f1ed61

Please sign in to comment.