New SDK features

更新时间:
复制 MD 格式

This document details the new features in each version of the IoT Platform device SDK and explains how to enable them.

New features in SDK V1.6.6

Note

To update to the latest version (1.6.6-21), run git pull on the rel_1.6.6 branch.

Version

Description

1.6.6-22

  • SDK updates

    • Fixed an OTA partition erase/write overflow issue.

    • Updated the MQTT certificate. The new certificate is valid until July 4, 2053.

  • TG7100C (low-power Wi-Fi) chip BSP updates

    • Fixed a compatibility issue with 1M ACK on D-Link routers.

    • Fixed an issue where RSSI and DNS were not cleared after a disconnection.

    • Fixed an occasional assertion during Wi-Fi scans.

    • Fixed inaccurate ADC sampling.

    • Added support for up to three concurrent BLE connections.

    • Added a temperature compensation feature.

    • Improved status code reporting for incorrect Wi-Fi passwords.

    • Fixed a reconnection failure that occurred when a router's encryption mode was switched from WPA3 to another mode.

    • Fixed a data loss issue in the UART driver when using DMA mode.

1.6.6-21

  • SDK updates

    • Fixed a leap-year handling issue in the timer service that caused scheduling failures.

    • Fixed a connection failure when connecting to a router without a password.

    • Fixed a memory leak caused by repeated reconnection attempts to a powered-off router.

    • Fixed a TCP shutdown failure during repeated MQTT reconnection attempts (with mbedtls disabled). This failure left TCP connections open, preventing resource release and causing insufficient memory.

  • TG7100C (low-power Wi-Fi) chip BSP updates

    • Fixed a persistent connection failure (Association failure) that occurred when a device was repeatedly power-cycled while connecting to an H3C WA6320-SI router.

    • Fixed a compatibility issue with H3C WA6520 industrial routers.

    • Updated AliGenieFlashTool to V1.8.7.

1.6.6-20

  • SDK updates

    • Fixed an occasional timer hang.

    • Fixed an occasional crash during Bluetooth-assisted network configuration.

  • TG7100C (low-power Wi-Fi) chip BSP updates

    • Updated the Wi-Fi library to support the new SRRC standard.

    • Disabled the low power consumption mode by default.

    • Updated the flashing tool to version 1.8.5.

1.6.6-19

  • SDK updates

    • Enabled silent broadcasting by default.

    • Enabled low power consumption by default.

    • Changed the _thing/event/notify topic to a device subscription.

    • Added a Bluetooth diagnostics feature.

    • Fixed timer exception-related delays in serial data transmission and reception.

    • Added support for QoS 2 in MQTT messages. This feature is disabled by default.

  • TG7100C (low-power Wi-Fi) chip BSP updates

    • Fixed a thread-blocking issue in production line network configuration.

    • Fixed a memory leak in Bluetooth.

    • Fixed a rare data shift issue in UART Rx.

    • Fixed an issue where memory write operations affected UART DMA, resolving a rare serial data error.

    • Fixed a network disconnection issue during stability stress tests after enabling low power consumption.

    • Updated the flashing tool to version 1.7.4:

      1. Added instructions for using temperature compensation parameters.

      2. Added instructions for sending commands in DTS files.

      3. Added support for Gree's custom flashing commands.

1.6.6-16

  • SDK updates

    • Fixed a timer issue in AliOS Things.

1.6.6-15

  • SDK updates

    • Added support for offline OTA firmware updates over Bluetooth when network configuration fails.

    • Added on-device data tracking for network configuration failures.

    • Added support for the on-device timer (DeviceTimer).

      Note

      Devices in private label projects also support the on-device timer. For development details, see On-device Timer Function.

  • TG7100C (low-power Wi-Fi) chip BSP updates

    • Updated the Wi-Fi protocol stack to improve router compatibility.

    • Optimized the reconnection process after router disconnections.

