Kinetis W: [Thread] CoAP basics and hands on

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Kinetis W: [Thread] CoAP basics and hands on

Kinetis W: [Thread] CoAP basics and hands on

Thread provides basic services required for application frameworks implementation with the usage of Unicast and Multicast transmissions over UDP.

Thread specification is only focused on the network layer; many application layers can be designed to run without any problem as it is application layer agnostic. 

In this laboratory the user will work with the Constrain Application Protocol (CoAP) for this application layer as the Thread stack uses CoAP for most of the multi-hop network management and commissioning messages.

The Constrained Application Protocol (CoAP) is a specialized web transfer protocol to use with constrained nodes and constrained networks in the Internet of Thing.  It uses a binary RESTful protocol with four methods

  • POST
  • GET
  • PUT
  • DELETE

CoAP also uses ACK responses; CONfirmable (ACK requested) and NONconfirmable messages.

The Thread stack uses CoAP for the majority of multi-hop network management and commissioning messages

 

Objectives

Through this laboratory the user will modify the firmware to achieve the following list:

  • Add 2 new COAP URI resources “/resource1” and “/resource2”.
  • Send an ACK message in “/resource1” in case a CON request was received as specified by the CoAP standard. Include a default payload in the ACK message.
  • All packets destined to “/resource1” will trigger a NON POST packet reply (independent from the expected ACK packet) destined to “/resource2” URI path with a default payload.
  • Print in shell all CoAP transactions to fully understand when a request was sent and when a response was received, indicating the method and the resource, e.g.
  • If a CON POST was received, print on shell “‘NON’ packet received, ‘POST’ with payload of ‘<payload>’
  • If a NON POST was sent, print on shell “‘NON’ packet sent, ‘POST’ with payload ‘<payload>’

The process desired behavior by the laboratory is shown in figure 1.  

1.PNG

Figure 1 Diagram showing the desired behavior of the laboratory


 

Setup

In the following list, the components with a dash (—) will be the ones used to create this laboratory.

 

  • 2 FRDM-KW41Z

      — Rev.  A

  • Connectivity Software from the latest NXP release.

      — Thread Router Eligible Device project

  • Serial Terminal

      — TeraTerm

 IMAG0218.png

Figure 2 FRDM-KW41Z 


 

Modifying Firmware      

The following changes will be made in the router_eligible_device_app.c file. 

1. Define the URI path names that will be used in the shell to access the resources.

#define APP_RESOURCE1_URI_PATH                       "/resource1"

#define APP_RESOURCE2_URI_PATH                       "/resource2"

2.PNG

2. Declare the URI resources with coapUriPath_t. When using this struct the user must enter the length of the URI path and the path created in the last step.

const coapUriPath_t gAPP_RESOURCE1_URI_PATH = {SizeOfString(APP_RESOURCE1_URI_PATH), APP_RESOURCE1_URI_PATH};

const coapUriPath_t gAPP_RESOURCE2_URI_PATH = {SizeOfString(APP_RESOURCE2_URI_PATH), APP_RESOURCE2_URI_PATH};

3.PNG

3. Create the callbacks for the resources. This callbacks will handle the packet received and perform the desired action depending on the type of COAP method received.

static void APP_CoapResource1Cb(coapSessionStatus_t sessionStatus, void *pData, coapSession_t *pSession, uint32_t dataLen);

static void APP_CoapResource2Cb(coapSessionStatus_t sessionStatus, void *pData, coapSession_t *pSession, uint32_t dataLen);

4.PNG

4. Add the callback handler for the packet received, in this function it will be defined which action will be performed depending on the type of COAP method received.

  • APP_CoapResource1Cb

static void APP_CoapResource1Cb
(
coapSessionStatus_t sessionStatus,
void *pData,
coapSession_t *pSession,
uint32_t dataLen
)

{
  static uint8_t pMySessionPayload[3]={0x31,0x32,0x33};
  static uint32_t pMyPayloadSize=3;
  coapSession_t *pMySession = NULL;
  pMySession = COAP_OpenSession(mAppCoapInstId);
  COAP_AddOptionToList(pMySession,COAP_URI_PATH_OPTION, APP_RESOURCE2_URI_PATH,SizeOfString(APP_RESOURCE2_URI_PATH));

    if (gCoapConfirmable_c == pSession->msgType)
  {
    if (gCoapGET_c == pSession->code)
    {
      shell_write("'CON' packet received 'GET' with payload: ");
    }
    if (gCoapPOST_c == pSession->code)
    {
      shell_write("'CON' packet received 'POST' with payload: ");
    }
    if (gCoapPUT_c == pSession->code)
    {
      shell_write("'CON' packet received 'PUT' with payload: ");
    }     
    if (gCoapFailure_c!=sessionStatus)
    {
      COAP_Send(pSession, gCoapMsgTypeAckSuccessChanged_c, pMySessionPayload, pMyPayloadSize);
    } 
  }

  else if(gCoapNonConfirmable_c == pSession->msgType) 
  {
    if (gCoapGET_c == pSession->code)
    {
      shell_write("'NON' packet received 'GET' with payload: ");
    }
    if (gCoapPOST_c == pSession->code)
    {
      shell_write("'NON' packet received 'POST' with payload: ");
    }
    if (gCoapPUT_c == pSession->code)
    {
      shell_write("'NON' packet received 'PUT' with payload: ");
    }    
  }
  shell_writeN(pData, dataLen);
  shell_write("\r\n");
  pMySession -> msgType=gCoapNonConfirmable_c;
  pMySession -> code= gCoapPOST_c; 
  pMySession -> pCallback =NULL; 
  FLib_MemCpy(&pMySession->remoteAddr,&gCoapDestAddress,sizeof(ipAddr_t));
  COAP_SendMsg(pMySession,  pMySessionPayload, pMyPayloadSize);
  shell_write("'NON' packet sent 'POST' with payload: ");
  shell_writeN((char*) pMySessionPayload, pMyPayloadSize);
  shell_write("\r\n");
}

5.PNG

6.PNG

7.PNG

8.PNG

There can be one COAP instance per UDP port, in case the application only uses one port, one instance will be enough.

There can be multiple COAP sessions per instance, a COAP session is per packet/transaction. In this case as the desired result was to have a different response of the ACK, it will be necessary to create a new session with the new resource.

  • APP_CoapResource2Cb

 

