forked from espressif/esp-aws-iot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial release of esp-aws-iot cloud framework
Moved from ESP-IDF repository
- Loading branch information
0 parents
commit b45c5e7
Showing
40 changed files
with
2,501 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
*.o | ||
|
||
# Example project files | ||
examples/**/sdkconfig | ||
examples/**/sdkconfig.old | ||
examples/**/build | ||
|
||
# AWS IoT Examples require device-specific certs/keys | ||
examples/*/main/certs/*.pem.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
stages: | ||
- build | ||
|
||
variables: | ||
BATCH_BUILD: "1" | ||
V: "0" | ||
MAKEFLAGS: "-j5 --no-keep-going" | ||
IDF_PATH: "$CI_PROJECT_DIR/idf/esp-idf" | ||
|
||
build_demo: | ||
stage: build | ||
image: $CI_DOCKER_REGISTRY/esp32-ci-env | ||
tags: | ||
- build | ||
script: | ||
# add gitlab ssh key | ||
- export PATH="$IDF_PATH/tools:$PATH" | ||
- mkdir -p ~/.ssh | ||
- chmod 700 ~/.ssh | ||
- echo -n $GITLAB_KEY > ~/.ssh/id_rsa_base64 | ||
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa | ||
- chmod 600 ~/.ssh/id_rsa | ||
- echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config | ||
- git --version | ||
- git submodule update --init --recursive | ||
- mkdir idf | ||
- cd idf | ||
- git clone --depth 1 $GITLAB_SSH_SERVER/idf/esp-idf.git | ||
- pushd esp-idf | ||
- ./tools/ci/mirror-submodule-update.sh | ||
- popd | ||
- cd .. | ||
- cd examples/thing_shadow | ||
- cat sdkconfig.ci >> sdkconfig.defaults | ||
- make defconfig && make -j4 | ||
- make clean && rm -rf build | ||
- idf.py build | ||
- cd ../.. | ||
- cd examples/subscribe_publish | ||
- cat sdkconfig.ci >> sdkconfig.defaults | ||
- make defconfig && make -j4 | ||
- make clean && rm -rf build | ||
- idf.py build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "aws-iot-device-sdk-embedded-C"] | ||
path = aws-iot-device-sdk-embedded-C | ||
url = https://github.com/espressif/aws-iot-device-sdk-embedded-C.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
set(COMPONENT_ADD_INCLUDEDIRS "port/include aws-iot-device-sdk-embedded-C/include") | ||
set(aws_sdk_dir aws-iot-device-sdk-embedded-C/src) | ||
set(COMPONENT_SRCS "${aws_sdk_dir}/aws_iot_jobs_interface.c" | ||
"${aws_sdk_dir}/aws_iot_jobs_json.c" | ||
"${aws_sdk_dir}/aws_iot_jobs_topics.c" | ||
"${aws_sdk_dir}/aws_iot_jobs_types.c" | ||
"${aws_sdk_dir}/aws_iot_json_utils.c" | ||
"${aws_sdk_dir}/aws_iot_mqtt_client.c" | ||
"${aws_sdk_dir}/aws_iot_mqtt_client_common_internal.c" | ||
"${aws_sdk_dir}/aws_iot_mqtt_client_connect.c" | ||
"${aws_sdk_dir}/aws_iot_mqtt_client_publish.c" | ||
"${aws_sdk_dir}/aws_iot_mqtt_client_subscribe.c" | ||
"${aws_sdk_dir}/aws_iot_mqtt_client_unsubscribe.c" | ||
"${aws_sdk_dir}/aws_iot_mqtt_client_yield.c" | ||
"${aws_sdk_dir}/aws_iot_shadow.c" | ||
"${aws_sdk_dir}/aws_iot_shadow_actions.c" | ||
"${aws_sdk_dir}/aws_iot_shadow_json.c" | ||
"${aws_sdk_dir}/aws_iot_shadow_records.c" | ||
"port/network_mbedtls_wrapper.c" | ||
"port/threads_freertos.c" | ||
"port/timer.c") | ||
|
||
set(COMPONENT_REQUIRES "mbedtls") | ||
set(COMPONENT_PRIV_REQUIRES "jsmn") | ||
|
||
register_component() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
menu "Amazon Web Services IoT Platform" | ||
|
||
config AWS_IOT_MQTT_HOST | ||
string "AWS IoT Endpoint Hostname" | ||
default "" | ||
help | ||
Default endpoint host name to connect to AWS IoT MQTT/S gateway | ||
|
||
This is the custom endpoint hostname and is specific to an AWS | ||
IoT account. You can find it by logging into your AWS IoT | ||
Console and clicking the Settings button. The endpoint hostname | ||
is shown under the "Custom Endpoint" heading on this page. | ||
|
||
If you need per-device hostnames for different regions or | ||
accounts, you can override the default hostname in your app. | ||
|
||
config AWS_IOT_MQTT_PORT | ||
int "AWS IoT MQTT Port" | ||
default 8883 | ||
range 0 65535 | ||
help | ||
Default port number to connect to AWS IoT MQTT/S gateway | ||
|
||
If you need per-device port numbers for different regions, you can | ||
override the default port number in your app. | ||
|
||
|
||
config AWS_IOT_MQTT_TX_BUF_LEN | ||
int "MQTT TX Buffer Length" | ||
default 512 | ||
range 32 65536 | ||
help | ||
Maximum MQTT transmit buffer size. This is the maximum MQTT | ||
message length (including protocol overhead) which can be sent. | ||
|
||
Sending longer messages will fail. | ||
|
||
config AWS_IOT_MQTT_RX_BUF_LEN | ||
int "MQTT RX Buffer Length" | ||
default 512 | ||
range 32 65536 | ||
help | ||
Maximum MQTT receive buffer size. This is the maximum MQTT | ||
message length (including protocol overhead) which can be | ||
received. | ||
|
||
Longer messages are dropped. | ||
|
||
|
||
|
||
config AWS_IOT_MQTT_NUM_SUBSCRIBE_HANDLERS | ||
int "Maximum MQTT Topic Filters" | ||
default 5 | ||
range 1 100 | ||
help | ||
Maximum number of concurrent MQTT topic filters. | ||
|
||
|
||
config AWS_IOT_MQTT_MIN_RECONNECT_WAIT_INTERVAL | ||
int "Auto reconnect initial interval (ms)" | ||
default 1000 | ||
range 10 3600000 | ||
help | ||
Initial delay before making first reconnect attempt, if the AWS IoT connection fails. | ||
Client will perform exponential backoff, starting from this value. | ||
|
||
config AWS_IOT_MQTT_MAX_RECONNECT_WAIT_INTERVAL | ||
int "Auto reconnect maximum interval (ms)" | ||
default 128000 | ||
range 10 3600000 | ||
help | ||
Maximum delay between reconnection attempts. If the exponentially increased delay | ||
interval reaches this value, the client will stop automatically attempting to reconnect. | ||
|
||
menu "Thing Shadow" | ||
|
||
config AWS_IOT_OVERRIDE_THING_SHADOW_RX_BUFFER | ||
bool "Override Shadow RX buffer size" | ||
default n | ||
help | ||
Allows setting a different Thing Shadow RX buffer | ||
size. This is the maximum size of a Thing Shadow | ||
message in bytes, plus one. | ||
|
||
If not overridden, the default value is the MQTT RX Buffer length plus one. If overriden, do not set | ||
higher than the default value. | ||
|
||
config AWS_IOT_SHADOW_MAX_SIZE_OF_RX_BUFFER | ||
int "Maximum RX Buffer (bytes)" | ||
depends on AWS_IOT_OVERRIDE_THING_SHADOW_RX_BUFFER | ||
default 513 | ||
range 32 65536 | ||
help | ||
Allows setting a different Thing Shadow RX buffer size. | ||
This is the maximum size of a Thing Shadow message in bytes, | ||
plus one. | ||
|
||
|
||
config AWS_IOT_SHADOW_MAX_SIZE_OF_UNIQUE_CLIENT_ID_BYTES | ||
int "Maximum unique client ID size (bytes)" | ||
default 80 | ||
range 4 1000 | ||
help | ||
Maximum size of the Unique Client Id. | ||
|
||
config AWS_IOT_SHADOW_MAX_SIMULTANEOUS_ACKS | ||
int "Maximum simultaneous responses" | ||
default 10 | ||
range 1 100 | ||
help | ||
At any given time we will wait for this many responses. This will correlate to the rate at which the | ||
shadow actions are requested | ||
|
||
config AWS_IOT_SHADOW_MAX_SIMULTANEOUS_THINGNAMES | ||
int "Maximum simultaneous Thing Name operations" | ||
default 10 | ||
range 1 100 | ||
help | ||
We could perform shadow action on any thing Name and this is maximum Thing Names we can act on at any | ||
given time | ||
|
||
config AWS_IOT_SHADOW_MAX_JSON_TOKEN_EXPECTED | ||
int "Maximum expected JSON tokens" | ||
default 120 | ||
help | ||
These are the max tokens that is expected to be in the Shadow JSON document. Includes the metadata which | ||
is published | ||
|
||
config AWS_IOT_SHADOW_MAX_SHADOW_TOPIC_LENGTH_WITHOUT_THINGNAME | ||
int "Maximum topic length (not including Thing Name)" | ||
default 60 | ||
range 10 1000 | ||
help | ||
All shadow actions have to be published or subscribed to a topic which is of the format | ||
$aws/things/{thingName}/shadow/update/accepted. This refers to the size of the topic without the Thing | ||
Name | ||
|
||
config AWS_IOT_SHADOW_MAX_SIZE_OF_THING_NAME | ||
int "Maximum Thing Name length" | ||
default 20 | ||
range 4 1000 | ||
help | ||
Maximum length of a Thing Name. | ||
|
||
endmenu # Thing Shadow | ||
endmenu # AWS IoT |
Oops, something went wrong.