Skip to content

Commit

Permalink
Release-v3.0.0 package
Browse files Browse the repository at this point in the history
  • Loading branch information
SaravanKumarMS committed Dec 16, 2024
1 parent b5bf71a commit d95b4a2
Show file tree
Hide file tree
Showing 205 changed files with 9,499 additions and 3,502 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ Builds
.idea/
*.iml
/local.properties
*.apk
*.DS_Store
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ Simplicity Connect includes many demos to test sample apps in the Silicon Labs G
- **Health Thermometer**: Connect to a BLE hardware kit and receive the temperature data from the on-board sensor.
- **Connected Lighting DMP**: Leverage the dynamic multi-protocol (DMP) sample apps to control a DMP light node from a mobile and protocol-specific switch node (Zigbee, proprietary) while keeping the light status in sync across all devices.
- **Range Test**: Visualize the RSSI and other RF performance data on the mobile phone while running the Range Test sample application on a pair of Silicon Labs radio boards.
- **Motion**: Control a 3D render of a Silicon Labs Thunderboard or Dev Kit that follows the phyiscal board movements.
- **Motion**: Control a 3D render of a Silicon Labs Thunderboard or Dev Kit that follows the physical board movements.
- **Environment**: Read and display the data from the on-board sensors on a Silicon Labs Thunderboard or Dev Kit.
- **Wi-Fi Commissioning**: Commission a Wi-Fi device over BLE.
- **Bluetooth Electronic Shelf Labels (ESL)**: Adds and commissions ESL tags to the system network by scanning the tag's QR code with the mobile device's camera and provides the user a UI to view the list commissioned tags and control them.
- **Matter**: Commission and control of the Matter devices over Thread and Wi-Fi.
- **Wi-Fi OTA Firmware Update**: The Wi-Fi OTA firmware update demo demonstrates how to update the SiWx91x user application firmware over Wi-Fi connection, by downloading the image from the mobile phone.
- **Wi-Fi 917 Sensors**: The Wi-Fi 917 Sensor demo demonstrates to read and display sensor data from 917 Dev Kit.
- **Wi-Fi Throughput**: Wi-Fi demo feature for measuring data throughput between SiWx91x device and the mobile phone.

## Development Features
Simplicity Connect helps developers create and troubleshoot Bluetooth applications running on Silicon Labs’ BLE hardware. Here’s a rundown of some example functionalities.
Expand Down
8 changes: 4 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

plugins {
id("com.android.application") version "8.4.1" apply false
id("org.jetbrains.kotlin.android") version "1.7.21" apply false
id("org.jetbrains.kotlin.android.extensions") version "1.7.21" apply false
id("org.jetbrains.kotlin.kapt") version "1.7.21" apply false
id("com.google.dagger.hilt.android") version "2.45" apply false
id("org.jetbrains.kotlin.android") version "1.9.21" apply false
id("org.jetbrains.kotlin.plugin.parcelize") version "1.9.21" apply false
id("org.jetbrains.kotlin.kapt") version "1.9.21" apply false
id("com.google.dagger.hilt.android") version "2.51.1" apply false
}

