Index: fw/d.bat
===================================================================
--- /YC3121_SDK/fw/d.bat	(revision 660)
+++ /YC3121_SDK/fw/d.bat	(working copy)
@@ -1,3 +1,18 @@
-e pu 
-e fp 
-e fr 0 20
\ No newline at end of file
+rem pause
+echo on
+cls
+e p
+e p
+e p
+e p
+e pu
+e r pc c0
+e f853c 0c
+e otr 2 6 ->id
+e otr 160 18 ->key
+perl hex2rom.pl 1000000 1ffffff  32 output\out.hex  output\flash.rom
+encrom.exe output\flash.rom  output\flash.dat  key id
+
+e fp ../output\flash.dat
+e k
+rem e fr 0 20
Index: fw/encrom.exe
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: fw/hex2rom.pl
===================================================================
--- /YC3121_SDK/fw/hex2rom.pl	(revision 660)
+++ /YC3121_SDK/fw/hex2rom.pl	(working copy)
@@ -2,6 +2,7 @@
 
 my @rom = ();
 die "missing start and end address" if(@ARGV < 2);
+
 $addrhi = 0;
 $baseaddr = hex($ARGV[0]);
 $endaddr = hex($ARGV[1]);
@@ -9,31 +10,56 @@
 $bits = $ARGV[2] if(@ARGV > 2);
 $endian = 1;
 
