]> granicus.if.org Git - esp-idf/commitdiff
wifi: add set factory information feature by customer in wps
authorDeng Xin <dengxin@espressif.com>
Mon, 14 May 2018 02:58:19 +0000 (10:58 +0800)
committerLiu Zhi Fu <liuzhifu@espressif.com>
Thu, 17 May 2018 08:45:53 +0000 (16:45 +0800)
components/esp32/include/esp_wps.h
components/esp32/lib

index efe37bd028de1a70e091ec25779044d3cd3a2da3..9bd61cc3af1bebbed13756e45e098d0a686e48cd 100644 (file)
@@ -56,14 +56,33 @@ typedef enum wps_type {
 
 extern const wps_crypto_funcs_t g_wifi_default_wps_crypto_funcs;
 
+#define WPS_MAX_MANUFACTURER_LEN 65
+#define WPS_MAX_MODEL_NUMBER_LEN 33
+#define WPS_MAX_MODEL_NAME_LEN   33
+#define WPS_MAX_DEVICE_NAME_LEN  33
+
+typedef struct {
+    char manufacturer[WPS_MAX_MANUFACTURER_LEN]; /*!< Manufacturer, null-terminated string. The default manufcturer is used if the string is empty */
+    char model_number[WPS_MAX_MODEL_NUMBER_LEN]; /*!< Model number, null-terminated string. The default model number is used if the string is empty */
+    char model_name[WPS_MAX_MODEL_NAME_LEN];     /*!< Model name, null-terminated string. The default model name is used if the string is empty */
+    char device_name[WPS_MAX_DEVICE_NAME_LEN];   /*!< Device name, null-terminated string. The default device name is used if the string is empty */
+} wps_factory_information_t;
+
 typedef struct {
     wps_type_t wps_type;
     const wps_crypto_funcs_t *crypto_funcs;
-}esp_wps_config_t;
+    wps_factory_information_t factory_info;
+} esp_wps_config_t;
 
 #define WPS_CONFIG_INIT_DEFAULT(type) { \
     .wps_type = type, \
     .crypto_funcs = &g_wifi_default_wps_crypto_funcs, \
+    .factory_info = {   \
+        .manufacturer = "ESPRESSIF",  \
+        .model_number = "ESP32",  \
+        .model_name = "ESPRESSIF IOT",  \
+        .device_name = "ESP STATION",  \
+    }  \
 }
 
 /**
index 618fa4eb596c07521d9cdcc1ba019fe5cd42cec6..3b4ce03f4634ed8837868bb45094d0ec3ee1deb5 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 618fa4eb596c07521d9cdcc1ba019fe5cd42cec6
+Subproject commit 3b4ce03f4634ed8837868bb45094d0ec3ee1deb5