mbed-os-sensor-node
Getting started with mbed Client on mbed OS
Warning
This example application is not supported anymore.
Information
History project:
- 17/01/2018 - Using mbed-cli the project is compiled using the use-malloc-for-heap feature enabled
- 24/11/2017 - Added support for uvision5, here instructions
- 02/10/2017 - First Release
This is the mbed Client example for mbed OS. It demonstrates how to register a device with mbed Device Connector, how to read and write values, and how to deregister. If you are unfamiliar with mbed Device Connector, we recommend that you read the introduction to the data model first.
The application:
- Connects to network with 6LoWPAN ND connection.
- Registers with mbed Device Connector.
- Gives mbed Device Connector access to its resources (read and write).
- Sends an incremental number to mbed Device Connector.
You can compile this project in three ways:
1. Using the Online compiler. Just clicking here:
Information
Learn how to use the Online compiler reading https://docs.mbed.com/docs/mbed-os-handbook/en/latest/dev_tools/online_comp/ page.
2. Using the compiler on your PC
Information
Learn how to use the mbed-cli reading https://docs.mbed.com/docs/mbed-os-handbook/en/latest/dev_tools/cli/ page.
The name of the machine is SILICA_SENSOR_NODE.
3. Exporting to 3rd party tools (IDE)
Information
Learn how to use the mbed-cli reading https://docs.mbed.com/docs/mbed-os-handbook/en/latest/dev_tools/third_party/ page. We have exported the project for you, please read here
Warning
This example requires a Border Router board. For more details please read the Border Router paragraph from this page.
Please read carefully the next pages:
- What to do before to compile the project: read here. This step is indipendent from the way you compile the project.
- How to run the client read here.
mbed_config.h
- Committer:
- rspelta
- Date:
- 2017-11-24
- Revision:
- 3:b8f21cb512fa
- Child:
- 7:e89dae7682f7
File content as of revision 3:b8f21cb512fa:
/* * mbed SDK * Copyright (c) 2017 ARM Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Automatically generated configuration file. // DO NOT EDIT, content will be overwritten. #ifndef __MBED_CONFIG_DATA__ #define __MBED_CONFIG_DATA__ // Configuration parameters #define MBED_CONF_MBED_MESH_API_THREAD_CONFIG_COMMISSIONING_DATASET_TIMESTAMP 0x10000 // set by library:mbed-mesh-api #define MBED_CONF_EVENTS_PRESENT 1 // set by library:events #define MBED_CONF_NANOSTACK_HAL_NVM_CFSTORE 0 // set by library:nanostack-hal #define MBED_CONF_DRIVERS_UART_SERIAL_RXBUF_SIZE 256 // set by library:drivers #define MBED_CONF_PPP_CELL_IFACE_AT_PARSER_TIMEOUT 8000 // set by library:ppp-cell-iface #define MBED_CONF_SPIRIT1_MAC_ADDRESS {0x7, 0x6, 0x5, 0x4, 0x3, MONTH, DAY, YEAR} // set by application[*] #define MBED_CONF_MBED_CLIENT_TCP_KEEPALIVE_TIME 300 // set by library:mbed-client #define CLOCK_SOURCE USE_PLL_MSI // set by target:SILICA_SENSOR_NODE #define MBED_CONF_MBED_TRACE_ENABLE 0 // set by application[*] #define MBED_CONF_MBED_MESH_API_THREAD_CONFIG_CHANNEL_MASK 0x7fff800 // set by library:mbed-mesh-api #define MBED_CONF_MBED_CLIENT_RECONNECTION_INTERVAL 5 // set by library:mbed-client #define MBED_CONF_MBED_MESH_API_6LOWPAN_ND_PSK_KEY {0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf} // set by library:mbed-mesh-api #define MBED_CONF_MBED_MESH_API_THREAD_CONFIG_CHANNEL 22 // set by library:mbed-mesh-api #define MBED_CONF_EVENTS_SHARED_DISPATCH_FROM_APPLICATION 0 // set by library:events #define MBED_CONF_MBED_MESH_API_THREAD_CONFIG_PSKC {0xc8, 0xa6, 0x2e, 0xae, 0xf3, 0x68, 0xf3, 0x46, 0xa9, 0x9e, 0x57, 0x85, 0x98, 0x9d, 0x1c, 0xd0} // set by library:mbed-mesh-api #define MBED_CONF_NANOSTACK_HAL_EVENT_LOOP_THREAD_STACK_SIZE 6144 // set by library:nanostack-hal #define MBED_CONF_EVENTS_SHARED_STACKSIZE 1024 // set by library:events #define MBED_CONF_MBED_MESH_API_6LOWPAN_ND_CHANNEL_PAGE 2 // set by application[*] #define MBED_CONF_MBED_CLIENT_RECONNECTION_LOOP 1 // set by library:mbed-client #define MBED_CONF_MBED_CLIENT_RECONNECTION_COUNT 3 // set by library:mbed-client #define MBED_CONF_MBED_MESH_API_THREAD_USE_STATIC_LINK_CONFIG 1 // set by library:mbed-mesh-api #define MBED_CONF_MBED_MESH_API_THREAD_CONFIG_EXTENDED_PANID {0xf1, 0xb5, 0xa1, 0xb2,0xc4, 0xd5, 0xa1, 0xbd } // set by library:mbed-mesh-api #define MBED_CONF_MBED_MESH_API_THREAD_CONFIG_ML_PREFIX {0xfd, 0x0, 0x0d, 0xb8, 0x0, 0x0, 0x0, 0x0} // set by library:mbed-mesh-api #define MBED_CONF_APP_NETWORK_INTERFACE MESH_LOWPAN_ND // set by application #define MBED_CONF_PLATFORM_STDIO_CONVERT_NEWLINES 1 // set by application[*] #define MBED_CONF_MBED_MESH_API_THREAD_CONFIG_CHANNEL_PAGE 0 // set by library:mbed-mesh-api #define MBED_CONF_PPP_CELL_IFACE_APN_LOOKUP 0 // set by library:ppp-cell-iface #define MBED_CONF_MBED_MESH_API_THREAD_SECURITY_POLICY 255 // set by library:mbed-mesh-api #define MBED_CONF_MBED_MESH_API_6LOWPAN_ND_DEVICE_TYPE NET_6LOWPAN_ROUTER // set by library:mbed-mesh-api #define MBED_CONF_NSAPI_PRESENT 1 // set by library:nsapi #define MBED_CONF_FILESYSTEM_PRESENT 1 // set by library:filesystem #define MBED_CONF_PPP_CELL_IFACE_BAUD_RATE 115200 // set by library:ppp-cell-iface #define MBED_CONF_EVENTS_SHARED_HIGHPRIO_EVENTSIZE 256 // set by library:events #define MBED_CONF_MBED_MESH_API_6LOWPAN_ND_SEC_LEVEL 5 // set by library:mbed-mesh-api #define MBED_CONF_PPP_CELL_IFACE_AT_PARSER_BUFFER_SIZE 256 // set by library:ppp-cell-iface #define MBED_CONF_PLATFORM_STDIO_FLUSH_AT_EXIT 1 // set by library:platform #define MBED_CONF_PLATFORM_STDIO_BAUD_RATE 115200 // set by application[*] #define MBED_CONF_MBED_MESH_API_THREAD_DEVICE_TYPE MESH_DEVICE_TYPE_THREAD_ROUTER // set by library:mbed-mesh-api #define MBED_CONF_EVENTS_SHARED_HIGHPRIO_STACKSIZE 1024 // set by library:events #define MBED_CONF_MBED_CLIENT_SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE 0 // set by library:mbed-client #define MBED_CONF_APP_MESH_RADIO_TYPE SENSOR_NODE_SPIRIT1 // set by application #define MBED_CONF_MBED_MESH_API_6LOWPAN_ND_CHANNEL_MASK (1<<12) // set by library:mbed-mesh-api #define MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE 9600 // set by library:platform #define MBED_CONF_MBED_MESH_API_USE_MALLOC_FOR_HEAP 0 // set by library:mbed-mesh-api #define MBED_CONF_EVENTS_SHARED_EVENTSIZE 256 // set by library:events #define MBED_CONF_MBED_MESH_API_6LOWPAN_ND_PANID_FILTER 0xffff // set by library:mbed-mesh-api #define MBED_CONF_MBED_MESH_API_HEAP_SIZE 32300 // set by application[*] #define MBED_CONF_MBED_CLIENT_EVENT_LOOP_SIZE 1024 // set by library:mbed-client #define MBED_CONF_MBED_MESH_API_THREAD_CONFIG_NETWORK_NAME "Thread Network" // set by library:mbed-mesh-api #define MBED_CONF_DRIVERS_UART_SERIAL_TXBUF_SIZE 256 // set by library:drivers #define MBED_CONF_MBED_MESH_API_6LOWPAN_ND_CHANNEL 1 // set by application[*] #define MBED_CONF_MBED_MESH_API_6LOWPAN_ND_SECURITY_MODE PSK // set by application[*] #define MBED_CONF_RTOS_PRESENT 1 // set by library:rtos #define MBED_CONF_MBED_MESH_API_THREAD_PSKD "abcdefghijklmno" // set by library:mbed-mesh-api #define MBED_CONF_MBED_MESH_API_THREAD_MASTER_KEY {0x10, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff} // set by library:mbed-mesh-api #define MBED_CONF_NANOSTACK_CONFIGURATION nanostack_full // set by library:nanostack #define MBED_CONF_MBED_MESH_API_THREAD_CONFIG_PANID 0x0700 // set by library:mbed-mesh-api #define MBED_CONF_MBED_MESH_API_6LOWPAN_ND_PSK_KEY_ID 1 // set by library:mbed-mesh-api // Macros #define NS_USE_EXTERNAL_MBED_TLS // defined by library:nanostack #define SPIRIT_USE_FULL_ASSERT // defined by library:spirit1 #define SPIRIT1_SPI_SCLK PG_9 // defined by application #define X_NUCLEO_IDS01A4 // defined by library:spirit1 #define SPIRIT1_DEV_IRQ PC_2 // defined by application #define SPIRIT1_SPI_MOSI PG_11 // defined by application #define USE_STM32F4XX_NUCLEO // defined by library:spirit1 #define SPIRIT1_DEV_CS PG_12 // defined by application #define UNITY_INCLUDE_CONFIG_H // defined by library:utest #define SPIRIT1_SPI_MISO PG_10 // defined by application #define SPIRIT1_DEV_SDN NC // defined by application #define MBED_CLIENT_C_NEW_API // defined by library:mbed-client #define MBEDTLS_USER_CONFIG_FILE "mbedtls_mbed_client_config.h" // defined by application #endif