Browse Source

【更新】阿里云接入三元组的配置
【移除】例程中的测试代码

Signed-off-by: Murphy <d2014zjt@163.com>

Murphy 6 years ago
parent
commit
613b63285a
2 changed files with 10 additions and 16 deletions
  1. 10 0
      ports/wrapper.c
  2. 0 16
      samples/dev_model/linkkit_example_solo.c

+ 10 - 0
ports/wrapper.c

@@ -16,10 +16,20 @@
 #define DBG_LVL                        DBG_INFO
 #include <rtdbg.h>
 
+#if defined(PKG_USING_ALI_IOTKIT_PRODUCT_KEY) \
+    && defined(PKG_USING_ALI_IOTKIT_PRODUCT_SECRET) \
+    && defined(PKG_USING_ALI_IOTKIT_DEVICE_NAME) \
+    && defined(PKG_USING_ALI_IOTKIT_DEVICE_SECRET)
+char _product_key[IOTX_PRODUCT_KEY_LEN + 1]       = PKG_USING_ALI_IOTKIT_PRODUCT_KEY;
+char _product_secret[IOTX_PRODUCT_SECRET_LEN + 1] = PKG_USING_ALI_IOTKIT_PRODUCT_SECRET;
+char _device_name[IOTX_DEVICE_NAME_LEN + 1]       = PKG_USING_ALI_IOTKIT_DEVICE_NAME;
+char _device_secret[IOTX_DEVICE_SECRET_LEN + 1]   = PKG_USING_ALI_IOTKIT_DEVICE_SECRET;
+#else
 char _product_key[IOTX_PRODUCT_KEY_LEN + 1]       = "a1wlm6xAOPf";
 char _product_secret[IOTX_PRODUCT_SECRET_LEN + 1] = "NfIdVcfBP7rtH24H";
 char _device_name[IOTX_DEVICE_NAME_LEN + 1]       = "DEV_419_ALINK_1";
 char _device_secret[IOTX_DEVICE_SECRET_LEN + 1]   = "asXuHqpF68Hqxx8nHQ077QkiikHmYJrA";
+#endif
 
 int HAL_GetFirmwareVersion(char *version)
 {

+ 0 - 16
samples/dev_model/linkkit_example_solo.c

@@ -64,21 +64,6 @@ char DEVICE_SECRET[IOTX_DEVICE_SECRET_LEN + 1] = {0};
 
 static user_example_ctx_t g_user_example_ctx;
 
-static char* rt_strlwr(char *str)
-{
-    if(str == NULL)
-        return NULL;
-         
-    char *p = str;
-    while (*p != '\0')
-    {
-        if(*p >= 'A' && *p <= 'Z')
-            *p = (*p) + 0x20;
-        p++;
-    }
-    return str;
-}
-
 /** cloud connected event callback */
 static int user_connected_event_handler(void)
 {
@@ -364,7 +349,6 @@ int linkkit_solo_main(void)
         /* Post Event Example */
         if ((cnt % 10) == 0) {
             user_post_event();
-					msh_exec("ps", strlen("ps"));
         }
 
         if (++cnt > 3600) {