The WiFi enabled version of pelion-example-common. Later, this may be merged to pelion-example-common.

Committer:
Andrew Chong
Date:
Fri Jan 25 16:32:31 2019 +0900
Revision:
4:d29ff0838db9
Parent:
0:fdc18ffe96a4
Updated the config for ESP8266 WiFi shield, SDT3976C, enablement.
https://os.mbed.com/components/SDT3976C/
Make sure to edit the WiFi SSID and password.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Andrew Chong 0:fdc18ffe96a4 1 // ----------------------------------------------------------------------------
Andrew Chong 0:fdc18ffe96a4 2 // Copyright 2016-2017 ARM Ltd.
Andrew Chong 0:fdc18ffe96a4 3 //
Andrew Chong 0:fdc18ffe96a4 4 // SPDX-License-Identifier: Apache-2.0
Andrew Chong 0:fdc18ffe96a4 5 //
Andrew Chong 0:fdc18ffe96a4 6 // Licensed under the Apache License, Version 2.0 (the "License");
Andrew Chong 0:fdc18ffe96a4 7 // you may not use this file except in compliance with the License.
Andrew Chong 0:fdc18ffe96a4 8 // You may obtain a copy of the License at
Andrew Chong 0:fdc18ffe96a4 9 //
Andrew Chong 0:fdc18ffe96a4 10 // http://www.apache.org/licenses/LICENSE-2.0
Andrew Chong 0:fdc18ffe96a4 11 //
Andrew Chong 0:fdc18ffe96a4 12 // Unless required by applicable law or agreed to in writing, software
Andrew Chong 0:fdc18ffe96a4 13 // distributed under the License is distributed on an "AS IS" BASIS,
Andrew Chong 0:fdc18ffe96a4 14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Andrew Chong 0:fdc18ffe96a4 15 // See the License for the specific language governing permissions and
Andrew Chong 0:fdc18ffe96a4 16 // limitations under the License.
Andrew Chong 0:fdc18ffe96a4 17 // ----------------------------------------------------------------------------
Andrew Chong 0:fdc18ffe96a4 18
Andrew Chong 0:fdc18ffe96a4 19 // This file is a template and it's intented to be copied to the application
Andrew Chong 0:fdc18ffe96a4 20 // Enable this configuration
Andrew Chong 0:fdc18ffe96a4 21
Andrew Chong 0:fdc18ffe96a4 22 #ifndef MBED_CLOUD_CLIENT_USER_CONFIG_H
Andrew Chong 0:fdc18ffe96a4 23 #define MBED_CLOUD_CLIENT_USER_CONFIG_H
Andrew Chong 0:fdc18ffe96a4 24
Andrew Chong 0:fdc18ffe96a4 25 #ifdef MBED_CONF_APP_ENDPOINT_TYPE
Andrew Chong 0:fdc18ffe96a4 26 #define MBED_CLOUD_CLIENT_ENDPOINT_TYPE MBED_CONF_APP_ENDPOINT_TYPE
Andrew Chong 0:fdc18ffe96a4 27 #else
Andrew Chong 0:fdc18ffe96a4 28 #define MBED_CLOUD_CLIENT_ENDPOINT_TYPE "default"
Andrew Chong 0:fdc18ffe96a4 29 #endif
Andrew Chong 0:fdc18ffe96a4 30
Andrew Chong 0:fdc18ffe96a4 31 // Enable either TCP or UDP, but no both
Andrew Chong 0:fdc18ffe96a4 32 #define MBED_CLOUD_CLIENT_TRANSPORT_MODE_TCP
Andrew Chong 0:fdc18ffe96a4 33 // MBED_CLOUD_CLIENT_TRANSPORT_MODE_UDP
Andrew Chong 0:fdc18ffe96a4 34
Andrew Chong 0:fdc18ffe96a4 35 #define MBED_CLOUD_CLIENT_LIFETIME 3600
Andrew Chong 0:fdc18ffe96a4 36
Andrew Chong 0:fdc18ffe96a4 37 #define MBED_CLOUD_CLIENT_SUPPORT_UPDATE
Andrew Chong 0:fdc18ffe96a4 38 #define SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE 1024
Andrew Chong 0:fdc18ffe96a4 39
Andrew Chong 0:fdc18ffe96a4 40 // set flag to enable update support in mbed Cloud client
Andrew Chong 0:fdc18ffe96a4 41 #define MBED_CLOUD_CLIENT_SUPPORT_UPDATE
Andrew Chong 0:fdc18ffe96a4 42
Andrew Chong 0:fdc18ffe96a4 43 // set download buffer size in bytes (min. 1024 bytes)
Andrew Chong 0:fdc18ffe96a4 44
Andrew Chong 0:fdc18ffe96a4 45 // Use larger buffers in Linux //
Andrew Chong 0:fdc18ffe96a4 46 #ifdef __linux__
Andrew Chong 0:fdc18ffe96a4 47 #define MBED_CLOUD_CLIENT_UPDATE_BUFFER (2 * 1024 * 1024)
Andrew Chong 0:fdc18ffe96a4 48 #else
Andrew Chong 0:fdc18ffe96a4 49 #define MBED_CLOUD_CLIENT_UPDATE_BUFFER 2048
Andrew Chong 0:fdc18ffe96a4 50 #endif
Andrew Chong 0:fdc18ffe96a4 51
Andrew Chong 0:fdc18ffe96a4 52 // Developer flags for Update feature
Andrew Chong 0:fdc18ffe96a4 53 #if MBED_CONF_APP_DEVELOPER_MODE == 1
Andrew Chong 0:fdc18ffe96a4 54 #define MBED_CLOUD_DEV_UPDATE_CERT
Andrew Chong 0:fdc18ffe96a4 55 #define MBED_CLOUD_DEV_UPDATE_ID
Andrew Chong 0:fdc18ffe96a4 56 #endif // MBED_CONF_APP_DEVELOPER_MODE
Andrew Chong 0:fdc18ffe96a4 57
Andrew Chong 0:fdc18ffe96a4 58 #endif // MBED_CLOUD_CLIENT_USER_CONFIG_H
Andrew Chong 0:fdc18ffe96a4 59