fix: revert SDK 36 bump, fix NimBLE setMTU crash, add --no-stub for OPI flash
This commit is contained in:
parent
3b9028b096
commit
84503f3a24
9 changed files with 165 additions and 180 deletions
|
|
@ -19,7 +19,8 @@ ESP32-S3-PICO-1-N8R8 (Atom S3R Voice), 2 relais, 2 touch sensors (JR223B), BLE,
|
|||
|
||||
- PlatformIO, `platform = espressif32@6.7.0`, board `esp32-s3-devkitc-1`
|
||||
- CDC USB serial (`ARDUINO_USB_CDC_ON_BOOT=1`), QIO OPI flash
|
||||
- Upload laptop: `pio run -t upload`, port `/dev/ttyACM0`, 115200 baud
|
||||
- **Upload:** `pio run -t upload` (via `--no-stub`, OPI flash vereist dit). Poort: **NOOIT `/dev/ttyACM0`** (dat is het Atreus toetsenbord). ESP32 herkennen via `ls /dev/serial/by-id/ | grep -i espressif` en die poort gebruiken. PlatformIO: pas `upload_port` in `platformio.ini` aan naar de gevonden poort.
|
||||
- **Direct flashen (handmatig):** `~/.platformio/packages/tool-esptoolpy/esptool.py --no-stub --chip esp32s3 --port /dev/ttyACM1 --baud 115200 --before default_reset --after hard_reset write_flash --flash_mode keep --flash_size keep 0x0 .pio/build/m5stack-atoms3r/bootloader.bin 0x8000 .pio/build/m5stack-atoms3r/partitions.bin 0xE000 ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin 0x10000 .pio/build/m5stack-atoms3r/firmware.bin`
|
||||
- NVS: namespace "hmac", key "key" (32 bytes HMAC)
|
||||
- BLE advertising "SylDa_Server", HMAC-verified relay commands
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ android {
|
|||
// compileSdk/targetSdk stays on 34 (Android 14) by deliberate choice. The target audience
|
||||
// consists of physically disabled users who are very reluctant to update their phones. Staying
|
||||
// on API 34 maximises device compatibility. Re-evaluate when the user base has migrated.
|
||||
compileSdk 36
|
||||
compileSdk 34
|
||||
|
||||
if (hasSigningConfig) {
|
||||
def props = new Properties()
|
||||
|
|
@ -30,7 +30,7 @@ android {
|
|||
defaultConfig {
|
||||
applicationId "nl.eddydevink.sylda"
|
||||
minSdk 26
|
||||
targetSdk 36
|
||||
targetSdk 34
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
buildConfigField "String", "BUILD_NUMBER", "\"${new java.text.SimpleDateFormat("yyyyMMddHHmmss").format(new Date())}\""
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -23,7 +23,7 @@ class MainActivity : AppCompatActivity(), BleCallbacks {
|
|||
private const val REQUEST_SETTINGS = 1
|
||||
private const val POST_SETTINGS_RESCAN_MS = 500L
|
||||
private const val ON_RESUME_SCAN_DELAY_MS = 300L
|
||||
private const val BUNDLED_FIRMWARE_VERSION = "5"
|
||||
private const val BUNDLED_FIRMWARE_VERSION = "6"
|
||||
}
|
||||
|
||||
private lateinit var manager: BleRelayManager
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ class SettingsActivity : AppCompatActivity() {
|
|||
private const val REBOOT_WAIT_MS = 5000L
|
||||
private const val REBOOT_POLL_MS = 500L
|
||||
private const val REBOOT_MAX_WAIT_MS = 15000L
|
||||
private const val EXPECTED_FIRMWARE_VERSION = "5"
|
||||
private const val EXPECTED_FIRMWARE_VERSION = "6"
|
||||
}
|
||||
|
||||
private enum class UsbAction { NONE, EXCHANGE_KEY, FLASH }
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="16dp">
|
||||
|
|
@ -14,7 +9,6 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|top"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
|
|
@ -73,6 +67,4 @@
|
|||
android:text="@string/status_default"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
|
@ -3,14 +3,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="24dp"
|
||||
android:layout_marginTop="8dp">
|
||||
android:padding="24dp">
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/flashMethodGroup"
|
||||
|
|
@ -144,6 +137,4 @@
|
|||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
|||
|
|
@ -15,3 +15,4 @@ lib_deps =
|
|||
h2zero/NimBLE-Arduino@^2
|
||||
upload_port = /dev/ttyACM1
|
||||
upload_speed = 115200
|
||||
upload_flags = --no-stub
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
#define NVS_NAMESPACE "hmac"
|
||||
#define NVS_KEY_NAME "key"
|
||||
#define NVS_UUID_NAME "uuid"
|
||||
#define FIRMWARE_VERSION "5"
|
||||
#define FIRMWARE_VERSION "6"
|
||||
|
||||
NimBLECharacteristic *pCharacteristic;
|
||||
bool deviceConnected = false;
|
||||
|
|
@ -338,8 +338,8 @@ void setup() {
|
|||
}
|
||||
Serial.println("LED blink done, starting BLE...");
|
||||
|
||||
NimBLEDevice::setMTU(512);
|
||||
NimBLEDevice::init("SylDa_Server");
|
||||
NimBLEDevice::setMTU(248);
|
||||
|
||||
NimBLEServer *pServer = NimBLEDevice::createServer();
|
||||
pServer->setCallbacks(new MyServerCallbacks());
|
||||
|
|
|
|||
Loading…
Reference in a new issue