<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Wireless MCU中的主题 overflow error</title>
    <link>https://community.nxp.com/t5/Wireless-MCU/overflow-error/m-p/850512#M5758</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have a problem about &lt;EM&gt;&lt;STRONG&gt;overflow error&lt;/STRONG&gt;&lt;/EM&gt;!&lt;/P&gt;&lt;P&gt;There are two device(A and B) communication each other, process steps as below:&lt;/P&gt;&lt;P&gt;1. A send a &lt;SPAN&gt;packet&lt;/SPAN&gt; to B;&lt;/P&gt;&lt;P&gt;2. B read the data and&amp;nbsp;reply a packet to A;&lt;/P&gt;&lt;P&gt;3. B occurred a &lt;STRONG&gt;&lt;EM&gt;overflow error&lt;/EM&gt;&lt;/STRONG&gt; when reply a packet;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/76937i348A04B2BC404405/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/76859iD6CD2BF44D8BEE81/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;----------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;This is the send or reply packet data code:&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;PUBLIC void vAppWriteAttribute(uint16 u16DestAddr, uint8 *wData, uint8 length)&lt;BR /&gt;{&lt;BR /&gt; uint8_t hexLength = 0;&lt;BR /&gt; uint8 u8FramControl = 0;&lt;BR /&gt; uint16 u16offset;&lt;BR /&gt; uint8 *pu8TransactionSequenceNumber = 0;&lt;BR /&gt; uint8 u8CommandId = 0x02;&lt;BR /&gt; uint16 u16AttribId;&lt;BR /&gt; uint16 u16Size;&lt;BR /&gt; uint8 i = 0;&lt;BR /&gt; uint8 tab[PACKAGE_LEN_MAX];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*pu8TransactionSequenceNumber = u8GetTransactionSequenceNumber();&lt;BR /&gt; DBG_vPrintf(TRUE, "vAppWriteAttribute: \n" );&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; PDUM_teStatus status;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PDUM_thAPduInstance Apdudata = PDUM_hAPduAllocateAPduInstance( apduZDP );&lt;BR /&gt; if( Apdudata == PDUM_INVALID_HANDLE )&lt;BR /&gt; {&lt;BR /&gt; /* problem allocating APDU instance memory*/&lt;BR /&gt; DBG_vPrintf(DEBUF_COMMAND_SERIL, "APP: Unable to allocate APDU memory\n");&lt;BR /&gt; }&lt;BR /&gt; else&lt;BR /&gt; {&lt;BR /&gt; if ( PDUM_E_OK != PDUM_eAPduInstanceSetPayloadSize(Apdudata, ( hexLength) ) )&lt;BR /&gt; {&lt;BR /&gt; DBG_vPrintf(DEBUF_COMMAND_SERIL, "vAppWriteAttribute: PDUM_eAPduInstanceSetPayloadSize error!!\n");&lt;BR /&gt; PDUM_eAPduFreeAPduInstance( Apdudata );&lt;BR /&gt; return;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;u8FramControl = ( 0x00 ) |&lt;BR /&gt; ( ( ( 0 ) ? 1 : 0 ) &amp;lt;&amp;lt; 2 )|&lt;BR /&gt; ( ( ( 0 ) ? 1 : 0 ) &amp;lt;&amp;lt; 3) |&lt;BR /&gt; ( 1 &amp;lt;&amp;lt; 4 );&lt;BR /&gt; u16offset = PDUM_u16APduInstanceWriteNBO ( Apdudata,&lt;BR /&gt; 0,&lt;BR /&gt; "bbb",&lt;BR /&gt; u8FramControl,&lt;BR /&gt; *pu8TransactionSequenceNumber,&lt;BR /&gt; u8CommandId );&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; u16Size = length;&lt;BR /&gt; i = 0;&lt;BR /&gt; memcpy(tab, wData,u16Size);&lt;BR /&gt; u16AttribId = FUNC_ATTRIBUTE_ID;&lt;BR /&gt; u16offset += PDUM_u16APduInstanceWriteNBO ( Apdudata,&lt;BR /&gt; u16offset,&lt;BR /&gt; "h",&lt;BR /&gt; u16AttribId ); // attribute id&lt;/P&gt;&lt;P&gt;u16offset += PDUM_u16APduInstanceWriteNBO ( Apdudata,&lt;BR /&gt; u16offset,&lt;BR /&gt; "b",&lt;BR /&gt; E_ZCL_ARRAY ); //attribute type&lt;/P&gt;&lt;P&gt;for(i=0; i&amp;lt;u16Size; i++){&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;u16offset += PDUM_u16APduInstanceWriteNBO ( Apdudata, u16offset, "b", tab[i] );&lt;BR /&gt; }&lt;BR /&gt; uint16 byteCount = u16Size + 6;&lt;BR /&gt; if( byteCount == 0 )&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;/* no data was written to the APDU instance*/&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;DBG_vPrintf(DEBUF_COMMAND_SERIL, "APP: No data written to APDU\n");&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;PDUM_eAPduFreeAPduInstance( Apdudata );&lt;BR /&gt; }&lt;BR /&gt; else&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;PDUM_teStatus pdumStatus = PDUM_eAPduInstanceSetPayloadSize( Apdudata, byteCount );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if( pdumStatus != PDUM_E_OK )&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;DBG_vPrintf(DEBUF_COMMAND_SERIL, "SendData: SetPayloadSize error, Status = %d\n", pdumStatus);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;PDUM_eAPduFreeAPduInstance( Apdudata );&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt; else&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;DBG_vPrintf(DEBUF_COMMAND_SERIL, "vAppWriteAttribute: written to APDU: %d\n", &amp;nbsp;&amp;nbsp;&amp;nbsp;PDUM_u16APduInstanceGetPayloadSize(Apdudata));&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;DBG_vPrintf(DEBUF_COMMAND_SERIL, "vAppWriteAttribute: get APDU size: %d\n", &amp;nbsp;&amp;nbsp;&amp;nbsp;PDUM_u16APduGetSize(apduZDP));&lt;BR /&gt; /* request data send to destination*/&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;status = ZPS_eAplAfUnicastAckDataReq(&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;Apdudata, // APDU instance handle&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;0x0008, // cluster ID&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;1, // source endpoint&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;1, // destination endpoint&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;u16DestAddr, // destination network address&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;ZPS_E_APL_AF_UNSECURE, // security mode&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;0, // radius&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;NULL // sequence number pointer&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;);&lt;BR /&gt; if( status != ZPS_E_SUCCESS )&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;// problem with request&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;DBG_vPrintf(DEBUF_COMMAND_SERIL, "vAppWriteAttribute: not successful. Return: 0x%x\n", status);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;PDUM_eAPduFreeAPduInstance( Apdudata );&lt;BR /&gt; }&lt;BR /&gt; else&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;/* TX data request successful*/&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;/*Once the request has been successfully sent, the APDU instance is automatically deallocated by the stack*/&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;DBG_vPrintf(DEBUF_COMMAND_SERIL, "vAppWriteAttribute: successful. Return: 0x%x\n", status);&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;This is the read&amp;nbsp;packet data code:&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;PUBLIC void readAttbuteData(tsZCL_CallBackEvent *psEvent, uint8 *packData, uint8_t *Len)&lt;BR /&gt;{&lt;BR /&gt; uint8 au8LinkTxBuffer[256];&lt;BR /&gt; uint16 u16Length = 0;&lt;BR /&gt; uint8* dataPtr;&lt;BR /&gt; uint8 u8Size;&lt;BR /&gt; uint8 i = 0;&lt;BR /&gt; dataPtr = ( uint8* ) PDUM_pvAPduInstanceGetPayload ( psEvent-&amp;gt;pZPSevent-&amp;gt;uEvent.sApsDataIndEvent.hAPduInst );&lt;BR /&gt; u8Size = PDUM_u16APduInstanceGetPayloadSize ( psEvent-&amp;gt;pZPSevent-&amp;gt;uEvent.sApsDataIndEvent.hAPduInst );&lt;BR /&gt; while (i &amp;lt; u8Size)&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;ZNC_BUF_U8_UPD( &amp;amp;au8LinkTxBuffer [u16Length], dataPtr[ i ], u16Length );&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;i++;&lt;BR /&gt; }&lt;BR /&gt; DBG_vPrintf(TRUE, "endpoint get application data length[%d]:------------------------\n",u16Length-6);&lt;BR /&gt; for(i=0; i&amp;lt;u16Length-6; i++){&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;DBG_vPrintf(TRUE, "0x%x ",au8LinkTxBuffer[i+6]);&lt;BR /&gt; }&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;DBG_vPrintf(TRUE, "--------------------\n");&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; memcpy(packData,&amp;amp;au8LinkTxBuffer[6],u16Length-6);&lt;BR /&gt; *Len = u16Length-6;&lt;/P&gt;&lt;P&gt;//Once the response has been dealt with, the application must de-allocate the APDU instance using the function PDUM_eAPduFreeAPduInstance()&lt;BR /&gt; if (psEvent-&amp;gt;pZPSevent-&amp;gt;uEvent.sApsDataIndEvent.hAPduInst != NULL )&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;DBG_vPrintf(TRUE, "readAttbuteData: free apdu\n");&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;PDUM_eAPduFreeAPduInstance(psEvent-&amp;gt;pZPSevent-&amp;gt;uEvent.sApsDataIndEvent.hAPduInst);&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Nov 2018 06:01:20 GMT</pubDate>
    <dc:creator>13560436802</dc:creator>
    <dc:date>2018-11-20T06:01:20Z</dc:date>
    <item>
      <title>overflow error</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/overflow-error/m-p/850512#M5758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have a problem about &lt;EM&gt;&lt;STRONG&gt;overflow error&lt;/STRONG&gt;&lt;/EM&gt;!&lt;/P&gt;&lt;P&gt;There are two device(A and B) communication each other, process steps as below:&lt;/P&gt;&lt;P&gt;1. A send a &lt;SPAN&gt;packet&lt;/SPAN&gt; to B;&lt;/P&gt;&lt;P&gt;2. B read the data and&amp;nbsp;reply a packet to A;&lt;/P&gt;&lt;P&gt;3. B occurred a &lt;STRONG&gt;&lt;EM&gt;overflow error&lt;/EM&gt;&lt;/STRONG&gt; when reply a packet;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/76937i348A04B2BC404405/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/76859iD6CD2BF44D8BEE81/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;----------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;This is the send or reply packet data code:&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;PUBLIC void vAppWriteAttribute(uint16 u16DestAddr, uint8 *wData, uint8 length)&lt;BR /&gt;{&lt;BR /&gt; uint8_t hexLength = 0;&lt;BR /&gt; uint8 u8FramControl = 0;&lt;BR /&gt; uint16 u16offset;&lt;BR /&gt; uint8 *pu8TransactionSequenceNumber = 0;&lt;BR /&gt; uint8 u8CommandId = 0x02;&lt;BR /&gt; uint16 u16AttribId;&lt;BR /&gt; uint16 u16Size;&lt;BR /&gt; uint8 i = 0;&lt;BR /&gt; uint8 tab[PACKAGE_LEN_MAX];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*pu8TransactionSequenceNumber = u8GetTransactionSequenceNumber();&lt;BR /&gt; DBG_vPrintf(TRUE, "vAppWriteAttribute: \n" );&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; PDUM_teStatus status;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PDUM_thAPduInstance Apdudata = PDUM_hAPduAllocateAPduInstance( apduZDP );&lt;BR /&gt; if( Apdudata == PDUM_INVALID_HANDLE )&lt;BR /&gt; {&lt;BR /&gt; /* problem allocating APDU instance memory*/&lt;BR /&gt; DBG_vPrintf(DEBUF_COMMAND_SERIL, "APP: Unable to allocate APDU memory\n");&lt;BR /&gt; }&lt;BR /&gt; else&lt;BR /&gt; {&lt;BR /&gt; if ( PDUM_E_OK != PDUM_eAPduInstanceSetPayloadSize(Apdudata, ( hexLength) ) )&lt;BR /&gt; {&lt;BR /&gt; DBG_vPrintf(DEBUF_COMMAND_SERIL, "vAppWriteAttribute: PDUM_eAPduInstanceSetPayloadSize error!!\n");&lt;BR /&gt; PDUM_eAPduFreeAPduInstance( Apdudata );&lt;BR /&gt; return;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;u8FramControl = ( 0x00 ) |&lt;BR /&gt; ( ( ( 0 ) ? 1 : 0 ) &amp;lt;&amp;lt; 2 )|&lt;BR /&gt; ( ( ( 0 ) ? 1 : 0 ) &amp;lt;&amp;lt; 3) |&lt;BR /&gt; ( 1 &amp;lt;&amp;lt; 4 );&lt;BR /&gt; u16offset = PDUM_u16APduInstanceWriteNBO ( Apdudata,&lt;BR /&gt; 0,&lt;BR /&gt; "bbb",&lt;BR /&gt; u8FramControl,&lt;BR /&gt; *pu8TransactionSequenceNumber,&lt;BR /&gt; u8CommandId );&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; u16Size = length;&lt;BR /&gt; i = 0;&lt;BR /&gt; memcpy(tab, wData,u16Size);&lt;BR /&gt; u16AttribId = FUNC_ATTRIBUTE_ID;&lt;BR /&gt; u16offset += PDUM_u16APduInstanceWriteNBO ( Apdudata,&lt;BR /&gt; u16offset,&lt;BR /&gt; "h",&lt;BR /&gt; u16AttribId ); // attribute id&lt;/P&gt;&lt;P&gt;u16offset += PDUM_u16APduInstanceWriteNBO ( Apdudata,&lt;BR /&gt; u16offset,&lt;BR /&gt; "b",&lt;BR /&gt; E_ZCL_ARRAY ); //attribute type&lt;/P&gt;&lt;P&gt;for(i=0; i&amp;lt;u16Size; i++){&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;u16offset += PDUM_u16APduInstanceWriteNBO ( Apdudata, u16offset, "b", tab[i] );&lt;BR /&gt; }&lt;BR /&gt; uint16 byteCount = u16Size + 6;&lt;BR /&gt; if( byteCount == 0 )&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;/* no data was written to the APDU instance*/&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;DBG_vPrintf(DEBUF_COMMAND_SERIL, "APP: No data written to APDU\n");&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;PDUM_eAPduFreeAPduInstance( Apdudata );&lt;BR /&gt; }&lt;BR /&gt; else&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;PDUM_teStatus pdumStatus = PDUM_eAPduInstanceSetPayloadSize( Apdudata, byteCount );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if( pdumStatus != PDUM_E_OK )&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;DBG_vPrintf(DEBUF_COMMAND_SERIL, "SendData: SetPayloadSize error, Status = %d\n", pdumStatus);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;PDUM_eAPduFreeAPduInstance( Apdudata );&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt; else&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;DBG_vPrintf(DEBUF_COMMAND_SERIL, "vAppWriteAttribute: written to APDU: %d\n", &amp;nbsp;&amp;nbsp;&amp;nbsp;PDUM_u16APduInstanceGetPayloadSize(Apdudata));&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;DBG_vPrintf(DEBUF_COMMAND_SERIL, "vAppWriteAttribute: get APDU size: %d\n", &amp;nbsp;&amp;nbsp;&amp;nbsp;PDUM_u16APduGetSize(apduZDP));&lt;BR /&gt; /* request data send to destination*/&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;status = ZPS_eAplAfUnicastAckDataReq(&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;Apdudata, // APDU instance handle&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;0x0008, // cluster ID&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;1, // source endpoint&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;1, // destination endpoint&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;u16DestAddr, // destination network address&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;ZPS_E_APL_AF_UNSECURE, // security mode&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;0, // radius&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;NULL // sequence number pointer&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;);&lt;BR /&gt; if( status != ZPS_E_SUCCESS )&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;// problem with request&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;DBG_vPrintf(DEBUF_COMMAND_SERIL, "vAppWriteAttribute: not successful. Return: 0x%x\n", status);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;PDUM_eAPduFreeAPduInstance( Apdudata );&lt;BR /&gt; }&lt;BR /&gt; else&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;/* TX data request successful*/&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;/*Once the request has been successfully sent, the APDU instance is automatically deallocated by the stack*/&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;DBG_vPrintf(DEBUF_COMMAND_SERIL, "vAppWriteAttribute: successful. Return: 0x%x\n", status);&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;This is the read&amp;nbsp;packet data code:&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;PUBLIC void readAttbuteData(tsZCL_CallBackEvent *psEvent, uint8 *packData, uint8_t *Len)&lt;BR /&gt;{&lt;BR /&gt; uint8 au8LinkTxBuffer[256];&lt;BR /&gt; uint16 u16Length = 0;&lt;BR /&gt; uint8* dataPtr;&lt;BR /&gt; uint8 u8Size;&lt;BR /&gt; uint8 i = 0;&lt;BR /&gt; dataPtr = ( uint8* ) PDUM_pvAPduInstanceGetPayload ( psEvent-&amp;gt;pZPSevent-&amp;gt;uEvent.sApsDataIndEvent.hAPduInst );&lt;BR /&gt; u8Size = PDUM_u16APduInstanceGetPayloadSize ( psEvent-&amp;gt;pZPSevent-&amp;gt;uEvent.sApsDataIndEvent.hAPduInst );&lt;BR /&gt; while (i &amp;lt; u8Size)&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;ZNC_BUF_U8_UPD( &amp;amp;au8LinkTxBuffer [u16Length], dataPtr[ i ], u16Length );&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;i++;&lt;BR /&gt; }&lt;BR /&gt; DBG_vPrintf(TRUE, "endpoint get application data length[%d]:------------------------\n",u16Length-6);&lt;BR /&gt; for(i=0; i&amp;lt;u16Length-6; i++){&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;DBG_vPrintf(TRUE, "0x%x ",au8LinkTxBuffer[i+6]);&lt;BR /&gt; }&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;DBG_vPrintf(TRUE, "--------------------\n");&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; memcpy(packData,&amp;amp;au8LinkTxBuffer[6],u16Length-6);&lt;BR /&gt; *Len = u16Length-6;&lt;/P&gt;&lt;P&gt;//Once the response has been dealt with, the application must de-allocate the APDU instance using the function PDUM_eAPduFreeAPduInstance()&lt;BR /&gt; if (psEvent-&amp;gt;pZPSevent-&amp;gt;uEvent.sApsDataIndEvent.hAPduInst != NULL )&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;DBG_vPrintf(TRUE, "readAttbuteData: free apdu\n");&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;PDUM_eAPduFreeAPduInstance(psEvent-&amp;gt;pZPSevent-&amp;gt;uEvent.sApsDataIndEvent.hAPduInst);&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Nov 2018 06:01:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/overflow-error/m-p/850512#M5758</guid>
      <dc:creator>13560436802</dc:creator>
      <dc:date>2018-11-20T06:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: overflow error</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/overflow-error/m-p/850513#M5759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dylan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How long is the data that you are sending?&lt;/P&gt;&lt;P&gt;Do you have a lot of&amp;nbsp;PDUM_u16APduInstanceWriteNBO? Is it works when you sent this by the A device?&lt;/P&gt;&lt;P&gt;What is the AN that you take as reference?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mario&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Nov 2018 02:49:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/overflow-error/m-p/850513#M5759</guid>
      <dc:creator>mario_castaneda</dc:creator>
      <dc:date>2018-11-22T02:49:53Z</dc:date>
    </item>
  </channel>
</rss>