1.6.6-12

  • SDK updates

    • Devices now restart broadcasting for network configuration if Bluetooth-assisted network configuration fails.

    • Increased the timeout for device-to-AP connection from 30 seconds to 40 seconds.

    • Fixed Bluetooth-assisted network configuration failures caused by a PID string length of approximately 7 characters.

  • TG7100C (low-power Wi-Fi) chip BSP updates

    • Updated the flashing tool to version 1.6.7.

    • Added support for new on-chip flash.

    • Added support for microsecond-level timer precision.

    • Optimized router compatibility.

1.6.6-10

  • SDK updates

    • The SDK now simultaneously supports both device hotspot network configuration and Bluetooth-assisted network configuration.

    • Added data tracking for device interactions during Bluetooth-assisted network configuration.

    • Optimized Bluetooth-assisted network configuration.

  • TG7100C (low-power Wi-Fi) chip BSP updates

    • Improved Bluetooth connection stability.

    • Optimized flash read/write interfaces.

    • Updated the bootloader.

    • Updated the flashing tool to version 1.6.5. The OTA generation tool now requires libc library version 2.25 or later.

  • Removed some unmaintained boards.

1.6.6-9

  • SDK updates

    • Optimized NTP synchronization.

    • Fixed an LV application thread release issue.

    • Fixed an AP reconnection failure that occurred after a power outage during an OTA update when Wi-Fi low power consumption was enabled.

  • TG7100C chip BSP updates

    • Added support for WPA3 security encryption configuration.

    • Fixed compatibility issues with specific routers.

1.6.6-8

Optimized the local timer.

  • Increased the maximum length of the timer configuration string from 768 to 1,024 characters.

  • Changed local timer configuration to save all data as key-value pairs.

  • The app now directly replies with saved key-value data in response to get property requests.

  • Adjusted the local timer initialization sequence.

  • Optimized NTP data acquisition for the local timer.

1.6.6-6

  • Optimized the key-value (KV) storage feature.

  • Fixed a network configuration failure caused by special characters in the SSID.

  • TG7100C chip BSP updates

    • Added support for Wi-Fi low power consumption. To use this feature, call wifi_mgmr_sta_powersaving(2) to enable low power consumption after the device connects to the cloud. When the device is offline, call wifi_mgmr_sta_powersaving(0) to disable low power consumption.

      #if (defined (TG7100CEVB))
      extern int wifi_mgmr_sta_powersaving(int ps);
      #endif
      static int user_connected_event_handler(void)
      {
          user_example_ctx_t *user_example_ctx = user_example_get_ctx();
      
          LOG_TRACE("Cloud Connected");
      #if (defined (TG7100CEVB))
          wifi_mgmr_sta_powersaving(2);    /* Enable low power consumption */
      #endif
          user_example_ctx->cloud_connected = 1;
      
          ......
      }
      
      static int user_disconnected_event_handler(void)
      {
          user_example_ctx_t *user_example_ctx = user_example_get_ctx();
      
          LOG_TRACE("Cloud Disconnected");
      #if (defined (TG7100CEVB))
          wifi_mgmr_sta_powersaving(0);    /* Disable low power consumption */
      #endif
          set_net_state(CONNECT_CLOUD_FAILED);
          user_example_ctx->cloud_connected = 0;
      
          return 0;
      }
    • Fixed the low success rate of OTA updates in weak network environments.

    • Fixed reconnection issues after network disconnections.

    • Enhanced Wi-Fi security.

    • Other BSP optimizations.