buildscript {
Expand Down
3 changes: 3 additions & 0 deletions build/Si-Connect - v3_0_0.apk
Git LFS file not shown
3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.jvmargs=-Xmx4096m -XX:MaxMetaspaceSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
org.gradle.parallel=true
android.enableJetifier=true
android.useAndroidX=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Oct 26 16:56:57 EEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
87 changes: 60 additions & 27 deletions mobile/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import com.android.build.api.variant.Packaging

plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("org.jetbrains.kotlin.android.extensions")
id("org.jetbrains.kotlin.plugin.parcelize")
id("org.jetbrains.kotlin.kapt")
id("com.google.dagger.hilt.android")
}
Expand All @@ -25,7 +23,7 @@ android {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

packagingOptions { jniLibs { useLegacyPackaging = true } }
packaging { jniLibs { useLegacyPackaging = true } }

buildTypes {
release {
Expand All @@ -36,13 +34,21 @@ android {
ndk {
abiFilters.add("armeabi-v7a")
abiFilters.add("arm64-v8a")
abiFilters.add("x86-64")
abiFilters.add("x86")
}
}
debug {
isDebuggable = true
//renderscriptDebuggable false
//minifyEnabled true
//pseudoLocalesEnabled false
}
}

applicationVariants.all{
assembleProvider.get().doLast{
copy{
from("Builds/${rootProject.name}/${project.name}/outputs/apk/Si-Connect/release/mobile-Si-Connect-release.apk")
into ("Builds")
}
}
}

Expand All @@ -60,23 +66,38 @@ android {
create("Si-Connect") {
dimension = versionDim
applicationId = "com.siliconlabs.bledemo"
versionCode = 55
versionName = "2.9.3"
versionCode = 56
versionName = "3.0.0"
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
jvmTarget = JavaVersion.VERSION_17.toString()
}

kapt {
correctErrorTypes = true
}

sourceSets {
getByName("main") {
jniLibs.srcDir("libs")
}
}

buildFeatures {
viewBinding = true
buildConfig = true
compose = true
}

composeOptions {
kotlinCompilerExtensionVersion = "1.5.7"
}
}

Expand All @@ -86,21 +107,21 @@ dependencies {
// This dependency is downloaded from the Google’s Maven repository.
// Make sure you also include that repository in your project's build.gradle file.
implementation("com.google.android.play:feature-delivery:2.1.0")
implementation("com.google.android.play:review:2.0.1")
implementation("com.google.android.play:review:2.0.2")
implementation("com.google.android.play:app-update:2.1.0")


// For Kotlin users, also import the Kotlin extensions library for Play Feature Delivery:
implementation("com.google.android.play:feature-delivery-ktx:2.1.0")
implementation("com.google.android.play:review-ktx:2.0.1")
implementation("com.google.android.play:review-ktx:2.0.2")
implementation("com.google.android.play:app-update-ktx:2.1.0")
// androidx
implementation("androidx.core:core-ktx:1.13.1")
implementation("androidx.appcompat:appcompat:1.7.0")
implementation("androidx.fragment:fragment:1.8.1")
implementation("androidx.fragment:fragment:1.8.3")
implementation("androidx.core:core-splashscreen:1.0.1")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.2")
implementation("androidx.activity:activity-ktx:1.9.0")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.6")
implementation("androidx.activity:activity-ktx:1.9.2")
implementation("com.google.android.material:material:1.12.0")

// Coroutines
Expand All @@ -121,13 +142,13 @@ dependencies {
//implementation("com.github.PhilJay:MPAndroidChart:v3.0.3")

// Navigation
implementation("androidx.navigation:navigation-fragment-ktx:2.7.7")
implementation("androidx.navigation:navigation-ui-ktx:2.7.7")
implementation("androidx.navigation:navigation-dynamic-features-fragment:2.7.7")
implementation("androidx.navigation:navigation-fragment-ktx:2.8.1")
implementation("androidx.navigation:navigation-ui-ktx:2.8.1")
implementation("androidx.navigation:navigation-dynamic-features-fragment:2.8.1")

// Dependency injection
implementation("com.google.dagger:hilt-android:2.46.1")
kapt("com.google.dagger:hilt-android-compiler:2.45")
implementation("com.google.dagger:hilt-android:2.51.1")
kapt("com.google.dagger:hilt-android-compiler:2.51.1")

// View binding
implementation("com.github.kirich1409:viewbindingpropertydelegate-noreflection:1.5.9")
Expand All @@ -138,7 +159,7 @@ dependencies {
// Parsing
implementation("com.google.code.gson:gson:2.10.1")
implementation("com.opencsv:opencsv:5.6")
implementation("androidx.activity:activity:1.9.0")
implementation("androidx.activity:activity:1.9.2")

// Only used for Int.pow() method in a couple of places
implementation("com.google.guava:guava:29.0-android")
Expand All @@ -160,12 +181,24 @@ dependencies {
implementation("androidx.camera:camera-camera2:1.3.4")
implementation("androidx.camera:camera-lifecycle:1.3.4")
implementation("androidx.camera:camera-view:1.3.4")
implementation("com.google.mlkit:barcode-scanning:17.2.0")
implementation("com.daimajia.swipelayout:library:1.2.0@aar")
implementation("com.google.mlkit:barcode-scanning:17.3.0")

//DevKitSensor917 Demo
implementation("com.squareup.retrofit2:retrofit:2.9.0")
implementation("com.squareup.retrofit2:converter-gson:2.9.0")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.4.0")
implementation ("com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:0.9.2")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.6")

implementation ("com.daimajia.swipelayout:library:1.2.0@aar")

//JetPack compose
val composeBom = platform("androidx.compose:compose-bom:2024.06.00")
implementation(composeBom)
androidTestImplementation(composeBom)
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.material:material")
implementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.activity:activity-compose")
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
debugImplementation("androidx.compose.ui:ui-tooling")

}
Binary file modified mobile/libs/AndroidPlatform.jar
Binary file not shown.
Binary file added mobile/libs/CHIPClusterID.jar
Binary file not shown.
Binary file added mobile/libs/CHIPClusters.jar
Binary file not shown.
Binary file modified mobile/libs/CHIPController.jar
Binary file not shown.
Binary file added mobile/libs/CHIPInteractionModel.jar
Binary file not shown.
Binary file added mobile/libs/OnboardingPayload.jar
Binary file not shown.
Binary file added mobile/libs/libMatterJson.jar
Binary file not shown.
Binary file added mobile/libs/libMatterTlv.jar
Binary file not shown.
8 changes: 6 additions & 2 deletions mobile/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />

<uses-feature
android:name="android.hardware.bluetooth_le"
Expand All @@ -31,7 +32,7 @@
android:name="android.hardware.camera"
android:required="false" />

<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />

<application
android:name=".application.SiliconLabsDemoApplication"
android:allowBackup="false"
Expand All @@ -43,7 +44,10 @@
android:theme="@style/MainAppTheme"
android:usesCleartextTraffic="true"
tools:replace="android:allowBackup">

<activity
android:name=".features.demo.wifi_throughput.activities.WifiThroughputActivity"
android:exported="false"
android:theme="@style/MainAppTheme" />
<activity
android:name=".features.configure.gatt_configurator.activities.GattServerActivity"
android:label="@string/title_new_GATT_Server" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
package com.siliconlabs.bledemo.bluetooth.parsing

import android.bluetooth.BluetoothGattDescriptor
import android.os.Build
import androidx.annotation.RequiresApi
import com.siliconlabs.bledemo.utils.Converters
import com.siliconlabs.bledemo.utils.StringUtils.removeWhitespaceAndCommaIfNeeded
import java.lang.StringBuilder
import java.util.*

class DescriptorParser(val descriptor: BluetoothGattDescriptor) {

@RequiresApi(Build.VERSION_CODES.GINGERBREAD)
fun getFormattedValue(): String {
val uuid = descriptor.uuid
val value = descriptor.value
Expand Down Expand Up @@ -64,7 +67,7 @@ class DescriptorParser(val descriptor: BluetoothGattDescriptor) {
}
}

return "0x".plus(Converters.bytesToHex(value).toUpperCase(Locale.ROOT))
return "0x".plus(Converters.bytesToHex(value).uppercase(Locale.ROOT))
}


Expand Down Expand Up @@ -127,7 +130,7 @@ class DescriptorParser(val descriptor: BluetoothGattDescriptor) {
return Converters.byteToUnsignedInt(bytes[0]).toString()
}


@RequiresApi(Build.VERSION_CODES.GINGERBREAD)
private fun getReportReference(bytes: ByteArray): String {
return if (bytes.size != 2) {
return getUnknownValue(bytes)
Expand All @@ -136,14 +139,17 @@ class DescriptorParser(val descriptor: BluetoothGattDescriptor) {
val reportType = bytes[1]

val result = StringBuilder()
result.append("Report ID: 0x").append(Converters.getHexValue(reportId).toUpperCase(Locale.ROOT)).append("\n")
result.append("Report Type: 0x").append(Converters.getHexValue(reportType).toUpperCase(Locale.ROOT))
result.append("Report ID: 0x").append(Converters.getHexValue(reportId)
.uppercase(Locale.ROOT)).append("\n")
result.append("Report Type: 0x").append(Converters.getHexValue(reportType)
.uppercase(Locale.ROOT))

result.toString()
}
}



@RequiresApi(Build.VERSION_CODES.GINGERBREAD)
private fun getValidRange(bytes: ByteArray): String {
val size = bytes.size

Expand All @@ -154,20 +160,21 @@ class DescriptorParser(val descriptor: BluetoothGattDescriptor) {

result.append("Lower inclusive value: 0x")
for (i in 0 until size / 2) {
result.append(Converters.getHexValue(bytes[i]).toUpperCase(Locale.ROOT))
result.append(Converters.getHexValue(bytes[i]).uppercase(Locale.ROOT))
}

result.append("\nUpper inclusive value: 0x")
for (i in size / 2 until size) {
result.append(Converters.getHexValue(bytes[i]).toUpperCase(Locale.ROOT))
result.append(Converters.getHexValue(bytes[i]).uppercase(Locale.ROOT))
}

return result.toString()
}
}

@RequiresApi(Build.VERSION_CODES.GINGERBREAD)
private fun getUnknownValue(bytes: ByteArray): String {
return "Unknown value: 0x".plus(Converters.bytesToHex(bytes).toUpperCase(Locale.ROOT))
return "Unknown value: 0x".plus(Converters.bytesToHex(bytes).uppercase(Locale.ROOT))
}


Expand Down
Loading

0 comments on commit d95b4a2

Please sign in to comment.