Skip to content

Commit b531b20

Browse files
authored
Merge pull request #56 from EspressifApp/dev
update
2 parents 0745ecd + eb36d3b commit b531b20

File tree

10 files changed

+39
-12
lines changed

10 files changed

+39
-12
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This is a demo app to control the ESP device which run [BluFi](https://github.co
1616
```
1717
- And add a dependency code to your app module's `build.gradle` file.
1818
```
19-
implementation 'com.github.EspressifApp:lib-blufi-android:2.3.7'
19+
implementation 'com.github.EspressifApp:lib-blufi-android:2.4.1'
2020
```
2121

2222
## ESPRSSIF MIT License

app/build.gradle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ android {
88
applicationId "com.espressif.espblufi"
99
minSdk 21
1010
targetSdk 34
11-
versionCode 30
12-
versionName "1.6.4"
11+
versionCode 31
12+
versionName "1.6.5"
1313
}
1414

1515
buildTypes {
@@ -33,8 +33,9 @@ dependencies {
3333

3434
implementation 'com.google.android.material:material:1.12.0'
3535
implementation 'androidx.appcompat:appcompat:1.7.0'
36-
implementation 'androidx.gridlayout:gridlayout:1.0.0'
36+
implementation 'androidx.gridlayout:gridlayout:1.1.0'
3737
implementation 'androidx.preference:preference:1.2.1'
38+
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
3839

3940
implementation 'io.reactivex.rxjava3:rxjava:3.1.4'
4041
implementation 'io.reactivex.rxjava3:rxandroid:3.0.0'

app/src/main/java/com/espressif/espblufi/constants/BlufiConstants.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ public final class BlufiConstants {
88
public static final String KEY_CONFIGURE_PARAM = "configure_param";
99

1010
public static final int MIN_MTU_LENGTH = 23;
11-
public static final int MAX_MTU_LENGTH = 517;
12-
public static final int DEFAULT_MTU_LENGTH = 512;
11+
public static final int MAX_MTU_LENGTH = 300;
12+
public static final int DEFAULT_MTU_LENGTH = 270;
1313

1414
public static final long GATT_WRITE_TIMEOUT = 10000L;
1515
}

app/src/main/java/com/espressif/espblufi/ui/MainActivity.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,12 @@ private void scan() {
184184
mScanStartTime = SystemClock.elapsedRealtime();
185185

186186
mLog.d("Start scan ble");
187-
scanner.startScan(null, new ScanSettings.Builder().setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY).build(),
188-
mScanCallback);
187+
ScanSettings.Builder scanSettingsBuilder = new ScanSettings.Builder()
188+
.setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY);
189+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
190+
scanSettingsBuilder.setLegacy(false);
191+
}
192+
scanner.startScan(null, scanSettingsBuilder.build(), mScanCallback);
189193
mUpdateFuture = mThreadPool.submit(() -> {
190194
while (!Thread.currentThread().isInterrupted()) {
191195
try {

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ buildscript {
77
mavenCentral()
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:8.9.0'
10+
classpath 'com.android.tools.build:gradle:8.10.1'
1111

1212
// NOTE: Do not place your application dependencies here; they belong
1313
// in the individual module build.gradle files

lib-blufi/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ plugins {
22
id 'com.android.library'
33
}
44

5-
def libVersion = "2.4.0"
5+
def libVersion = "2.4.1"
66

77
android {
88
compileSdk 34

lib-blufi/log/changelog_en.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Change Log
22
[中文](changelog_zh.md)
33

4+
### 2.4.1
5+
- Fix publishing to JitPack
6+
7+
## 2.4.0
8+
- Fix: DH secret key which leading zero bits
9+
410
## 2.3.7
511
- Add gatt write timeout interface in `BlufiClient`
612
```java
@@ -20,4 +26,4 @@
2026
- Update `targetSdkVersion` to 31
2127

2228
## 2.3.4
23-
- Publish the lib on jitpack
29+
- Publish the lib on jitpack

lib-blufi/log/changelog_zh.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# 修改记录
22
[English](changelog_en.md)
33

4+
### 2.4.1
5+
- 修复发布库至 JitPack
6+
7+
## 2.4.0
8+
- 修复 DH secret 的生成
9+
410
## 2.3.7
511
- `BlufiClient` 新增 gatt 写超时接口
612
```java
@@ -20,4 +26,4 @@
2026
- `targetSdkVersion` 更新至 31
2127

2228
## 2.3.4
23-
- 在 jitpack 上发布库
29+
- 在 jitpack 上发布库

log/updatelog-en.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
# Update Log
44

5+
## 1.6.5
6+
- Update `targetSdk` to 34
7+
- Android 8.0 or late support scanning BLE 5.0
8+
- Update blufi lib to 2.4.1
9+
510
## 1.6.3
611
- Set gatt write timeout as 5 seconds.
712
- Update blufi lib to `2.3.7`

log/updatelog-zh-rCN.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
# 更新日志
44

5+
## 1.6.5
6+
- 更新 `targetSdk` 为 34
7+
- Android 8.0 以上系统支持扫描 BLE 5.0
8+
- 更新 blufi 库至 2.4.1
9+
510
## 1.6.3
611
- 设置 gatt 写超时为 5 秒
712
- 更新 blufi 库版本为 `2.3.7`

0 commit comments

Comments
 (0)