update docs for http client
This commit is contained in:
parent
102c2e753a
commit
63330ab72e
42
README.md
42
README.md
|
@ -42,46 +42,52 @@ menuconfig配置
|
|||
RT-Thread online packages --->
|
||||
IoT - internet of things --->
|
||||
IoT Cloud --->
|
||||
[ ] ucloud-iot-sdk: ucloud iot sdk for uiot-core platform. --->
|
||||
--- ucloud-iothub: ucloud iot sdk for uiot-core platform
|
||||
[ ] Enable Mqtt link uiot-core platform
|
||||
[ ] Enable Http link uiot-core platform
|
||||
ucloud Device Config --->
|
||||
[ ] ucloud-iot-sdk: Ucloud iot sdk for uiot-core platform. --->
|
||||
--- ucloud_iot_sdk: Ucloud iot sdk for uiot-core platform
|
||||
Ucloud Device Config --->
|
||||
[ ] Enable Mqtt Link uiot-core Platform
|
||||
[ ] Enable Http Link uiot-core Platform
|
||||
[ ] Enable Ucloud Debug
|
||||
Version (latest) --->
|
||||
```
|
||||
|
||||
## 3 软件包的使用
|
||||
根据产品需求选择合适的应用示例修改新增业务逻辑,也可新增例程编写新的业务逻辑。
|
||||
```
|
||||
--- ucloud-iot-sdk: ucloud iot sdk for uiot-core platform.
|
||||
[*] Enable Mqtt link uiot-core platform
|
||||
[ ] Enable Http link uiot-core platform
|
||||
--- ucloud-iot-sdk: Ucloud iot sdk for uiot-core platform.
|
||||
Ucloud Device Config --->
|
||||
[*] Enable Ucloud Mqtt Sample
|
||||
[ ] Enable Ucloud Mqtt Dynamic Auth Sample
|
||||
[*] Enable Mqtt Link uiot-core Platform
|
||||
[ ] Enable Ucloud Mqtt Sample
|
||||
[ ] Enable Ucloud Mqtt Dynamic Auth Sample
|
||||
[*] Enable Http Link uiot-core Platform
|
||||
[ ] Enable Ucloud Http Publish Sample
|
||||
[ ] Enable Ucloud Http Upload File Sample
|
||||
[*] Enable Shadow
|
||||
[ ] Enable Ucloud Shadow Sample
|
||||
[*] Enable Dev Model
|
||||
[ ] Enable Ucloud Dev Model Sample
|
||||
[*] Enable Ota
|
||||
[ ] Enable Ucloud Ota Sample
|
||||
[ ] Enable Tls
|
||||
-*- Enable Tls
|
||||
[ ] Enable Ucloud Debug
|
||||
Version (latest) --->
|
||||
```
|
||||
|
||||
- 选项说明
|
||||
|
||||
`Enable Mqtt link uiot-core platform`:使能MQTT连接云平台功能。
|
||||
|
||||
`Enable Http link uiot-core platform`:使能HTTP连接云平台功能,只支持https,勾选会关联选中mbedTLS软件包。
|
||||
|
||||
`Ucloud Device Config `:填写当前设备认证要素,当认证模式为动态认证时,设备密钥可以不填写
|
||||
|
||||
`Enable Mqtt Link uiot-core Platform`:使能MQTT连接云平台功能。
|
||||
|
||||
`Enable Ucloud Mqtt Sample`:使能静态注册mqtt和注册成功后收发消息的案例
|
||||
|
||||
`Enable Ucloud Mqtt Dynamic Auth Sample`: 使能动态注册mqtt和注册成功后收发消息的案例
|
||||
|
||||
`Enable Http Link uiot-core Platform`:使能HTTP连接云平台功能,包括使用https上传消息和上传文件,只支持https,勾选会关联选中mbedTLS软件包。
|
||||
|
||||
`Enable Ucloud Http Publish Sample`:使能使用https向云平台上传消息的案例
|
||||
|
||||
`Enable Ucloud Http Upload File Sample`: 使能使用https向云平台上传一段buffer在云端保存成文件的案例
|
||||
|
||||
`Enable Shadow`:使能设备影子功能
|
||||
|
||||
`Enable Ucloud Shadow Sample`:使能设备影子的案例
|
||||
|
@ -90,7 +96,7 @@ RT-Thread online packages --->
|
|||
|
||||
`Enable Ucloud Dev Model Sample`:使能物模型的案例
|
||||
|
||||
`Enable Ota`:使能远程升级版本的功能,若使能,则会关联选中fal软件包。
|
||||
`Enable Ota`:使能远程升级版本的功能,若使能由于要使用flash的分区功能进行ota升级,会关联选中fal软件包。
|
||||
|
||||
`Enable Ucloud Ota Sample`:使能远程升级版本的案例
|
||||
|
||||
|
@ -98,7 +104,7 @@ RT-Thread online packages --->
|
|||
|
||||
`Enable Ucloud Debug`: 使能调试打印输出
|
||||
|
||||
`Version (latest) --->`:
|
||||
`Version (latest) --->`:选择软件包的版本
|
||||
|
||||
- 使用 `pkgs --update` 命令下载需要使用的软件包
|
||||
|
||||
|
|
|
@ -22,4 +22,4 @@
|
|||
|
||||
`rtthread`: 与rtthread操作系统相关的一些接口,在rtthread系统上使用时一般不需要修改。
|
||||
|
||||
`ssl`: 可以通过修改mbedtls文件夹下的HAL_TLS_config.h打开或关闭宏添加或删除对应的功能。
|
||||
`ssl`: 可以通过修改mbedtls文件夹下的HAL_TLS_config.h打开或关闭宏添加或删除mbedtls对应的功能。
|
||||
|
|
|
@ -41,18 +41,15 @@
|
|||
|
||||
1. 打开mqtt sample
|
||||
```
|
||||
--- ucloud-iot-sdk: ucloud iot sdk for uiot-core platform.
|
||||
[*] Enable Mqtt link uiot-core platform
|
||||
[ ] Enable Http link uiot-core platform
|
||||
Ucloud Device Config --->
|
||||
[*] Enable Ucloud Mqtt Sample
|
||||
[ ] Enable Ucloud Mqtt Dynamic Auth Sample
|
||||
[*] Enable Shadow
|
||||
[ ] Enable Ucloud Shadow Sample
|
||||
[*] Enable Dev Model
|
||||
[ ] Enable Ucloud Dev Model Sample
|
||||
[*] Enable Ota
|
||||
[ ] Enable Ucloud Ota Sample
|
||||
--- ucloud-iot-sdk: Ucloud iot sdk for uiot-core platform.
|
||||
Ucloud Device Config --->
|
||||
[*] Enable Mqtt Link uiot-core Platform
|
||||
[*] Enable Ucloud Mqtt Sample
|
||||
[ ] Enable Ucloud Mqtt Dynamic Auth Sample
|
||||
[ ] Enable Http Link uiot-core Platform
|
||||
[ ] Enable Shadow
|
||||
[ ] Enable Dev Model
|
||||
[ ] Enable Ota
|
||||
[ ] Enable Tls
|
||||
[ ] Enable Ucloud Debug
|
||||
Version (latest) --->
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# 编译选项参考
|
||||
|
||||
使用本文件的编译选项测试可以通过了除动态注册外的所有sample
|
||||
使用本文件的编译选项测试通过了所有sample
|
||||
|
||||
## 运行硬件平台
|
||||
|
||||
|
@ -13,7 +13,7 @@ STM32f767ZI + ESP8266
|
|||
|
||||
## 开启功能
|
||||
|
||||
静态注册模式下,开启了设备影子,物模型 ,ota升级和tls
|
||||
开启了Mqtt和Http连接云平台,设备影子,物模型 ,ota升级和tls
|
||||
|
||||
## 依赖软件包
|
||||
|
||||
|
@ -120,7 +120,7 @@ rtthread配置如下:
|
|||
#define RT_SYSTEM_WORKQUEUE_PRIORITY 23
|
||||
#define RT_USING_SERIAL
|
||||
#define RT_SERIAL_USING_DMA
|
||||
#define RT_SERIAL_RB_BUFSZ 6144
|
||||
#define RT_SERIAL_RB_BUFSZ 1500
|
||||
#define RT_USING_HWTIMER
|
||||
#define RT_USING_PIN
|
||||
#define RT_USING_RTC
|
||||
|
@ -196,8 +196,6 @@ rtthread配置如下:
|
|||
/* IoT Cloud */
|
||||
|
||||
#define PKG_USING_UCLOUD_IOT_SDK
|
||||
#define PKG_USING_UCLOUD_MQTT
|
||||
#define PKG_USING_UCLOUD_MQTT_STATIC_AUTH
|
||||
|
||||
/* Ucloud Device Config */
|
||||
|
||||
|
@ -206,14 +204,19 @@ rtthread配置如下:
|
|||
#define PKG_USING_UCLOUD_IOT_SDK_PRODUCT_SECRET "PRODUCT_SECRET"
|
||||
#define PKG_USING_UCLOUD_IOT_SDK_DEVICE_SN "DEVICE_SN"
|
||||
#define PKG_USING_UCLOUD_IOT_SDK_DEVICE_SECRET "DEVICE_SECRET"
|
||||
#define PKG_USING_UCLOUD_TLS
|
||||
#define PKG_USING_UCLOUD_MQTT
|
||||
#define PKG_USING_UCLOUD_MQTT_SAMPLE
|
||||
#define PKG_USING_UCLOUD_MQTT_DYNAMIC_AUTH_SAMPLE
|
||||
#define PKG_USING_UCLOUD_HTTP
|
||||
#define PKG_USING_UCLOUD_HTTP_PUBLISH_SAMPLE
|
||||
#define PKG_USING_UCLOUD_HTTP_UPLOAD_FILE_SAMPLE
|
||||
#define PKG_USING_UCLOUD_SHADOW
|
||||
#define PKG_USING_UCLOUD_SHADOW_SAMPLE
|
||||
#define PKG_USING_UCLOUD_DEV_MODEL
|
||||
#define PKG_USING_UCLOUD_DEV_MODEL_SAMPLE
|
||||
#define PKG_USING_UCLOUD_OTA
|
||||
#define PKG_USING_UCLOUD_OTA_SAMPLE
|
||||
#define PKG_USING_UCLOUD_TLS
|
||||
#define PKG_USING_UCLOUD_DEBUG
|
||||
#define PKG_USING_UCLOUD_IOT_SDK_LATEST_VERSION
|
||||
|
||||
|
@ -225,7 +228,7 @@ rtthread配置如下:
|
|||
|
||||
#define MBEDTLS_AES_ROM_TABLES
|
||||
#define MBEDTLS_ECP_WINDOW_SIZE 2
|
||||
#define MBEDTLS_SSL_MAX_CONTENT_LEN 16384
|
||||
#define MBEDTLS_SSL_MAX_CONTENT_LEN 6144
|
||||
#define MBEDTLS_MPI_MAX_SIZE 1024
|
||||
#define MBEDTLS_CTR_DRBG_KEYSIZE 32
|
||||
#define PKG_USING_MBEDTLS_V2710
|
||||
|
|
|
@ -36,9 +36,9 @@ static int running_state = 0;
|
|||
static void http_upload_file_test_thread(void)
|
||||
{
|
||||
char md5[100];
|
||||
char *authorization = (char *)malloc(1024);
|
||||
char *authorization = (char *)HAL_Malloc(1024);
|
||||
memset(authorization, 0, 1024);
|
||||
char *put_url = (char *)malloc(1024);
|
||||
char *put_url = (char *)HAL_Malloc(1024);
|
||||
memset(put_url, 0, 1024);
|
||||
int ret = SUCCESS_RET;
|
||||
|
||||
|
|
Loading…
Reference in New Issue