
This is a simple mbed client example demonstrating, registration of a device with mbed Device Connector and reading and writing values as well as deregistering on different Network Interfaces including Ethernet, WiFi, 6LoWPAN ND and Thread respectively.
Fork of mbed-os-example-client by
security.h@44:2b472e66a942, 2016-12-13 (annotated)
- Committer:
- mbed_official
- Date:
- Tue Dec 13 08:45:11 2016 +0000
- Revision:
- 44:2b472e66a942
- Parent:
- 32:7b3841243d70
- Child:
- 68:6c535975a6e3
Fix UBLOX ODIN Wifi Connectivity, add IPVx print
Turns out the UBLOX ODIN WiFi will not be able to connect, unless you
specify the security mode as well.
Stylize the connectivity prints a bit and add IPv4/IPv6 as the
to the starting print.
.
Commit copied from https://github.com/ARMmbed/mbed-os-example-client
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 32:7b3841243d70 | 1 | /* |
mbed_official | 32:7b3841243d70 | 2 | * Copyright (c) 2015 ARM Limited. All rights reserved. |
mbed_official | 32:7b3841243d70 | 3 | * SPDX-License-Identifier: Apache-2.0 |
mbed_official | 32:7b3841243d70 | 4 | * Licensed under the Apache License, Version 2.0 (the License); you may |
mbed_official | 32:7b3841243d70 | 5 | * not use this file except in compliance with the License. |
mbed_official | 32:7b3841243d70 | 6 | * You may obtain a copy of the License at |
mbed_official | 32:7b3841243d70 | 7 | * |
mbed_official | 32:7b3841243d70 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
mbed_official | 32:7b3841243d70 | 9 | * |
mbed_official | 32:7b3841243d70 | 10 | * Unless required by applicable law or agreed to in writing, software |
mbed_official | 32:7b3841243d70 | 11 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT |
mbed_official | 32:7b3841243d70 | 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
mbed_official | 32:7b3841243d70 | 13 | * See the License for the specific language governing permissions and |
mbed_official | 32:7b3841243d70 | 14 | * limitations under the License. |
mbed_official | 32:7b3841243d70 | 15 | */ |
mbed_official | 32:7b3841243d70 | 16 | #ifndef __SECURITY_H__ |
mbed_official | 32:7b3841243d70 | 17 | #define __SECURITY_H__ |
mbed_official | 32:7b3841243d70 | 18 | |
mbed_official | 32:7b3841243d70 | 19 | #include <inttypes.h> |
mbed_official | 32:7b3841243d70 | 20 | |
mbed_official | 32:7b3841243d70 | 21 | #define MBED_DOMAIN "DOMAIN" |
mbed_official | 32:7b3841243d70 | 22 | #define MBED_ENDPOINT_NAME "ENDPOINT_NAME" |
mbed_official | 32:7b3841243d70 | 23 | |
mbed_official | 32:7b3841243d70 | 24 | const uint8_t SERVER_CERT[] = "-----BEGIN CERTIFICATE-----\r\n" |
mbed_official | 32:7b3841243d70 | 25 | "-----END CERTIFICATE-----\r\n"; |
mbed_official | 32:7b3841243d70 | 26 | |
mbed_official | 32:7b3841243d70 | 27 | const uint8_t CERT[] = "-----BEGIN CERTIFICATE-----\r\n" |
mbed_official | 32:7b3841243d70 | 28 | "-----END CERTIFICATE-----\r\n"; |
mbed_official | 32:7b3841243d70 | 29 | |
mbed_official | 32:7b3841243d70 | 30 | const uint8_t KEY[] = "-----BEGIN PRIVATE KEY-----\r\n" |
mbed_official | 32:7b3841243d70 | 31 | "-----END PRIVATE KEY-----\r\n"; |
mbed_official | 32:7b3841243d70 | 32 | |
mbed_official | 32:7b3841243d70 | 33 | #endif //__SECURITY_H__ |
mbed_official | 32:7b3841243d70 | 34 | |
mbed_official | 32:7b3841243d70 | 35 | #error "You need to get security.h credentials from connector.mbed.com and replace the content of this security.h file" |