How to increase the URL in COAP in contiki cooja simulator?

To make available uniform resource locator (URL) more in COAP services by using contiki cooja simulator.

Description

To make available uniform resource locator (URL) more in COAP services by using contiki cooja simulator.

  • Step 1: er-example-client.c
    #define NUMBER_OF_URLS 4 // set maximum urls
    Char*service_urls[NUMBER_OF_URLS]={“.well-known/core”, “/actuators/toggle”, “battery/”, “error/in//path”};
    #if PLATFORM_HAS_BUTTON
    static int uri_switch = 0; // by use increasing this we can access different urls.
    #endif

  • Step 2: Maximum four URLs available We can increase here service urls. for example 5th url is added.
    #define NUMBER_OF_URLS 5
    Char *service_urls[NUMBER_OF_URLS] = { “.well-known/core”, “/actuators/toggle”, “battery/”, “error/in//path” , “slogix.in/”}

u4a
Source code:
  • Step 1: er-example-client.c
    #define NUMBER_OF_URLS 4 // set maximum urls
    Char*service_urls[NUMBER_OF_URLS]={“.well-known/core”, “/actuators/toggle”, “battery/”, “error/in//path”};
    #if PLATFORM_HAS_BUTTON
    static int uri_switch = 0; // by use increasing this we can access different urls.
    #endif

  • Step 2: Maximum four URLs available We can increase here service urls. for example 5th url is added.
    #define NUMBER_OF_URLS 5
    Char *service_urls[NUMBER_OF_URLS] = { “.well-known/core”, “/actuators/toggle”, “battery/”, “error/in//path” , “slogix.in/”}

u4a
Leave Comment

Your email address will not be published. Required fields are marked *

clear formSubmit