瀏覽代碼

nimble/cc2564x: avoid crashing when connecting to Apple Media Service

When we're connecting to AMS during service discovery, we can crash from
having run out of outstanding GATT requests (we must be quite busy at the
time!).  Bump the maximum up from 4 to 8, and then we will not fail to set
up the CCCD.

Signed-off-by: Joshua Wise <joshua@joshuawise.com>
Joshua Wise 4 天之前
父節點
當前提交
f1cb50e5db

+ 3 - 3
third_party/nimble/port/include/cc2564x/syscfg/syscfg.h

@@ -140,11 +140,11 @@
 #endif
 
 #ifndef MYNEWT_VAL_MSYS_1_BLOCK_COUNT
-#define MYNEWT_VAL_MSYS_1_BLOCK_COUNT (12)
+#define MYNEWT_VAL_MSYS_1_BLOCK_COUNT (35)
 #endif
 
 #ifndef MYNEWT_VAL_MSYS_1_BLOCK_SIZE
-#define MYNEWT_VAL_MSYS_1_BLOCK_SIZE (292)
+#define MYNEWT_VAL_MSYS_1_BLOCK_SIZE (304)
 #endif
 
 #ifndef MYNEWT_VAL_MSYS_1_SANITY_MIN_COUNT
@@ -695,7 +695,7 @@
 #endif
 
 #ifndef MYNEWT_VAL_BLE_GATT_MAX_PROCS
-#define MYNEWT_VAL_BLE_GATT_MAX_PROCS (4)
+#define MYNEWT_VAL_BLE_GATT_MAX_PROCS (8)
 #endif
 
 #ifndef MYNEWT_VAL_BLE_GATT_NOTIFY

+ 7 - 0
third_party/nimble/syscfg/targets/cc2564x/syscfg.yml

@@ -15,3 +15,10 @@
 syscfg.vals:
     BLE_TRANSPORT_LL: socket
     BLE_HOST_RPA_RESOLVER: 1
+    # Copied from nRF52: values measured to be found _okay_ when doing
+    # firmware update related activites.  They may need further tuning.
+    MSYS_1_BLOCK_COUNT: 35
+    MSYS_1_BLOCK_SIZE: 304
+
+    # Seems to be necessary to get AMS to connect without crashing.
+    BLE_GATT_MAX_PROCS: 8