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:
prashantrar
Date:
Mon Mar 12 19:11:01 2018 +0800
Revision:
0:07e701513236
Child:
1:fe5f4acd0b5e
initial push

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 0:07e701513236 25
prashantrar 0:07e701513236 26 #define MBED_CLOUD_CLIENT_ENDPOINT_TYPE "default"
prashantrar 0:07e701513236 27
prashantrar 0:07e701513236 28 // Enable either TCP or UDP, but no both
prashantrar 0:07e701513236 29 #define MBED_CLOUD_CLIENT_TRANSPORT_MODE_TCP
prashantrar 0:07e701513236 30 // MBED_CLOUD_CLIENT_TRANSPORT_MODE_UDP
prashantrar 0:07e701513236 31
prashantrar 0:07e701513236 32 #define MBED_CLOUD_CLIENT_LIFETIME 3600
prashantrar 0:07e701513236 33
prashantrar 0:07e701513236 34 #define MBED_CLOUD_CLIENT_SUPPORT_UPDATE
prashantrar 0:07e701513236 35 #define SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE 1024
prashantrar 0:07e701513236 36
prashantrar 0:07e701513236 37 // set flag to enable update support in mbed Cloud client
prashantrar 0:07e701513236 38 #define MBED_CLOUD_CLIENT_SUPPORT_UPDATE
prashantrar 0:07e701513236 39
prashantrar 0:07e701513236 40 // set download buffer size in bytes (min. 1024 bytes)
prashantrar 0:07e701513236 41
prashantrar 0:07e701513236 42 // Use larger buffers in Linux //
prashantrar 0:07e701513236 43 #ifdef __linux__
prashantrar 0:07e701513236 44 #define MBED_CLOUD_CLIENT_UPDATE_BUFFER (2 * 1024 * 1024)
prashantrar 0:07e701513236 45 #else
prashantrar 0:07e701513236 46 #define MBED_CLOUD_CLIENT_UPDATE_BUFFER 2048
prashantrar 0:07e701513236 47 #endif
prashantrar 0:07e701513236 48
prashantrar 0:07e701513236 49 // Developer flags for Update feature
prashantrar 0:07e701513236 50 #if MBED_CONF_APP_DEVELOPER_MODE == 1
prashantrar 0:07e701513236 51 #define MBED_CLOUD_DEV_UPDATE_CERT
prashantrar 0:07e701513236 52 #define MBED_CLOUD_DEV_UPDATE_ID
prashantrar 0:07e701513236 53 #endif // MBED_CONF_APP_DEVELOPER_MODE
prashantrar 0:07e701513236 54
prashantrar 0:07e701513236 55 #endif // MBED_CLOUD_CLIENT_USER_CONFIG_H
prashantrar 0:07e701513236 56