-while (<STDIN>) {
+
+$inputfile_addr = $ARGV[3];
+print "\input:  $inputfile_addr\n";
+$outputfile_addr =$ARGV[4];
+print "\output:  $outputfile_addr\n";
+
+
+open(DATA,$inputfile_addr);
+
+while(<DATA>){
 	$line++;
 	$count = (hex substr($_, 1, 2));
 	$addr = (hex substr($_, 3, 4));
 	$type = (hex substr($_, 7, 2));
 	if($type == 2 || $type == 4) {
 		$addrhi = hex(substr($_, 9, 4)) << ($type == 2 ? 4 : 16);
-#		printf "type=%d, addr=%x, line=%d\n", $type, $addrhi, $line;
+		printf "type=%d, addr=%x, line=%d\n", $type, $addrhi, $line;
 	}
-	if($type == 0 && $addrhi + $addr >= $baseaddr && $addrhi <= $endaddr) {
+	if($type == 0 && $addrhi >= $baseaddr && $addrhi <= $endaddr) {
 		for($x=0; $x<$count; $x++) {
 			$rom[$addrhi - $baseaddr + $addr + $x] = (hex substr($_, 9+2*$x, 2)) ; 
 		}
 	}
 }
+
+#删除目标文件
+unlink($outputfile_addr);
+#创建目标文件
+$outputfile_addr =$ARGV[4];
+$outputfile_addr = '+>'.$outputfile_addr;
+print "$outputfile_addr\n";
+open(DATA1,$outputfile_addr) or die "des file open fail,$!";
+
 if($bits == 1) {
 	for($x=0; $x<@rom; $x++) {
-			printf ("%x", $rom[$x]);
+			printf ("%04x\n", $rom[$x]);
 		}
 		print "\n";
 } else {
 	for($x=0; $x<@rom; $x+=$bits/8) {
 		for($i = 0;$i < $bits/8;$i++) {
-			printf ("%02x", $endian ? $rom[$x+$bits/8-1-$i] : $rom[$x+$i]);
-		}
-		print "\n";
+			$tmp = sprintf("%02x",($endian ? $rom[$x+$bits/8-1-$i] : $rom[$x+$i])),
+			print DATA1 "$tmp";
+#			printf "$tmp";
+			}
+		print DATA1 "\n";
+#		printf "\n";
 	}
 }
+$inputfile_addr = $ARGV[3];
+$outputfile_addr =$ARGV[4];
+close(inputfile_addr);
+close(outputfile_addr);
Index: fw/key
===================================================================
--- /YC3121_SDK/fw/key	(revision 660)
+++ /YC3121_SDK/fw/key	(working copy)
@@ -1,24 +1,24 @@
-01
-02
-03
-04
-05
-06
-07
-08
-09
+fc
+d3
+6b
+d6
+78
+c2
+7d
+cc
+7c
+bd
 0a
-0b
-0c
-0d
-0e
-0f
-10
-11
-12
-13
-14
-15
+8d
+3c
+8b
+3d
+64
+ca
+b9
 16
+bb
 17
-18
\ No newline at end of file
+ed
+e9
+0a
Index: fw/sdk/yc_bt.h
===================================================================
--- /YC3121_SDK/fw/sdk/yc_bt.h	(revision 660)
+++ /YC3121_SDK/fw/sdk/yc_bt.h	(working copy)
@@ -57,8 +57,11 @@
 #define BIT_SET_CREDIT										30
 #define BIT_DELETE_SERVICE								31
 #define BIT_ADD_UUID											32
-
-
+#define BIT_DNS_REQ                       33
+#define BIT_CONNECT_BNEP                  34
+#define BIT_CONNECT_TCP                   35
+#define BIT_BNEP_SEND_TCPDATA             36
+#define BIT_DISCONNECT_TCP                37
 /*CMD*/
 #define HCI_CMD_SET_BT_ADDR               0x00  //设置 BT3.0 地址
 #define HCI_CMD_SET_BLE_ADDR              0x01  //设置 BLE 地址
@@ -90,6 +93,11 @@
 #define	HCI_CMD_ADD_SERVICE_UUID					0x77
 #define	HCI_CMD_ADD_CHARACTERISTIC_UUID		0x78
 #define	HCI_CMD_SET_COD										0x15  //设置 COD
+#define HCI_CMD_CONNECT_BNEP              0x7e //建立BNEP连接
+#define HCI_CMD_CONNECT_TCP               0x7f //建立TCP连接
+#define HCI_CMD_DISCONNECT_TCP            0x80 //断开TCP连接
+#define HCI_CMD_BNEP_SEND_TCP_DATA        0x81 //发送TCP数据
+#define HCI_CMD_DNS_REQ                   0x82 //域名解析指令
 
 
 /*EVENT*/
@@ -108,6 +116,17 @@
 #define HCI_EVENT_GET_PASSKEY             0x10  /**PASSKEY 配对方式中通知MCU 返回密钥,MCU收到此事件后需发送HCI_CMD_PASSKEY_ENTRY指令回复蓝牙模块*/
 #define HCI_EVENT_PAIRING_COMPLETED       0x11  /**配对完成的事件，通知 MCU配对完成*/
 #define	HCI_EVENT_UUID_HANDLE							0x29
+#define HCI_EVENT_BNEP_CONNECT            0x2c  /**通知MCU BNEP连接成功*/
+#define HCI_EVENT_BNEP_DISCONNECT         0x2d  /**通知MCU BNEP断开连接*/
+#define HCI_EVENT_BNEP_CONNECT_FAIL       0x2e  /**通知MCU BNEP连接失败原因*/
+#define HCI_EVENT_TCP_CONNECT             0x2f /**通知MCU TCP连接成功*/
+#define HCI_EVENT_TCP_DISCONNECT          0x30 /**通知MCU TCP断开连接*/
+#define HCI_EVENT_BNEP_RECEIVE_TCP_DATA   0x31  /*接收到TCP数据*/
+#define HCI_EVNET_TCP_FAIL                0x32  /*TCP连接或者断开失败*/
+#define HCI_EVENT_TCP_CONNECT_LOG         0x33  /*TCP连接LOG*/
+#define HCI_EVENT_BNEP_CHIP_ERROR         0x34  /*芯片不支持BNEP*/
+#define HCI_EVENT_DNS_RSP                 0x35  /*DNS返回的ip地址*/
+
 
 /** 
   * @brief  event code enum definition  
@@ -123,9 +142,45 @@
 	NVRAM_DATA          =HCI_EVENT_NVRAM_CHANGED,
 	CONFIRM_GKEY        =HCI_EVENT_GKEY,
 	PASSKEY             =HCI_EVENT_GET_PASSKEY,
-	PAIRING_COMPLETED   =HCI_EVENT_PAIRING_COMPLETED
+	PAIRING_COMPLETED   =HCI_EVENT_PAIRING_COMPLETED,
+	BNEP_CONNECT        =HCI_EVENT_BNEP_CONNECT,
+	TCP_CONNECT         =HCI_EVENT_TCP_CONNECT,
+	BNEP_RECEIVE_TCP_DATA = HCI_EVENT_BNEP_RECEIVE_TCP_DATA,
+	TCP_DISCONNECT       =HCI_EVENT_TCP_DISCONNECT,
+	BNEP_DISCONNECT      = HCI_EVENT_BNEP_DISCONNECT,
+	BNEP_CONNECT_FAIL    =HCI_EVENT_BNEP_CONNECT_FAIL,
+	TCP_FAIL             =HCI_EVNET_TCP_FAIL,
+	TCP_CONNECT_LOG      =HCI_EVENT_TCP_CONNECT_LOG,
+	BNEP_CHIP_ERROR      =HCI_EVENT_BNEP_CHIP_ERROR,
+	DNS_RSP              =HCI_EVENT_DNS_RSP
 }BT_EventCodeEnum;
 
+typedef enum
+{
+BNEP_CONNECT_TIMEOUT,
+MOBILE_PHONE_NOT_SUPPORTED_BNEP,
+LINKKLY_ERROR,
+ROLE_SWITCH_FAIL
+}Bnep_Connect_Fail_Reason;
+
+typedef enum
+{
+TCP_CONNECT_TIMEOUT,
+DNS_NO_ACK,
+IP_ERROR,
+DISCONNECT_TIMEOUT,
+RECEIVER_TCP_RST
+}Tcp_Connect_Fail_Reason;
+
+typedef enum
+{
+RECIEVE_DHCP_OFFER=0X01,
+RECIEVE_DHCP_ACK=0X03,
+RECIEVE_ARP_RESPONSE=0X05,
+RECIEVE_DNS_RESPONSE=0X07,
+RECIEVE_TCP_SYN_ACK=0X09
+}Tcp_Connect_Log;
+
 
 typedef struct 
 {
@@ -138,7 +193,7 @@
 
 /**
   * @brief   Set the address of the bluetooth 3.0 device
-  * @param  bt_addr: pointer to  address information.
+  * @param  bt_addr: pointer to  address(6 bytes)
   * @retval TRUE:set addr success.
   *         FALSE:set addr failed
   */
@@ -147,7 +202,7 @@
 
 /**
   * @brief  Set the address of the bluetooth 4.0 device
-  * @param  bt_addr: pointer to  address information.
+  * @param  bt_addr: pointer to  address(6 bytes)
   * @retval TRUE:set addr success.
   *         FALSE:set addr failed
   */
@@ -187,8 +242,8 @@
 
 /**
   * @brief  Bt send spp(bt3.0) data
-  * @param  bt_addr: pointer to  spp data 
-  *         DataLen: spp data length.
+  * @param  spp_data: pointer to  spp data 
+  *         len: spp data length(max len is 255)
   * @retval TRUE:send spp data success.
   *         FALSE:send spp data failed
   */
@@ -197,8 +252,8 @@
 
 /**
   * @brief  Send ble data
-  * @param  bt_addr: pointer to  spp data ,includes two bytes handle(byte0-byte1 is ble handle).
-  *         DataLen: data length.
+  * @param  ble_data: pointer to  ble data ,includes two bytes handle(byte0-byte1 is ble handle).
+  *         len: data length(max len is 255)
   * @retval TRUE:send ble data success.
   *         FALSE:send ble data failed
   */
@@ -235,7 +290,7 @@
 /**
   * @brief  set classic bluetooth paring PIN code
   * @param  Pincode:the pointer ponint to pincode data
-            Datalen: normally the value can be 0x01~0x10,
+            len: normally the value can be 0x01~0x10,
   * @retval	   ture or FALSE
   */
 Boolean BT_SetPincode(uint8_t* Pincode,uint8_t len);
@@ -252,7 +307,7 @@
 
 
 /**
-  * @brief  Set bt disconnect
+  * @brief  bt disconnect
   * @param  none
   * @retval TRUE:bt disconnected success.
   *         FALSE:bt disconnected failed
@@ -261,11 +316,12 @@
 
 /**
   * @brief  Set NVRAM
-  * @param  NvData:the pointer point to NVRAMData,data length is 0xaa.
+  * @param  NvData:the pointer point to NVRAMData
+	* 				len:bnep is 34(one group),other is 170(5*34=170 five group).
   * @retval TRUE:bt disconnected success.
   *         FALSE:bt disconnected failed
   */
-Boolean BT_SetNVRAM(uint8_t * NvData);
+Boolean BT_SetNVRAM(uint8_t * NvData,int len);
 
 
 /**
@@ -384,7 +440,7 @@
 
 
 /**
-  * @brief  Set ble disconnect
+  * @brief  ble disconnect
   * @param  none 
   * @retval TRUE:ble disconnected success.
   *         FALSE:ble disconnected failed
@@ -507,5 +563,79 @@
   *         FALSE:fail
   */
 Boolean BT_Init(void);
+
+
+
+/**
+  * @brief  DNS(domain name resolution)
+  * @param  dns_data: pointer to  domain name(www.baidu.com).
+            DataLen: data length(max 49 bytes)
+  * @retval TRUE:success
+  *         FALSE:fail
+  */
+Boolean BT_DnsReq( uint8_t *dns_data,int len);
+/**
+  * @brief  Connect Bnep
+  * @param   *phone_mac_addr: pointer to phone_mac_addr. 
+	           Byte0~Byte5   The MAC address you want to connect to your phone
+						 Byte6~Byte21  Link key
+						 (phone MAC and Link key from NVRAM event,all zero is connect last pair phone)
+             len: data length(must be 22 byte)
+  * @retval TRUE:success
+  *         FALSE:fail
+  */
+Boolean BT_ConnectBnep( uint8_t *phone_mac_addr,int len);
+
+/**
+  * @brief  disconnect Bnep
+  * @param   none
+  * @retval TRUE:success
+  *         FALSE:fail
+  */
+Boolean BT_disconnectBnep();
+
+
+
+/**
+  * @brief  Connect Tcp
+  * @param  tcp_ip_addr: pointer to  tcp_ip_addr.
+	          Byte0  TCP connect handle(0x00 or 0x01)
+						Byte1~Byte4  IP address(192.168.1.1 is c0 a8 01 01)
+						Byte5~Byte6  port number(8888 is 22 b8)
+            len: data length(must be 7 byte)
+  * @retval TRUE:success
+  *         FALSE:fail
+  */
+Boolean BT_ConnectTcp( uint8_t *tcp_ip_addr,int len);
+
+
+
+/**
+  * @brief  Send  TcpData
+  * @param  tcpdata: pointer to  tcpdata.
+	          Byte0  TCP connect handle
+						Byte1~ByteN  The TCP data you want to send
+            len: data length(max 251 bytes)
+  * @retval TRUE:success
+  *         FALSE:fail
+  */
+Boolean BT_BnepSendTcpData( uint8_t *tcpdata,int len);
+
+
+
+/**
+  * @brief  Disconnect  Tcp
+  * @param  tcp_handle: the want to disconnect TCP handle(0x00 or 0x01)                
+  * @retval TRUE:success
+  *         FALSE:fail
+  */
+Boolean BT_DisconnectTcp(uint8_t tcp_handle);
+
+
+
+
+
+
+
 #endif 
 
Index: fw/sdk/yc_bt.c
===================================================================
--- /YC3121_SDK/fw/sdk/yc_bt.c	(revision 660)
+++ /YC3121_SDK/fw/sdk/yc_bt.c	(working copy)
@@ -91,6 +91,56 @@
 	}
 }
 