1.6.6-5

  • Added an on-device timer feature based on the DeviceTimer property. This feature is currently available for Tmall Genie ecosystem projects. Note that the DeviceTimer is enabled by default in the sample application firmware. When developing private label projects, you must continue to use properties such as LocalTimer and adjust the macro definitions in the mk file as shown below.

    • Tmall Genie ecosystem projects: Use the DeviceTimer property with the following macro configuration:

      GLOBAL_CFLAGS += -DAIOT_DEVICE_TIMER_ENABLE    // Macro for the new on-device DeviceTimer. Enabled by default.
      # GLOBAL_CFLAGS += -DAOS_TIMER_SERVICE         // Macro for the legacy timer service. Disabled by default.
      # GLOBAL_CFLAGS += -DENABLE_COUNTDOWN_LIST     // Macro for the legacy local countdown timer. Disabled by default.
      # GLOBAL_CFLAGS += -DENABLE_LOCALTIMER         // Macro for the legacy local timer. Disabled by default.
      # GLOBAL_CFLAGS += -DENABLE_PERIOD_TIMER       // Macro for the legacy periodic timer. Disabled by default.
      # GLOBAL_CFLAGS += -DENABLE_RANDOM_TIMER       // Macro for the legacy random timer. Disabled by default.
    • Private label projects: Disable the DeviceTimer property and use properties such as LocalTimer with the following macro configuration:

      # GLOBAL_CFLAGS += -DAIOT_DEVICE_TIMER_ENABLE  // Macro for DeviceTimer. Disable for private label projects.
      GLOBAL_CFLAGS += -DAOS_TIMER_SERVICE         // Macro for the legacy timer service. Enable for private label projects.
      GLOBAL_CFLAGS += -DENABLE_COUNTDOWN_LIST     // Macro for the legacy local countdown timer. Enable for private label projects.
      GLOBAL_CFLAGS += -DENABLE_LOCALTIMER         // Macro for the legacy local timer. Enable for private label projects.
      GLOBAL_CFLAGS += -DENABLE_PERIOD_TIMER       // Macro for the legacy periodic timer. Enable for private label projects.
      GLOBAL_CFLAGS += -DENABLE_RANDOM_TIMER       // Macro for the legacy random timer. Enable for private label projects.

    For more information, see On-device Timer Function.

  • Optimized the process for bringing gateway sub-devices online

    • The number of sub-devices that can go online at a time is increased to 50. Note: If the number of sub-devices connected to a gateway exceeds 30, we recommend that you set FEATURE_ALCS_ENABLED to n to disable the local communication feature.

    • You can increase the SDK cache queue length based on memory availability and the number of sub-devices by configuring the CONFIG_MSGCACHE_QUEUE_MAXLEN macro. For gateway systems with sufficient memory (such as Linux systems), you can set the cache queue length to 160.

    • You can increase the MQTT receive and transmit buffer sizes based on the maximum data volume per packet by configuring the CONFIG_MQTT_RX_MAXLEN and CONFIG_MQTT_TX_MAXLEN macros. For gateway systems with sufficient memory (such as Linux systems), you can set these values to 16384 or higher.

  • TG7100C chip BSP updates

    • Added support for adaptive testing for CE certification.

    • Reduced ADC sampling noise.

    • Fixed an issue where PWM channel 4 was unavailable.

    • Fixed a GPIO interrupt clearing issue in some scenarios.

  • Other chip BSP updates

    • Removed code for unmaintained chips and boards.

    • Renamed ASR5501 to ASR5502.

1.6.6-4

  • The standard application for smart light strips is available by request. To apply, see Get SDK for contact information.

  • TG7100C chip BSP updates

    • Added support for device hotspot network configuration on the TG7100C.

    • Memory optimization: Reduced memory usage of the network protocol stack and enabled multiple heaps in AliOS Things.

    • Optimized interrupt disabling during reboot and GPIO interrupts.

  • Bug fixes

    • Fixed a local timer issue on the ASR5502.

    • Fixed compilation errors on some platforms.

    • Fixed a sub-device unsubscribe issue.

    • Fixed a device shadow reset issue when offline.

