Skip to content

Commit bfd4c0b

Browse files
committed
add CONFIG_COAP_DEMO_ENABLED to demoConfig.h, config the server address in FreeRTOSConfig.h and update the DemoEntryFunction Call (aws#2390)
1 parent 44b1a9e commit bfd4c0b

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

demos/demo_runner/iot_demo_freertos.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,9 @@ void runDemoTask( void * pArgument )
313313
pConnectionParams = AwsIotNetworkManager_GetConnectionParams( demoConnectedNetwork );
314314
pCredentials = AwsIotNetworkManager_GetCredentials( demoConnectedNetwork );
315315

316-
/* Run the demo. */
317-
status = pContext->demoFunction( true,
318-
clientcredentialIOT_THING_NAME,
316+
/* Run the CoAP demo. */
317+
status = pContext->demoFunction( false,
318+
NULL,
319319
pConnectionParams,
320320
pCredentials,
321321
pNetworkInterface );

vendors/st/boards/stm32l475_discovery/aws_demos/config_files/FreeRTOSConfig.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,15 @@ extern int iMainRand32( void );
202202
#define configECHO_SERVER_ADDR3 6
203203
#define configTCP_ECHO_CLIENT_PORT 7
204204

205+
/* The address of a CoAP server that will be used by the demo CoAP client.*/
206+
#define configCOAP_SERVER_ADDR0 192
207+
#define configCOAP_SERVER_ADDR1 168
208+
#define configCOAP_SERVER_ADDR2 0
209+
#define configCOAP_SERVER_ADDR3 101
210+
#define configCOAP_PORT 5683
211+
#define configCOAP_URI_PATH "suite"
212+
#define configCOAP_URI_QUERY "t=1nce_test"
213+
205214
/* The platform FreeRTOS is running on. */
206215
#define configPLATFORM_NAME "STM32L475"
207216

vendors/st/boards/stm32l475_discovery/aws_demos/config_files/aws_demo_config.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,11 @@
4848
* CONFIG_HTTPS_SYNC_UPLOAD_DEMO_ENABLED
4949
* CONFIG_HTTPS_ASYNC_UPLOAD_DEMO_ENABLED
5050
* CONFIG_CLI_UART_DEMO_ENABLED
51+
* CONFIG_COAP_DEMO_ENABLED
5152
*
5253
* These defines are used in iot_demo_runner.h for demo selection */
5354

54-
#define CONFIG_MQTT_DEMO_ENABLED
55+
#define CONFIG_COAP_DEMO_ENABLED
5556

5657
/* Default configuration for all demos. Individual demos can override these below */
5758
#define democonfigDEMO_STACKSIZE ( configMINIMAL_STACK_SIZE * 8 )

0 commit comments

Comments
 (0)