+//#define PrintLog
+#define DOMAIN_MAX_LEN	49
+Boolean BNEP_DomainConvert(unsigned char * domainString, unsigned char domainStringLen, unsigned char *newDomainString,int* newDomainStringIndex)
+{
+	#ifdef PrintLog
+	MyPrintf("input domain:%s \n", domainString);
+	#endif
+	unsigned char domainCount = 0;
+	*newDomainStringIndex = 1;
+	int newDomainDelimiterIndex = 0;
+	#ifdef PrintLog
+	MyPrintf("domain hex:\n");
+	for (int i = 0; i < domainStringLen; i++)
+	{
+		MyPrintf("%02X ", domainString[i]);
+	}
+	MyPrintf("\n");
+	#endif
+	while(domainStringLen--)
+	{
+		domainCount++;
+		if (*domainString == '.')
+		{
+			newDomainString[newDomainDelimiterIndex] = domainCount-1;
+			newDomainDelimiterIndex = *newDomainStringIndex;
+			(*newDomainStringIndex)++;
+			if((*newDomainStringIndex)>=DOMAIN_MAX_LEN)	return FALSE;
+			domainCount = 0;
+		}
+		else
+		{
+			newDomainString[(*newDomainStringIndex)++] = *domainString;
+			if((*newDomainStringIndex)>=DOMAIN_MAX_LEN)	return FALSE;
+		}
+		domainString++;
+	}
+	newDomainString[newDomainDelimiterIndex] = domainCount;
+	newDomainString[(*newDomainStringIndex)++] = 00;
+	if((*newDomainStringIndex)>=DOMAIN_MAX_LEN)	return FALSE;
+	#ifdef PrintLog
+	MyPrintf("format Domain:\n");
+	for (int  i = 0; i < *newDomainStringIndex; i++)
+	{
+	MyPrintf("%02X ", newDomainString[i]);
+	}
+	MyPrintf("\n");
+	#endif
+	return TRUE;
+}
+
 
 Boolean BT_Init()
 {
@@ -411,12 +461,11 @@
 }
 
 