1.6.6

  • Introduced a new Bluetooth-assisted network configuration solution, compatible with Tmall Genie App V4.13.0 and later, and the Cloud Intelligence App V3.5.5 and later.

  • Added support for multi-module OTA updates.

  • Added support for resetting sub-devices without unbinding them from the account.

  • Added support for the TG7100C chip

    • Supports Bluetooth-assisted network configuration, one-click network configuration, zero-configuration networking, and device hotspot network configuration.

    • Optimized the network protocol stack to reduce memory consumption.

  • Other BSP updates

    • BK7231: Added support for ADC CLOCK.

    • RTL8710: Added support for ADC.

    • ASR5502: Added MATH LIB.

  • Enhancements

    • Optimized C-SDK passthrough sample code.

    • Enabled support for 64-character passwords in category-specific network configuration.

    • Optimized local rhythm effects.

  • Bug fixes

    • Fixed a null pointer exception in timer_service under specific conditions.

    • Fixed a region switching issue while a sub-device was coming online.

    • Fixed an exception in the sample firmware for the RTL8710 module.

    • Fixed a data processing issue in the local timer.

New features in SDK V1.6.2

  • Added support for gateways to batch-request and asynchronously receive sub-device triplets.

  • Added support for gateways to bring sub-devices online in batches.

  • Added support for adapting the non-AliOS Things SDK to FreeRTOS.

    For more information, see SDK Adaptation Guide for Non-AliOS Things.

  • Added support for authorized access to on-device sound pickup and rhythm effects for lighting products.

New features in SDK V1.6.0

  • Support for the global unified activation center

    If you set the default_region parameter to SINGAPORE or MAINLAND when you compile the firmware, the device can be used globally.

  • Optimized device reconnection policy

    This feature, enabled by default, optimizes the cloud reconnection strategy after an MQTT disconnection.

  • Optimized duration for Bluetooth-assisted network configuration

    This feature, enabled by default, reduces the total time required for Bluetooth-assisted network configuration and binding.

  • Offline network configuration and control with Bluetooth assistance

    This feature allows devices to complete network configuration even with an unreliable internet connection, and enables the app to control them via Bluetooth.

  • Device local clock synchronization service

    This feature provides a time synchronization mechanism between devices for scenarios such as synchronizing group-controlled lights.

New features in SDK V1.5.0

  • Optimized local group control

    This feature, enabled by default, improves local group control performance and can enhance the synchronization of group control and group rhythm for lighting products.

  • Device certificate distribution tool

    For more information, see Device Certificate Distribution Tool Guide.

  • Offline factory reset

    This feature allows a factory reset to be triggered on an offline device. The device executes the reset after it comes back online.