static void APP_CoapResource2Cb
(
coapSessionStatus_t sessionStatus,
void *pData,
coapSession_t *pSession,
uint32_t dataLen
)

{
  if (gCoapNonConfirmable_c == pSession->msgType)
  {
      shell_write("'NON' packet received 'POST' with payload: ");  
      shell_writeN(pData, dataLen);
      shell_write("\r\n");
  }  
}

5. After creating the callbacks, those must be registered in the CoAP callback array in the function APP_InitCoapDemo(void)

{APP_CoapResource1Cb, (coapUriPath_t*)&gAPP_RESOURCE1_URI_PATH},

{APP_CoapResource2Cb, (coapUriPath_t*)&gAPP_RESOURCE2_URI_PATH},

 

9.PNG

There are some things to mention of the usage of the CoAP library that were not used for this laboratory but might be useful for other types of applications.

When using COAP_SendMsg() the session will close automatically by default unless it is indicated with the usage of pSession->autoClose.

There are two options while sending the message:

Confirmable (CON): It waits for an ACK reply and until it gets the message it will close the session or it will close the session when retransmissions are exhausted.

Non-confirmable (NON): For NON, immediately after sending the message.

In case a message was sent and there was no response a retransmission will be sent each COAP_ACK_TIMEOUT (in miliseconds), the retransmissions are sent exponentially: first after random (2, 3) seconds, next doubles the timeout and so on, until COAP_MAX_RETRANSMIT is reached.

After retransmissions stop, the session is automatically closed and informs the application of failure the application callback will be called with status gCoapFailure_c.

When the callback is called the current session is still valid, but CoAP session will close it after exiting the function. There are two different work this out:

A new session must be created

Set pSession->autoClose = FALSE. If autoClose is set to FALSE, without forgetting to close the session from application, using COAP_CloseSession().

 

 

Running the demo   

1. Download the modified firmware in the boards

2. Open a serial terminal for each board with a baud rate of 115200

10.PNG

Figure 3 Serial terminal and its configuration 

3. In one of the board’s terminal type thr create, this board will be the leader.

11.PNG

Figure 4 Board 1 with command "thr create"

12.PNG

Figure 5 Board 1 after the command "thr create"

 

4. Once the network has been created type “thr join” in the second board’s terminal.

13.PNG

Figure 6 Board 2 with command "thr join"

14.PNG

Figure 7 Board 2 after command "thr join"

5. In both serial terminals type the command “ifconfig”. This command will display all the addresses of the board.

15.PNG

Figure 8 Board 1 after command "ifconfig"

16.PNG

Figure 9 Board 2 after command "ifconfig"

 

6. To test the callbacks created, a CoAP message must be sent. The following command must be typed;

coap <type> <method> <address> <URI> <payload>

                                                                                    

coap CON POST fe80::5df0:2bf0:d69b:1b3c  /resource1 hello

                                                                                    

17.PNG

Figure 10 CoAP command to send

7. The result of sending must look like :

— Board 1

The board 1 will request the board 2 the resource1

18.PNG

Figure 11 Board 1 before sending the CoAP command

As it was coded the other board will send an ACK and print the message.

19.PNG

Figure 12 Board 1 after sending the CoAP command

 Board 2

20.PNG

Figure 13 Board 2 after receiving the CoAP command

If using the CON message the requester board will receive a response, while if the message is a NON type it will not have the response.  

When using this types of messages independently of the package type when sending a message a new session will be open and it will send a NON type of message.

