customized SNICInterface
Fork of NySNICInterface by
Diff: SNIC/SNIC_Core.cpp
- Revision:
- 32:ae95309643aa
- Parent:
- 29:6a0ba999597d
- Child:
- 33:33f1bc919486
diff -r 15c22824cc46 -r ae95309643aa SNIC/SNIC_Core.cpp --- a/SNIC/SNIC_Core.cpp Thu May 29 03:23:21 2014 +0000 +++ b/SNIC/SNIC_Core.cpp Fri May 30 08:30:40 2014 +0000 @@ -262,18 +262,16 @@ { uartRecvBuf_p = (tagMEMPOOL_BLOCK_T *)evt.value.p; +#if 0 { int i; - printf("[rcv]:%d",uartRecvBuf_p->size ); -/* for(i=0;i<uartRecvBuf_p->size;i++) { printf("%02x", uartRecvBuf_p->buf[i]); } -*/ printf("\r\n"); } - +#endif unsigned char command_id; // Get payload from received data from UART. int payload_len = C_SNIC_UartMsgUtil::getResponsePayload( uartRecvBuf_p->size, uartRecvBuf_p->buf @@ -284,6 +282,12 @@ // Packet buffering uartCmdMgr_p->bufferredPacket( gUART_TEMP_BUF, payload_len ); } + // Check connected from TCP client + else if( (command_id == UART_CMD_ID_SNIC) && (gUART_TEMP_BUF[0] == UART_CMD_SID_SNIC_TCP_CLIENT_SOCKET_IND) ) + { + // Connected from TCP client + uartCmdMgr_p->connectedTCPClient( gUART_TEMP_BUF, payload_len ); + } // Check scan results indication else if( (command_id == UART_CMD_ID_WIFI) && (gUART_TEMP_BUF[0] == UART_CMD_SID_WIFI_SCAN_RESULT_IND) ) {