-Boolean BT_SetNVRAM(uint8_t * NvData)
+Boolean BT_SetNVRAM(uint8_t * NvData,int len)
 {
-#define NDLen 0xaa
 	HCI_TypeDef msg;
 	msg.opcode = HCI_CMD_SET_NVRAM;
-	msg.DataLen = NDLen;
+	msg.DataLen = len;
 	msg.p_data = NvData;
 	BT_BIT_CLEAR(HCI_CMD_BIT_FLAG,BIT_SET_NVRAM);
 	SendCMD(&msg);
@@ -738,6 +787,114 @@
 	return 0x00;
 }
 
+Boolean BT_DnsReq( uint8_t *dns_data,int len)
+{
+	uint8_t format_dns[DOMAIN_MAX_LEN];
+	int format_dns_len;
+	if(TRUE != BNEP_DomainConvert(dns_data,len,format_dns,&format_dns_len))
+	{
+		return FALSE;
+	}
+	HCI_TypeDef msg;
+	msg.opcode = HCI_CMD_DNS_REQ;
+	msg.DataLen = format_dns_len;
+	msg.p_data = format_dns;
+	BT_BIT_CLEAR(HCI_CMD_BIT_FLAG,BIT_DNS_REQ);
+  SendCMD(&msg);
+  StartTick=SysTick_GetTick();
+  do
+  {
+		if(BT_BIT_GET(HCI_CMD_BIT_FLAG,BIT_DNS_REQ))
+		{
+			return TRUE;
+		}
+  }while(!SysTick_IsTimeOut(StartTick,BTTIMEOUT));//ms
+	return FALSE;
+}
+
+Boolean BT_ConnectBnep( uint8_t *phone_mac_addr,int len)
+{
+	HCI_TypeDef msg;
+	msg.opcode = HCI_CMD_CONNECT_BNEP;
+	msg.DataLen = len;
+	msg.p_data = phone_mac_addr;
+	BT_BIT_CLEAR(HCI_CMD_BIT_FLAG,BIT_CONNECT_BNEP);
+  SendCMD(&msg);
+  StartTick=SysTick_GetTick();
+  do
+  {
+		if(BT_BIT_GET(HCI_CMD_BIT_FLAG,BIT_CONNECT_BNEP))
+		{
+			return TRUE;
+		}
+  }while(!SysTick_IsTimeOut(StartTick,BTTIMEOUT));//ms
+	return FALSE;
+}
+
+Boolean BT_disconnectBnep()
+{
+	return BT_BtDisconnect();
+}
+
+Boolean BT_ConnectTcp(uint8_t *tcp_ip_addr,int len)
+{
+	HCI_TypeDef msg;
+	msg.opcode = HCI_CMD_CONNECT_TCP;
+	msg.DataLen = len;
+	msg.p_data = tcp_ip_addr;
+	BT_BIT_CLEAR(HCI_CMD_BIT_FLAG,BIT_CONNECT_TCP);
+  SendCMD(&msg);
+  StartTick=SysTick_GetTick();
+  do
+  {
+		if(BT_BIT_GET(HCI_CMD_BIT_FLAG,BIT_CONNECT_TCP))
+		{
+			return TRUE;
+		}
+  }while(!SysTick_IsTimeOut(StartTick,BTTIMEOUT));//ms
+	return FALSE;
+}
+
+
+
+Boolean BT_BnepSendTcpData( uint8_t *tcpdata,int len)
+{
+	HCI_TypeDef msg;
+	msg.opcode = HCI_CMD_BNEP_SEND_TCP_DATA;
+	msg.DataLen = len;
+	msg.p_data = tcpdata;
+	BT_BIT_CLEAR(HCI_CMD_BIT_FLAG,BIT_BNEP_SEND_TCPDATA);
+  SendCMD(&msg);
+  StartTick=SysTick_GetTick();
+  do
+  {
+		if(BT_BIT_GET(HCI_CMD_BIT_FLAG,BIT_BNEP_SEND_TCPDATA))
+		{
+			return TRUE;
+		}
+  }while(!SysTick_IsTimeOut(StartTick,BTTIMEOUT));//ms
+	return FALSE;
+}
+
+
+Boolean BT_DisconnectTcp(uint8_t tcp_handle)
+{
+	HCI_TypeDef msg;
+	msg.opcode = HCI_CMD_DISCONNECT_TCP;
+	msg.DataLen = 1;
+	msg.p_data = &tcp_handle;
+	BT_BIT_CLEAR(HCI_CMD_BIT_FLAG,BIT_DISCONNECT_TCP);
+  SendCMD(&msg);
+  StartTick=SysTick_GetTick();
+  do
+  {
+		if(BT_BIT_GET(HCI_CMD_BIT_FLAG,BIT_DISCONNECT_TCP))
+		{
+			return TRUE;
+		}
+  }while(!SysTick_IsTimeOut(StartTick,BTTIMEOUT));//ms
+	return FALSE;
+}
 
 void BT_ParseBTData()
 {
@@ -774,7 +931,15 @@
 					SaveData((uint8_t*)&hci_bt,3);
 					SaveData(hci_bt.p_data,hci_bt.DataLen);												
 					PacketNum++;
-					break;	
+					break;
+				
+				case HCI_EVENT_BNEP_RECEIVE_TCP_DATA:
+//					SaveData((uint8_t *)&hci_bt,hci_bt.DataLen+3);
+					SaveData((uint8_t*)&hci_bt,3);
+					SaveData(hci_bt.p_data,hci_bt.DataLen);												
+					PacketNum++;
+					break;
+				
 				case HCI_EVENT_BT_CONNECTED:
 				case HCI_EVENT_BLE_CONNECTED:
 				case HCI_EVENT_GKEY:
@@ -783,6 +948,15 @@
 				case HCI_EVENT_NVRAM_CHANGED:
 				case HCI_EVENT_GET_PASSKEY:
 				case HCI_EVENT_PAIRING_COMPLETED:
+				case HCI_EVENT_BNEP_CONNECT:
+				case HCI_EVENT_BNEP_DISCONNECT:
+				case HCI_EVENT_BNEP_CONNECT_FAIL:
+				case HCI_EVENT_TCP_CONNECT:
+				case HCI_EVENT_TCP_DISCONNECT:
+				case HCI_EVNET_TCP_FAIL:
+				case HCI_EVENT_TCP_CONNECT_LOG:
+				case HCI_EVENT_BNEP_CHIP_ERROR:
+				case HCI_EVENT_DNS_RSP:
 					
 			//		SaveData((uint8_t *)&hci_bt,hci_bt.DataLen+3);
 					SaveData((uint8_t*)&hci_bt,3);
@@ -967,6 +1141,42 @@
 							 BT_BIT_SET(HCI_CMD_BIT_FLAG,BIT_LE_SET_FIXED_PASSKEY);
 						}
 						break;