Tags (3)
%3CLINGO-SUB%20id%3D%22lingo-sub-1099247%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EKinetis%20W%3A%20%5BThread%5D%20CoAP%20basics%20and%20hands%20on%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1099247%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CH1%20id%3D%22toc-hId-360437685%22%20style%3D%22margin%3A%200in%200in%2012.0pt%200in%3B%22%20id%3D%22toc-hId-360437685%22%20id%3D%22toc-hId-1297786509%22%3E%3C%2FH1%3E%3CP%20style%3D%22margin-bottom%3A%2012.0pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3EThread%20provides%20basic%20services%20required%20for%20application%20frameworks%20implementation%20with%20the%20usage%20of%20Unicast%20and%20Multicast%20transmissions%20over%20UDP.%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%2012.0pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3EThread%20specification%20is%20only%20focused%20on%20the%20network%20layer%3B%20many%20application%20layers%20can%20be%20designed%20to%20run%20without%20any%20problem%20as%20it%20is%20application%20layer%20agnostic.%26nbsp%3B%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%2012.0pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3EIn%20this%20laboratory%20the%20user%20will%20work%20with%20the%20Constrain%20Application%20Protocol%20(CoAP)%20for%20this%20application%20layer%20as%20the%20Thread%20stack%20uses%20CoAP%20for%20most%20of%20the%20multi-hop%20network%20management%20and%20commissioning%20messages.%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%2012.0pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3EThe%20Constrained%20Application%20Protocol%20(CoAP)%20is%20a%20specialized%20web%20transfer%20protocol%20to%20use%20with%20constrained%20nodes%20and%20constrained%20networks%20in%20the%26nbsp%3BInternet%20of%20Thing.%26nbsp%3B%20It%20uses%20a%20binary%20RESTful%20protocol%20with%20four%20methods%3C%2FSPAN%3E%3C%2FP%3E%3CUL%3E%3CLI%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3EPOST%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3EGET%20%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3EPUT%20%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3EDELETE%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%20style%3D%22margin-bottom%3A%2012.0pt%3B%22%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%2012.0pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3ECoAP%20also%20uses%20ACK%20responses%3B%20CONfirmable%20(ACK%20requested)%20and%20NONconfirmable%20messages.%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%2012.0pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3EThe%20Thread%20stack%20uses%20CoAP%20for%20the%20majority%20of%20multi-hop%20network%20management%20and%20commissioning%20messages%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%2012.0pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CH1%20id%3D%22toc-hId--1447016778%22%20style%3D%22margin%3A%200in%200in%2012.0pt%200in%3B%22%20id%3D%22toc-hId--1447016778%22%20id%3D%22toc-hId--509667954%22%3E%3CSPAN%20style%3D%22color%3A%20black%3B%20font-size%3A%2012.0pt%3B%22%3E%3CSTRONG%3EObjectives%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FH1%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%2012.0pt%200in%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3EThrough%20this%20laboratory%20the%20user%20will%20modify%20the%20firmware%20to%20achieve%20the%20following%20list%3A%20%3C%2FSPAN%3E%3C%2FP%3E%3CUL%3E%3CLI%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3EAdd%202%20new%20COAP%20URI%20resources%20%E2%80%9C%2Fresource1%E2%80%9D%20and%20%E2%80%9C%2Fresource2%E2%80%9D.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3ESend%20an%20ACK%20message%20in%20%E2%80%9C%2Fresource1%E2%80%9D%20in%20case%20a%20CON%20request%20was%20received%20as%20specified%20by%20the%20CoAP%20standard.%20Include%20a%20default%20payload%20in%20the%20ACK%20message.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3EAll%20packets%20destined%20to%20%E2%80%9C%2Fresource1%E2%80%9D%20will%20trigger%20a%20NON%20POST%20packet%20reply%20(independent%20from%20the%20expected%20ACK%20packet)%20destined%20to%20%E2%80%9C%2Fresource2%E2%80%9D%20URI%20path%20with%20a%20default%20payload.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3EPrint%20in%20shell%20all%20CoAP%20transactions%20to%20fully%20understand%20when%20a%20request%20was%20sent%20and%20when%20a%20response%20was%20received%2C%20indicating%20the%20method%20and%20the%20resource%2C%20e.g.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3EIf%20a%20CON%20POST%20was%20received%2C%20print%20on%20shell%20%E2%80%9C%E2%80%98NON%E2%80%99%20packet%20received%2C%20%E2%80%98POST%E2%80%99%20with%20payload%20of%20%E2%80%98%3CPAYLOAD%3E%E2%80%99%3C%2FPAYLOAD%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3EIf%20a%20NON%20POST%20was%20sent%2C%20print%20on%20shell%20%E2%80%9C%E2%80%98NON%E2%80%99%20packet%20sent%2C%20%E2%80%98POST%E2%80%99%20with%20payload%20%E2%80%98%3CPAYLOAD%3E%E2%80%99%3C%2FPAYLOAD%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%2012.0pt%200in%3B%22%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%2012.0pt%200in%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3EThe%20process%20desired%20behavior%20by%20the%20laboratory%20is%20shown%20in%20figure%201.%20%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22text-align%3A%20center%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%221.PNG%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%221.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F73400i5DD6EF847434C98F%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%221.PNG%22%20alt%3D%221.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%233366ff%3B%22%3E%3CEM%3EFigure%201%20Diagram%20showing%20the%20desired%20behavior%20of%20the%20laboratory%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%3CSTRONG%3E%3CBR%20%2F%3E%20%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%2012.0pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%3CSTRONG%3E%26nbsp%3B%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%2012.0pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20black%3B%20font-size%3A%2012.0pt%3B%22%3E%3CSTRONG%3ESetup%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3EIn%20the%20following%20list%2C%20the%20components%20with%20a%20dash%20(%E2%80%94)%20will%20be%20the%20ones%20used%20to%20create%20this%20laboratory.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CUL%3E%3CLI%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E2%20FRDM-KW41Z%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%E2%80%94%26nbsp%3B%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3ERev.%20%26nbsp%3B%3C%2FSPAN%3EA%3C%2FSPAN%3E%3C%2FP%3E%3CUL%3E%3CLI%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3EConnectivity%20Software%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3Efrom%20the%20latest%20NXP%20release.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%E2%80%94%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3EThread%20Router%20Eligible%20Device%20project%20%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CUL%3E%3CLI%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3ESerial%20Terminal%20%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%E2%80%94%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3ETeraTerm%20%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%2012pt%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22IMAG0218.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22IMAG0218.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F73389i2064090397A96212%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22IMAG0218.png%22%20alt%3D%22IMAG0218.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%2012pt%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%233366ff%3B%22%3E%3CEM%3EFigure%202%20FRDM-KW41Z%26nbsp%3B%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%2012.0pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CH1%20id%3D%22toc-hId-1040496055%22%20style%3D%22margin%3A%200in%200in%2012.0pt%200in%3B%22%20id%3D%22toc-hId-1040496055%22%20id%3D%22toc-hId-1977844879%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2012pt%3B%22%3E%3CSTRONG%3EModifying%20Firmware%3C%2FSTRONG%3E%3C%2FSPAN%3E%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3C%2FH1%3E%3CP%20style%3D%22margin-bottom%3A%2012.0pt%3B%22%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%2012pt%200.5in%3B%20text-align%3A%20justify%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%20color%3A%20black%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3EThe%20following%20changes%20will%20be%20made%20in%20the%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20%23003883%3B%22%3E%3CSTRONG%3E%3CEM%3Erouter_eligible_device_app.c%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3Efile.%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%2012pt%200.5in%3B%20text-align%3A%20justify%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20background-color%3A%20transparent%3B%22%3E1.%20%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3EDefine%20the%20URI%20path%20names%20that%20will%20be%20used%20in%20the%20shell%20to%20access%20the%20resources.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%200.0001pt%200.25in%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23a40044%3B%20font-size%3A%208.0pt%3B%22%3E%3CSTRONG%3E%3CEM%3E%23define%20APP_RESOURCE1_URI_PATH%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22%2Fresource1%22%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%200.0001pt%200.25in%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23a40044%3B%20font-size%3A%208.0pt%3B%22%3E%3CSTRONG%3E%3CEM%3E%23define%20APP_RESOURCE2_URI_PATH%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22%2Fresource2%22%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%200.0001pt%200.25in%3B%20text-align%3A%20center%3B%22%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%200.0001pt%200.25in%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23a40044%3B%20font-size%3A%208.0pt%3B%22%3E%3CSTRONG%3E%3CEM%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222.PNG%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222.PNG%22%20style%3D%22width%3A%20723px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F12892i1B0562E09232D3C8%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%222.PNG%22%20alt%3D%222.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%200.0001pt%200.25in%3B%20text-align%3A%20justify%3B%22%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%2012pt%200.5in%3B%20text-align%3A%20justify%3B%22%3E%3CSPAN%20style%3D%22background-color%3A%20transparent%3B%20color%3A%20%23000000%3B%20font-size%3A%2011.0pt%3B%22%3E2.%20Declare%20the%20URI%20resources%20with%20coapUriPath_t.%20When%20using%20this%20struct%20the%20user%20must%20enter%20the%20length%20of%20the%20URI%20path%20and%20the%20path%20created%20in%20the%20last%20step.%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%200.0001pt%200.25in%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23a40044%3B%20font-size%3A%208.0pt%3B%22%3E%3CSTRONG%3E%3CEM%3Econst%20coapUriPath_t%20gAPP_RESOURCE1_URI_PATH%20%3D%20%7BSizeOfString(APP_RESOURCE1_URI_PATH)%2C%20APP_RESOURCE1_URI_PATH%7D%3B%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%200.0001pt%200.25in%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23a40044%3B%20font-size%3A%208.0pt%3B%22%3E%3CSTRONG%3E%3CEM%3Econst%20coapUriPath_t%20gAPP_RESOURCE2_URI_PATH%20%3D%20%7BSizeOfString(APP_RESOURCE2_URI_PATH)%2C%20APP_RESOURCE2_URI_PATH%7D%3B%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%200.0001pt%200.25in%3B%20text-align%3A%20center%3B%22%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%200.0001pt%200.25in%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23a40044%3B%20font-size%3A%208.0pt%3B%22%3E%3CSTRONG%3E%3CEM%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%223.PNG%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%223.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F73399iC857091E12651B16%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%223.PNG%22%20alt%3D%223.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%200.0001pt%200.25in%3B%20text-align%3A%20justify%3B%22%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%2012pt%200.5in%3B%20text-align%3A%20justify%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E3.%20Create%20the%20callbacks%20for%20the%20resources.%20This%20callbacks%20will%20handle%20the%20packet%20received%20and%20perform%20the%20desired%20action%20depending%20on%20the%20type%20of%20COAP%20method%20received.%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%200.0001pt%200.25in%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23a40044%3B%20font-size%3A%208.0pt%3B%22%3E%3CSTRONG%3E%3CEM%3Estatic%20void%20APP_CoapResource1Cb(coapSessionStatus_t%20sessionStatus%2C%20void%20*pData%2C%20coapSession_t%20*pSession%2C%20uint32_t%20dataLen)%3B%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%200.0001pt%200.25in%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23a40044%3B%20font-size%3A%208.0pt%3B%22%3E%3CSTRONG%3E%3CEM%3Estatic%20void%20APP_CoapResource2Cb(coapSessionStatus_t%20sessionStatus%2C%20void%20*pData%2C%20coapSession_t%20*pSession%2C%20uint32_t%20dataLen)%3B%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%200.0001pt%200.25in%3B%20text-align%3A%20center%3B%22%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%200.0001pt%200.25in%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23a40044%3B%20font-size%3A%208.0pt%3B%22%3E%3CSTRONG%3E%3CEM%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%224.PNG%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%224.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F73398i12246CA31DE5E59E%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%224.PNG%22%20alt%3D%224.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%200.0001pt%200.25in%3B%20text-align%3A%20justify%3B%22%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%200.0001pt%200.25in%3B%20text-align%3A%20justify%3B%22%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%2012pt%200.5in%3B%20text-align%3A%20justify%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3E4.%20Add%20the%20callback%20handler%20for%20the%20packet%20received%2C%20in%20this%20function%20it%20will%20be%20defined%20which%20action%20will%20be%20performed%20depending%20on%20the%20type%20of%20COAP%20method%20received.%3C%2FSPAN%3E%3C%2FP%3E%3CUL%3E%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%20font-size%3A%2011.0pt%3B%22%3E%3CSTRONG%3EAPP_CoapResource1Cb%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CTABLE%20class%3D%22j-table%20jiveBorder%22%20style%3D%22border%3A%202px%20solid%20%23c9d200%3B%20height%3A%201541px%3B%20width%3A%20600px%3B%20margin-left%3A%20auto%3B%20margin-right%3A%20auto%3B%22%3E%3CTBODY%3E%3CTR%20style%3D%22height%3A%201525px%3B%22%3E%3CTD%20style%3D%22width%3A%20586px%3B%20height%3A%201525px%3B%22%3E%3CPRE%20style%3D%22margin%3A%200in%3B%20margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3Estatic%20void%20APP_CoapResource1Cb%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E(%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3EcoapSessionStatus_t%20sessionStatus%2C%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3Evoid%20*pData%2C%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3EcoapSession_t%20*pSession%2C%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3Euint32_t%20dataLen%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E)%3C%2FSPAN%3E%0A%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%7B%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%20static%20uint8_t%20pMySessionPayload%5B3%5D%3D%7B0x31%2C0x32%2C0x33%7D%3B%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%20static%20uint32_t%20pMyPayloadSize%3D3%3B%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%20coapSession_t%20*pMySession%20%3D%20NULL%3B%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%20pMySession%20%3D%20COAP_OpenSession(mAppCoapInstId)%3B%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%20COAP_AddOptionToList(pMySession%2CCOAP_URI_PATH_OPTION%2C%20APP_RESOURCE2_URI_PATH%2CSizeOfString(APP_RESOURCE2_URI_PATH))%3B%3C%2FSPAN%3E%0A%0A%3CSPAN%20style%3D%22color%3A%20%23000000%3B%20font-size%3A%2012px%3B%22%3E%26nbsp%3B%20%26nbsp%3B%20if%20(gCoapConfirmable_c%20%3D%3D%20pSession-%26gt%3BmsgType)%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%20%7B%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20if%20(gCoapGET_c%20%3D%3D%20pSession-%26gt%3Bcode)%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20shell_write(%22'CON'%20packet%20received%20'GET'%20with%20payload%3A%20%22)%3B%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20if%20(gCoapPOST_c%20%3D%3D%20pSession-%26gt%3Bcode)%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20shell_write(%22'CON'%20packet%20received%20'POST'%20with%20payload%3A%20%22)%3B%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20if%20(gCoapPUT_c%20%3D%3D%20pSession-%26gt%3Bcode)%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20shell_write(%22'CON'%20packet%20received%20'PUT'%20with%20payload%3A%20%22)%3B%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22color%3A%20%23000000%3B%20font-size%3A%2012px%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20if%20(gCoapFailure_c!%3DsessionStatus)%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20COAP_Send(pSession%2C%20gCoapMsgTypeAckSuccessChanged_c%2C%20pMySessionPayload%2C%20pMyPayloadSize)%3B%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22color%3A%20%23000000%3B%20font-size%3A%2012px%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%20%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%20%7D%3C%2FSPAN%3E%0A%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%20else%20if(gCoapNonConfirmable_c%20%3D%3D%20pSession-%26gt%3BmsgType)%20%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%20%7B%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20if%20(gCoapGET_c%20%3D%3D%20pSession-%26gt%3Bcode)%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20shell_write(%22'NON'%20packet%20received%20'GET'%20with%20payload%3A%20%22)%3B%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20if%20(gCoapPOST_c%20%3D%3D%20pSession-%26gt%3Bcode)%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20shell_write(%22'NON'%20packet%20received%20'POST'%20with%20payload%3A%20%22)%3B%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20if%20(gCoapPUT_c%20%3D%3D%20pSession-%26gt%3Bcode)%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20shell_write(%22'NON'%20packet%20received%20'PUT'%20with%20payload%3A%20%22)%3B%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%20%7D%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%20shell_writeN(pData%2C%20dataLen)%3B%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%20shell_write(%22%5Cr%5Cn%22)%3B%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%20pMySession%20-%26gt%3B%20msgType%3DgCoapNonConfirmable_c%3B%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%20pMySession%20-%26gt%3B%20code%3D%20gCoapPOST_c%3B%20%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%20pMySession%20-%26gt%3B%20pCallback%20%3DNULL%3B%20%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%20FLib_MemCpy(%26amp%3BpMySession-%26gt%3BremoteAddr%2C%26amp%3BgCoapDestAddress%2Csizeof(ipAddr_t))%3B%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%20COAP_SendMsg(pMySession%2C%26nbsp%3B%20pMySessionPayload%2C%20pMyPayloadSize)%3B%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%20shell_write(%22'NON'%20packet%20sent%20'POST'%20with%20payload%3A%20%22)%3B%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%20shell_writeN((char*)%20pMySessionPayload%2C%20pMyPayloadSize)%3B%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%26nbsp%3B%20shell_write(%22%5Cr%5Cn%22)%3B%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20%23000000%3B%22%3E%7D%3C%2FSPAN%3E%3C%2FPRE%3E%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%20style%3D%22text-align%3A%20justify%3B%22%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%2012pt%3B%20padding-left%3A%2060px%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%225.PNG%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%225.PNG%22%20style%3D%22width%3A%20906px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F73397iEFF495F1186C8EE9%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%225.PNG%22%20alt%3D%225.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%2012pt%3B%20padding-left%3A%2060px%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%226.PNG%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%226.PNG%22%20style%3D%22width%3A%20909px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F73396i260B313ABF14A36C%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%226.PNG%22%20alt%3D%226.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%2012pt%3B%20padding-left%3A%2060px%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%227.PNG%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%227.PNG%22%20style%3D%22width%3A%20910px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F73395i7F2F1A8062074404%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%227.PNG%22%20alt%3D%227.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%2012pt%3B%20padding-left%3A%2060px%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%228.PNG%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%228.PNG%22%20style%3D%22width%3A%20926px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F12968i5CEFA69ECFDC2192%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%228.PNG%22%20alt%3D%228.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%2012pt%3B%20padding-left%3A%2060px%3B%20text-align%3A%20justify%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3EThere%20can%20be%20one%20COAP%20instance%20per%20UDP%20port%2C%20in%20case%20the%20application%20only%20uses%20one%20port%2C%20one%20instance%20will%20be%20enough.%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%2012pt%3B%20padding-left%3A%2060px%3B%20text-align%3A%20justify%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3EThere%20can%20be%20multiple%20COAP%20sessions%20per%20instance%2C%20a%20COAP%20session%20is%20per%20packet%2Ftransaction.%20In%20this%20case%20as%20the%20desired%20result%20was%20to%20have%20a%20different%20response%20of%20the%20ACK%2C%20it%20will%20be%20necessary%20to%20create%20a%20new%20session%20with%20the%20new%20resource.%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CUL%3E%3CLI%3E%3CSPAN%20style%3D%22color%3A%20black%3B%20font-size%3A%2011.0pt%3B%22%3E%3CSTRONG%3EAPP_CoapResource2Cb%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%20style%3D%22margin-bottom%3A%2012.0pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20black%3B%20font-size%3A%2011.0pt%3B%22%3E%3CSTRONG%3E%26nbsp%3B%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CTABLE%20class%3D%22j-table%20jiveBorder%22%20height%3D%22415%22%20style%3D%22border%3A%202px%20solid%20%23c9d200%3B%20height%3A%20413px%3B%20margin-left%3A%20auto%3B%20margin-right%3A%20auto%3B%22%20width%3D%22600%22%3E%3CTBODY%3E%3CTR%3E%3CTD%20style%3D%22width%3A%20586px%3B%22%3E%3CPRE%20style%3D%22margin%3A%200in%3B%20margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20black%3B%22%3Estatic%20void%20APP_CoapResource2Cb%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20black%3B%22%3E(%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20black%3B%22%3EcoapSessionStatus_t%20sessionStatus%2C%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20black%3B%22%3Evoid%20*pData%2C%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20black%3B%22%3EcoapSession_t%20*pSession%2C%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20black%3B%22%3Euint32_t%20dataLen%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20black%3B%22%3E)%3C%2FSPAN%3E%0A%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20black%3B%22%3E%7B%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%20if%20(gCoapNonConfirmable_c%20%3D%3D%20pSession-%26gt%3BmsgType)%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%20%7B%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20shell_write(%22'NON'%20packet%20received%20'POST'%20with%20payload%3A%20%22)%3B%26nbsp%3B%20%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20shell_writeN(pData%2C%20dataLen)%3B%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20shell_write(%22%5Cr%5Cn%22)%3B%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%20%7D%26nbsp%3B%20%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22font-size%3A%2012px%3B%20color%3A%20black%3B%22%3E%7D%3C%2FSPAN%3E%3C%2FPRE%3E%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%20style%3D%22padding-left%3A%2060px%3B%22%3E%3C%2FP%3E%3CP%20style%3D%22padding-left%3A%2060px%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3E5.%20After%20creating%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3Ethe%20callbacks%2C%20those%20must%20be%20registered%20in%20the%20CoAP%20callback%20array%20in%20the%20function%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20%23003883%3B%22%3E%3CSTRONG%3E%3CEM%3EAPP_InitCoapDemo(void)%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22padding-left%3A%2060px%3B%22%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%20.0001pt%20.25in%3B%22%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%200.0001pt%200.25in%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23a40044%3B%20font-size%3A%208.0pt%3B%22%3E%3CSTRONG%3E%3CEM%3E%7BAPP_CoapResource1Cb%2C%20(coapUriPath_t*)%26amp%3BgAPP_RESOURCE1_URI_PATH%7D%2C%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%200.0001pt%200.25in%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23a40044%3B%20font-size%3A%208.0pt%3B%22%3E%3CSTRONG%3E%3CEM%3E%7BAPP_CoapResource2Cb%2C%20(coapUriPath_t*)%26amp%3BgAPP_RESOURCE2_URI_PATH%7D%2C%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%2012pt%3B%20padding-left%3A%2060px%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%2012pt%3B%20padding-left%3A%2060px%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%229.PNG%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%229.PNG%22%20style%3D%22width%3A%20914px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F12966i3C11457E2C4FCF09%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%229.PNG%22%20alt%3D%229.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%2012pt%3B%20padding-left%3A%2060px%3B%20text-align%3A%20justify%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3EThere%20are%20some%20things%20to%20mention%20of%20the%20usage%20of%20the%20CoAP%20library%20that%20were%20not%20used%20for%20this%20laboratory%20but%20might%20be%20useful%20for%20other%20types%20of%20applications.%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%2012pt%3B%20padding-left%3A%2060px%3B%20text-align%3A%20justify%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3EWhen%20using%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23003883%3B%20font-size%3A%2011.0pt%3B%22%3E%3CSTRONG%3E%3CEM%3ECOAP_SendMsg()%20%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3Ethe%20session%20will%20close%20automatically%20by%20default%20unless%20it%20is%20indicated%20with%20the%20usage%20of%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a40044%3B%20font-size%3A%2011.0pt%3B%22%3E%3CEM%3E%3CSTRONG%3EpSession-%26gt%3BautoClose%3C%2FSTRONG%3E.%20%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%2012pt%3B%20padding-left%3A%2060px%3B%20text-align%3A%20justify%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3EThere%20are%20two%20options%20while%20sending%20the%20message%3A%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22padding-left%3A%2060px%3B%20text-align%3A%20justify%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3EConfirmable%3C%2FSPAN%3E%20(%3CSPAN%20style%3D%22color%3A%20%2350227b%3B%22%3E%3CSTRONG%3ECON%3C%2FSTRONG%3E%3C%2FSPAN%3E)%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%3A%20It%20waits%20for%20an%20ACK%20reply%20and%20until%20it%20gets%20the%20message%20it%20will%20close%20the%20session%20or%20it%20will%20close%20the%20session%20when%20retransmissions%20are%20exhausted.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22padding-left%3A%2060px%3B%20text-align%3A%20justify%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3ENon-confirmable%3C%2FSPAN%3E%20(%3CSPAN%20style%3D%22color%3A%20%23005042%3B%22%3E%3CSTRONG%3ENON%3C%2FSTRONG%3E%3C%2FSPAN%3E)%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%3A%20For%20NON%2C%20immediately%20after%20sending%20the%20message.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%2012pt%3B%20padding-left%3A%2060px%3B%20text-align%3A%20justify%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3EIn%20case%20a%20message%20was%20sent%20and%20there%20was%20no%20response%20a%20retransmission%20will%20be%20sent%20each%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23003883%3B%20font-size%3A%2011.0pt%3B%22%3E%3CSTRONG%3E%3CEM%3ECOAP_ACK_TIMEOUT%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3E%20(in%20miliseconds)%2C%20the%20retransmissions%20are%20sent%20exponentially%3A%20first%20after%20random%20(2%2C%203)%20seconds%2C%20next%20doubles%20the%20timeout%20and%20so%20on%2C%20until%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23003883%3B%20font-size%3A%2011.0pt%3B%22%3E%3CSTRONG%3E%3CEM%3ECOAP_MAX_RETRANSMIT%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3E%20is%20reached.%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%2012pt%3B%20padding-left%3A%2060px%3B%20text-align%3A%20justify%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3EAfter%20retransmissions%20stop%2C%20the%20session%20is%20automatically%20closed%20and%20informs%20the%20application%20of%20failure%20the%20application%20callback%20will%20be%20called%20with%20status%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23003883%3B%20font-size%3A%2011.0pt%3B%22%3E%3CEM%3E%3CSTRONG%3EgCoapFailure_c%3C%2FSTRONG%3E.%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%2012pt%3B%20padding-left%3A%2060px%3B%20text-align%3A%20justify%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3EWhen%20the%20callback%20is%20called%20the%20current%20session%20is%20still%20valid%2C%20but%20CoAP%20session%20will%20close%20it%20after%20exiting%20the%20function.%20There%20are%20two%20different%20work%20this%20out%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22padding-left%3A%2060px%3B%20text-align%3A%20justify%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3EA%20new%20session%20must%20be%20created%20%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22padding-left%3A%2060px%3B%20text-align%3A%20justify%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3ESet%20%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a40044%3B%20font-size%3A%2011.0pt%3B%22%3E%3CSTRONG%3E%3CEM%3EpSession-%26gt%3BautoClose%20%3D%20FALSE%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%3CSTRONG%3E.%3C%2FSTRONG%3E%20%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3EIf%20autoClose%20is%20set%20to%20FALSE%2C%20without%20forgetting%20to%20close%20the%20session%20from%20application%2C%20using%3C%2FSPAN%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23003883%3B%20font-size%3A%2011.0pt%3B%22%3E%3CEM%3E%3CSTRONG%3ECOAP_CloseSession()%3C%2FSTRONG%3E.%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%2012pt%3B%20text-align%3A%20justify%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%2012.0pt%200in%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CH1%20id%3D%22toc-hId--766958408%22%20style%3D%22margin%3A%200in%200in%2012.0pt%200in%3B%22%20id%3D%22toc-hId--766958408%22%20id%3D%22toc-hId-170390416%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2016px%3B%22%3ERunning%20the%20demo%3C%2FSPAN%3E%20%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3C%2FH1%3E%3CP%3E%3C%2FP%3E%3CP%20style%3D%22padding-left%3A%2060px%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3E1.%20Download%20the%20modified%20firmware%20in%20the%20boards%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22padding-left%3A%2060px%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E2.%20Open%20a%20serial%20terminal%20for%20each%20board%20with%20a%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20%23003883%3B%22%3E%3CSTRONG%3E%3CEM%3Ebaud%20rate%20of%20115200%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%2012pt%3B%20padding-left%3A%2060px%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%2210.PNG%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%2210.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F13137i494AE979BF84E246%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%2210.PNG%22%20alt%3D%2210.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%2012pt%3B%20padding-left%3A%2060px%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%233366ff%3B%22%3E%3CEM%3EFigure%203%20Serial%20terminal%20and%20its%20configuration%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22padding-left%3A%2060px%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E3.%20In%20one%20of%20the%20board%E2%80%99s%20terminal%20type%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20%23a40044%3B%22%3E%3CSTRONG%3E%E2%80%9C%3CEM%3Ethr%20create%3C%2FEM%3E%E2%80%9D%3C%2FSTRONG%3E%3C%2FSPAN%3E%2C%20%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3Ethis%20board%20will%20be%20the%20leader.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22padding-left%3A%2060px%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%2211.PNG%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%2211.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F13204iA37A663A743BBC7F%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%2211.PNG%22%20alt%3D%2211.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%2012pt%3B%20padding-left%3A%2060px%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%233366ff%3B%22%3E%3CEM%3EFigure%204%20Board%201%20with%20command%20%22thr%20create%22%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%2012pt%3B%20padding-left%3A%2060px%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%233366ff%3B%22%3E%3CEM%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%2212.PNG%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%2212.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F73394i9FA32C4505FAADD6%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%2212.PNG%22%20alt%3D%2212.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%2012pt%3B%20padding-left%3A%2060px%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%233366ff%3B%22%3E%3CEM%3EFigure%205%20Board%201%20after%20the%20command%20%22thr%20create%22%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%2012pt%3B%20padding-left%3A%2060px%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22padding-left%3A%2060px%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E4.%20Once%20the%20network%20has%20been%20created%20type%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20%23a40044%3B%22%3E%3CEM%3E%E2%80%9Cthr%20join%E2%80%9D%3C%2FEM%3E%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3Ein%20the%20second%20board%E2%80%99s%20terminal.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22padding-left%3A%2060px%3B%22%3E%3C%2FP%3E%3CP%20style%3D%22padding-left%3A%2060px%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%2213.PNG%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%2213.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F73393i969ABA5F79B7AE2F%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%2213.PNG%22%20alt%3D%2213.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%2012pt%3B%20padding-left%3A%2060px%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%233366ff%3B%22%3E%3CEM%3EFigure%206%20Board%202%20with%20command%20%22thr%20join%22%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%2012pt%3B%20padding-left%3A%2060px%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%233366ff%3B%22%3E%3CEM%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%2214.PNG%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%2214.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F73392i0A81B96700818037%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%2214.PNG%22%20alt%3D%2214.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%2012pt%3B%20padding-left%3A%2060px%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%233366ff%3B%22%3E%3CEM%3EFigure%207%20Board%202%20after%20command%20%22thr%20join%22%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22padding-left%3A%2060px%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E5.%20In%20both%20serial%20terminals%20type%20the%20command%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20%23a40044%3B%22%3E%3CEM%3E%E2%80%9Cifconfig%E2%80%9D%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a40044%3B%22%3E.%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3EThis%20command%20will%20display%20all%20the%20addresses%20of%20the%20board.%20%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22padding-left%3A%2060px%3B%22%3E%3C%2FP%3E%3CP%20style%3D%22padding-left%3A%2060px%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%2215.PNG%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%2215.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F73391iE27CE411DDEB35A3%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%2215.PNG%22%20alt%3D%2215.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%2012pt%3B%20padding-left%3A%2060px%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%233366ff%3B%22%3E%3CEM%3EFigure%208%20Board%201%20after%20command%20%22ifconfig%22%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%2012pt%3B%20padding-left%3A%2060px%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%233366ff%3B%22%3E%3CEM%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%2216.PNG%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%2216.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F13329i20939037170B4D07%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%2216.PNG%22%20alt%3D%2216.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%2012pt%3B%20padding-left%3A%2060px%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%233366ff%3B%22%3E%3CEM%3EFigure%209%20Board%202%26nbsp%3Bafter%20command%20%22ifconfig%22%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%2012pt%200.25in%3B%20padding-left%3A%2060px%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22padding-left%3A%2060px%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3E6.%20To%20test%20the%20callbacks%20created%2C%20a%20CoAP%20message%20must%20be%20sent.%20The%20following%20command%20must%20be%20typed%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22padding-left%3A%2060px%3B%22%3E%3C%2FP%3E%3CTABLE%20height%3D%2248%22%20style%3D%22border-width%3A%201px%3B%20border-color%3A%20rgba(0%2C%200%2C%200%2C%200)%3B%20height%3A%2084px%3B%20margin-left%3A%20auto%3B%20margin-right%3A%20auto%3B%20padding-left%3A%2060px%3B%22%20width%3D%22513%22%3E%3CTBODY%20style%3D%22padding-left%3A%2060px%3B%22%3E%3CTR%20style%3D%22padding-left%3A%2060px%3B%22%3E%3CTD%20style%3D%22width%3A%20448px%3B%20padding-left%3A%2060px%3B%22%3E%3CP%20style%3D%22margin%3A%200in%200in%200.0001pt%3B%20padding-left%3A%2060px%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23f9b500%3B%20font-size%3A%2011.0pt%3B%22%3E%3CEM%3Ecoap%3C%2FEM%3E%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20%23c9d200%3B%20font-size%3A%2011.0pt%3B%22%3E%3CEM%3E%3CTYPE%3E%20%3C%2FTYPE%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%237bb1db%3B%20font-size%3A%2011.0pt%3B%22%3E%3CEM%3E%3CMETHOD%3E%20%3C%2FMETHOD%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23d54e12%3B%20font-size%3A%2011.0pt%3B%22%3E%3CEM%3E%3CADDRESS%3E%20%3C%2FADDRESS%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%2340bbbd%3B%20font-size%3A%2011.0pt%3B%22%3E%3CEM%3E%3CURI%3E%20%3C%2FURI%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a40044%3B%20font-size%3A%2011.0pt%3B%22%3E%3CEM%3E%3CPAYLOAD%3E%3C%2FPAYLOAD%3E%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin%3A%200in%200in%200.0001pt%3B%20padding-left%3A%2060px%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%3C%2FP%3E%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CTABLE%20style%3D%22border-width%3A%201px%3B%20border-color%3A%20rgba(0%2C%200%2C%200%2C%200)%3B%20height%3A%2077px%3B%20margin-left%3A%20auto%3B%20margin-right%3A%20auto%3B%20padding-left%3A%2060px%3B%22%20width%3D%22531%22%3E%3CTBODY%20style%3D%22padding-left%3A%2060px%3B%22%3E%3CTR%20style%3D%22height%3A%2052px%3B%20padding-left%3A%2060px%3B%22%3E%3CTD%20style%3D%22width%3A%20466px%3B%20height%3A%2052px%3B%20padding-left%3A%2060px%3B%22%3E%3CP%20style%3D%22margin%3A%200in%200in%200.0001pt%3B%20padding-left%3A%2060px%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23f9b500%3B%20font-size%3A%2011.0pt%3B%22%3E%3CEM%3Ecoap%3C%2FEM%3E%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20%23c9d200%3B%20font-size%3A%2011.0pt%3B%22%3E%3CEM%3ECON%20%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%237bb1db%3B%20font-size%3A%2011.0pt%3B%22%3E%3CEM%3EPOST%20%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23d54e12%3B%20font-size%3A%2011.0pt%3B%22%3E%3CEM%3Efe80%3A%3A5df0%3A2bf0%3Ad69b%3A1b3c%26nbsp%3B%20%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%2340bbbd%3B%20font-size%3A%2011.0pt%3B%22%3E%3CEM%3E%2Fresource1%20%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a40044%3B%20font-size%3A%2011.0pt%3B%22%3E%3CEM%3Ehello%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin%3A%200in%200in%200.0001pt%3B%20padding-left%3A%2060px%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%3C%2FP%3E%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%20style%3D%22margin-bottom%3A%2012pt%3B%20padding-left%3A%2060px%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%233366ff%3B%22%3E%3CEM%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%2217.PNG%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%2217.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F13327i1B88909A10EC1FB5%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%2217.PNG%22%20alt%3D%2217.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%2012pt%3B%20padding-left%3A%2060px%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%233366ff%3B%22%3E%3CEM%3EFigure%2010%20CoAP%20command%20to%20send%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22padding-left%3A%2060px%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%20font-size%3A%2011.0pt%3B%22%3E7.%20The%20result%20of%20sending%20must%20look%20like%20%3A%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22padding-left%3A%2060px%3B%22%3E%3C%2FP%3E%3CP%20style%3D%22padding-left%3A%2060px%3B%22%3E%3CSPAN%20style%3D%22%3B%20color%3A%20%23000000%3B%20font-size%3A%2011.0pt%3B%22%3E%3CSTRONG%3E%3CSTRONG%3E%E2%80%94%26nbsp%3B%3C%2FSTRONG%3EBoard%201%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%2012pt%200.5in%3B%20padding-left%3A%2060px%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3EThe%20board%201%20will%20request%20the%20board%202%20the%20resource1%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%2012pt%200.5in%3B%20padding-left%3A%2060px%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%2218.PNG%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%2218.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F13256i46FCD12470048E71%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%2218.PNG%22%20alt%3D%2218.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%2012pt%3B%20padding-left%3A%2060px%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%233366ff%3B%22%3E%3CEM%3EFigure%2011%20Board%201%20before%20sending%20the%20CoAP%20command%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin%3A%200in%200in%2012pt%200.5in%3B%20padding-left%3A%2060px%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3EAs%20it%20was%20coded%20the%20other%20board%20will%20send%20an%20ACK%20and%20print%20the%20message.%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin%3A%200in%200in%2012pt%200.5in%3B%20padding-left%3A%20270px%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011pt%3B%20color%3A%20%23000000%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%2219.PNG%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%2219.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F73390i16ADEB5F7F4D6BCB%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%2219.PNG%22%20alt%3D%2219.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%2012pt%3B%20padding-left%3A%2060px%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%233366ff%3B%22%3E%3CEM%3EFigure%2012%20Board%201%20after%20sending%20the%20CoAP%20command%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22padding-left%3A%2060px%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%20%3CSPAN%3E%3CSTRONG%3E%E2%80%94%3C%2FSTRONG%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%3CSTRONG%3EBoard%202%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%2012pt%3B%20padding-left%3A%2060px%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%233366ff%3B%22%3E%3CEM%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%2220.PNG%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%2220.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F13159i58C0863DDD34D3D8%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%2220.PNG%22%20alt%3D%2220.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%2012pt%3B%20padding-left%3A%2060px%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%233366ff%3B%22%3E%3CEM%3EFigure%2013%20Board%202%20after%20receiving%20the%20CoAP%20command%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%2012pt%3B%20padding-left%3A%2060px%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3EIf%20using%20the%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20%2350227b%3B%22%3E%3CSTRONG%3ECON%3C%2FSTRONG%3E%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3Emessage%20the%20requester%20board%20will%20receive%20a%20response%2C%20while%20if%20the%20message%20is%20a%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20%23005042%3B%22%3E%3CSTRONG%3ENON%20%3C%2FSTRONG%3E%3C%2FSPAN%3Et%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3Eype%20it%20will%20not%20have%20the%20response.%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20white%3B%20margin%3A%200in%200in%2012pt%3B%20padding-left%3A%2060px%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3EWhen%20using%20this%20types%20of%20messages%20independently%20of%20the%20package%20type%20when%20sending%20a%20message%20a%20new%20session%20will%20be%20open%20and%20it%20will%20send%20a%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20%23005042%3B%22%3E%3CSTRONG%3ENON%3C%2FSTRONG%3E%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3Etype%20of%20message.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎09-10-2020 03:40 AM
Updated by: