This repository contains the example code to: 1) Connect RTL8195AM board to Pelion 2) Enable and run firmware update on RTL8195AM

RTL8195AM SMCC application demonstrates how to create a Simple Mbed Cloud Client application that can connect to Pelion, register resources and get FW updates.

Committer:
Lu Zhang
Date:
Fri Dec 14 18:59:27 2018 +0800
Revision:
7:f3c46cdb5ccf
Parent:
1:fe5f4acd0b5e
Update mbed-os.lib link to the master repository (14 Dec 2018)

Who changed what in which revision?

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