+						
+						case HCI_CMD_CONNECT_BNEP:
+						if(!hci_bt.p_data[1])
+						{
+							 BT_BIT_SET(HCI_CMD_BIT_FLAG,BIT_CONNECT_BNEP);
+						}
+						break;
+						
+						case HCI_CMD_CONNECT_TCP:
+						if(!hci_bt.p_data[1])
+						{
+							 BT_BIT_SET(HCI_CMD_BIT_FLAG,BIT_CONNECT_TCP);
+						}
+						break;
+						
+						case HCI_CMD_DISCONNECT_TCP:
+						if(!hci_bt.p_data[1])
+						{
+							 BT_BIT_SET(HCI_CMD_BIT_FLAG,BIT_DISCONNECT_TCP);
+						}
+						break;
+						
+						case HCI_CMD_BNEP_SEND_TCP_DATA:
+						if(!hci_bt.p_data[1])
+						{
+							 BT_BIT_SET(HCI_CMD_BIT_FLAG,BIT_BNEP_SEND_TCPDATA);
+						}
+						break;
+						
+						case HCI_CMD_DNS_REQ:
+						if(!hci_bt.p_data[1])
+						{
+							 BT_BIT_SET(HCI_CMD_BIT_FLAG,BIT_DNS_REQ);
+						}
+						break;
+						
 						default:
 							break;
 					}
@@ -1022,6 +1232,9 @@
 		TempOpcode==BLE_CONNECTED||\
 		TempOpcode==BT_DISCONNECTED||\
 		TempOpcode==BLE_DISCONNECTED||\
+	  TempOpcode==BNEP_CONNECT||\
+	  TempOpcode==BNEP_DISCONNECT||\
+	  TempOpcode==BNEP_CHIP_ERROR||\
 		TempOpcode==PASSKEY)
 	{
 		SkipData(3);