New features in SDK V1.4.0

  • Support for the unified activation center for gateways and sub-devices

    Version 1.4.0 refactors the gateway reference application to allow sub-devices outside the Chinese mainland to switch data centers. To enable this feature, use the following configurations.

    • If you are developing with the AliOS version of the SDK, you need to set FEATURE_DM_UNIFIED_SERVICE_POST in the Products/example/linkkit_gateway/make.settings file to y.DM_UNIFIED_SERVICE_POST

    • If you are developing based on the non-AliOS Things version of the SDK, edit themake.settings file in the root directory and addFEATURE_DM_UNIFIED_SERVICE_POST=y. For more information, see Gateway Development.

  • Device offline log feature

    For devices that support device hotspot network configuration, if the configuration or binding process fails, the app guides the user to run diagnostics. The device sends key logs—such as error codes, cloud-reported tokens, and the time taken to acquire an IP address—to the app. The app then uploads these logs to the cloud. You can view the logs on the device management page in the IoT Platform console to facilitate remote O&M.

    To enable this feature, add the configuration itemGLOBAL_CFLAGS += -DDEV_OFFLINE_LOG_ENABLE to your application's mk file. If you are developing based on linkkit_gateway, this configuration is already included in thelinkkit_gateway.mk file, as shown in the following figure.dev_offline_log

    Note

    This feature uses approximately 4 KB of code space and 3 KB of RAM. The RAM is released immediately after diagnostics are complete. If diagnostics are not run, the RAM is released five minutes after power-on. Evaluate your resource availability before enabling this feature.

  • Optimized device hotspot network configuration

    This default optimization reduces the connection time to data centers outside the Chinese mainland when using device hotspot network configuration.

  • Optimized Bluetooth-assisted network configuration

    This optimization reduces the connection time to data centers in countries and regions outside the Chinese mainland (including Hong Kong, Macao, and Taiwan regions of China) using Bluetooth-assisted network configuration. It also retrieves and displays device self-check information when exceptions occur during the configuration process, allowing detailed error information to be viewed on the mobile app. These features for Bluetooth-assisted network configuration are enabled by default in the comboapp sample application, meaning the following configuration items are enabled incomboapp.mk.

    GLOBAL_CFLAGS += -DAWSS_REGION_ENABLE
    GLOBAL_CFLAGS += -DDEV_ERRCODE_ENABLE
    Note

    For devices that use Bluetooth-assisted network configuration, refer to the comboapp sample application for development.

  • Diagnostics for device-to-router connection failures

    This feature, enabled by default, allows the device to run a self-check and analyze the specific cause of a router connection failure during Wi-Fi network configuration. The detailed error code is then displayed on the mobile app.

  • Wi-Fi production line testing tool module

    • Description: This feature is enabled by default as a standalone testing tool module. The application layer can call this module to search for details of a specified router.

      • The default maximum search time is 3 seconds.

      • Checks if the router can be found.

      • Checks if the router's signal strength is too weak.

      • Returns the result to the application layer when the specified router is found.

    • Limitations

      • Cannot be used when the device is in hotspot mode.

      • Cannot be used when the device is connected to a router.

      • Cannot be used in network configuration mode.

    • Sample code:

      For usage examples, see the implementation in theapp_entry.c file of the living_platform sample application.

      #define TEST_LINE_AP                        "ali_product_line_test"
      #define TEST_RSSI_THRESHOLD                 (-60)
      static void handle_apscan_cmd(char *pwbuf, int blen, int argc, char **argv)
      {
          int ret = 0;
          ap_scan_info_t scan_result;
          int ap_scan_result = -1;
          if (argc == 0) {
              // start ap scanning for default 3 seconds
              memset(&scan_result, 0, sizeof(ap_scan_info_t));
              ap_scan_result = awss_apscan_process(NULL, TEST_LINE_AP, &scan_result);
              if ( (ap_scan_result == 0) && (scan_result.found) ) {
                  aos_cli_printf("AP Info: auth(%d) chan(%d) mac(%02X:%02X:%02X:%02X:%02X:%02X) rssi(%d)\r\n", scan_result.auth, 
                                  scan_result.channel, scan_result.mac[0], scan_result.mac[1], scan_result.mac[2],
                                  scan_result.mac[3], scan_result.mac[4], scan_result.mac[5], scan_result.rssi);
                  if (scan_result.rssi < TEST_RSSI_THRESHOLD) {
                      aos_cli_printf("AP_SCAN AP rssi too low\r\n");
                  } else {
                      aos_cli_printf("AP_SCAN AP found\r\n");
                  }
              } else {
                  aos_cli_printf("AP_SCAN AP not found\r\n");
              }
          }
      }

      After powering on a device running the living_platform application, enter the commandapscan to trigger a check for the specified router.

      • If the detected AP's RSSI is too low, the device logs the message:AP_SCAN AP rssi too low.

      • If the AP is detected and its RSSI is sufficient, the device logs the message:AP_SCAN AP found.

      • If the AP is not detected, the device logs the message:AP_SCAN AP not found.

New features in SDK V1.3.0

  • Batch network configuration for production lines

    Device manufacturers can connect devices to a designated production testing router on the assembly line. When this feature is enabled, the device automatically connects to the router within 3 seconds of power-on. This feature is disabled by default. To enable it, follow these steps.

    • Add the configuration itemGLOBAL_CFLAGS += -DMANUFACT_AP_FIND_ENABLE to the application's mk file.

    • Change the production testing router's SSID and password in theapp_entry.c file.

      • The default SSID isali_mprov_TEST_AP, whereali_mprov_ is a prefix automatically added by the module andTEST_AP is a field that developers can customize.

      • The default password isTEST_PASSWORD.

      配置示例

      Note

      This feature will not be enabled if the application-level SSID or router password fields are empty. If a correct SSID and password are set, the device searches for this router upon power-on in an unconfigured state. If found, it connects; otherwise, it proceeds to the standard network configuration mode.

  • Batch network configuration for end users

    Supports quick batch network configuration for multiple devices of the same model by end users via the app. Devices must support device hotspot network configuration or zero-configuration networking. A maximum of 20 devices can be configured in a single batch.

    To enable this feature, add the configuration itemGLOBAL_CFLAGS += -DAWSS_BATCH_DEVAP_ENABLE to the application's mk file. If you are developing based on living_platform, this configuration is already included in theliving_platform.mk file, as shown in the following figure.

    配置示例

  • Error code diagnostics for device hotspot network configuration

    This feature displays exceptions that occur while the device is connecting to a router or the cloud via device hotspot network configuration. Exceptions can be viewed in the app's "Error Diagnosis" function.

    To enable this feature, add the configuration itemGLOBAL_CFLAGS += -DDEV_ERRCODE_ENABLE to the application's mk file. If you are developing based on living_platform, this configuration is already included in theliving_platform.mk file, as shown in the following figure.

    配置示例

  • Local group control and group rhythm

    This feature enables synchronized rhythm effects for devices within a group of lighting products.

    To enable this feature, follow these steps.

    • Make sure that the local communication feature is enabled, which means that in the make.settings file, FEATURE_ALCS_ENABLED is set to y, as shown in the following figure. Configuration example

    • Add configuration items to the application's mk file. If you are developing based on living_platform, add the following configurations to theliving_platform.mk file.

      GLOBAL_CFLAGS += -DALCS_GROUP_COMM_ENABLE
      GLOBAL_CFLAGS += -DDM_UNIFIED_SERVICE_POST
  • Offline OTA

    This feature provides a way to repair firmware with an update if the device fails during network configuration or cloud connection in device hotspot mode. Both standard and secure offline OTA updates are supported.

    To enable this feature, add the configuration itemGLOBAL_CFLAGS += -DDEV_OFFLINE_OTA_ENABLE to the application's mk file. If you are developing based on living_platform, this configuration is already included in theliving_platform.mk file, as shown in the following figure.

    配置示例

    You can also enable secure signature verification for offline OTA by following these steps.

    1. Add the configuration itemGLOBAL_CFLAGS += -DDEV_OFFLINE_SECURE_OTA_ENABLE to the application's mk file.

    2. Obtain the product's public key. In the IoT Platform console, navigate to the Operation Center > Device O&M > Firmware Update > Secure Upgrade page. Enable the secure upgrade switch for the corresponding product and click Copy.

    3. In theLiving_SDK/framework/uOTA/src/verify/ota_public_key_config.h file, replace the two lines of data indicated by the red box in the following figure with the public key information you copied.配置示例

  • Optimized token for Wi-Fi device zero-configuration networking

    This feature allows the app to generate and transmit a binding token to the device during the zero-configuration networking process, which resolves binding failures caused by a router's AP isolation mode.

    To enable this feature, add the configuration itemGLOBAL_CFLAGS += -DAWSS_ZCONFIG_APPTOKEN to the application's mk file. If you are developing based on living_platform, this configuration is already included in theliving_platform.mk file, as shown in the following figure.

    配置示例

New features in SDK V1.1.0

  • Unified activation for devices outside the Chinese mainland

    There are three data centers outside the Chinese mainland: Singapore, US, and Germany. Devices outside the Chinese mainland will connect to the Singapore activation center during network activation. When the device is bound, the platform automatically switches it to the appropriate data center based on the app user's region. For more information, see Compile based on V1.1.0 SDK (linkkitapp).

  • Timer component

    Added support for parsing simple product models for countdown, local, periodic, and random timers.

  • Optimized cloud connection

    Improved device-to-cloud connection speed.

  • Optimized network configuration and binding

    • Implemented multicast encoding for one-click network configuration to prevent binding failures caused by AP isolation and improve the binding success rate.

    • Added Bluetooth-assisted network configuration.

    • Added encrypted password storage.

    • Added notifications for successful binding and unbinding events.