Index: ModuleDemo/25_OTA/bt_demo/BT/patch/z.prog
===================================================================
--- /YC1121E/SoftCode/1121EB/branch/HciDongle/ModuleDemo/25_OTA/bt_demo/BT/patch/z.prog	(revision 5662)
+++ /YC1121E/SoftCode/1121EB/branch/HciDongle/ModuleDemo/25_OTA/bt_demo/BT/patch/z.prog	(working copy)
@@ -2163,11 +2163,11 @@
 
 
 z_parse_lmp_max_slot_req:
-	fetch 1,mem_max_slot
-	pincrease 1
+//	fetch 1,mem_max_slot
+//	pincrease 1
 	fetcht 1,mem_rxbuf+1
-	isub temp,null
-	nbranch z_parse_lmp_max_slot_req_not_accept,positive
+//	isub temp,null
+//	nbranch z_parse_lmp_max_slot_req_not_accept,positive
 z_parse_lmp_max_slot_event:
 	storet 1,mem_max_slot
 	call accept_lmp_msg
@@ -3391,11 +3391,26 @@
 	call send_lmp_follow
 	fetch 1,mem_lmi_opcode
 //	beq LMP_ENCRYPTION_MODE_REQ,z_send_lmp_accepted_enc_mode
+	beq LMP_ENCRYPTION_KEY_SIZE_REQ,z_send_lmp_accepted_enc_key
 	branch send_lmp_accepted+6
 
 //z_send_lmp_accepted_enc_mode:
-//	jam 1,mem_initiate_enc_master
-//	branch send_lmp_accepted_enc_mode
+//	fetch 1,mem_op
+//	bbit1 op_start_enc,z_send_lmp_accepted_enc_start
+//	branch send_lmp_accepted_enc_mode+2
+//	
+//z_send_lmp_accepted_enc_start:
+//	call check_localsm
+//	nrtn true
+//	fetch 1,mem_initiate_enc_master
+//	rtn blank
+//	jam LMP_ENCRYPTION_KEY_SIZE_REQ,mem_lmo_opcode2
+//	set0 op_start_enc,pdata
+//	branch send_lmp_accepted_enc_exit
+
+z_send_lmp_accepted_enc_key:
+	branch lmp_start_encryption,master
+	rtn
 
 org z
 z_rcv_conn_req_accept_timeout:
Index: ModuleDemo/25_OTA/bt_demo/CM0/respin/zcode.rom
===================================================================
--- /YC1121E/SoftCode/1121EB/branch/HciDongle/ModuleDemo/25_OTA/bt_demo/CM0/respin/zcode.rom	(revision 5662)
+++ /YC1121E/SoftCode/1121EB/branch/HciDongle/ModuleDemo/25_OTA/bt_demo/CM0/respin/zcode.rom	(working copy)
@@ -133,10 +133,10 @@
 e7e20005
 2040529b
 6fe20049
+c0080009
 20204ff1
-00000000
-00000000
-00000000
+2034cf56
+20600000
 00000000
 00000000
 00000000
@@ -1797,8 +1797,8 @@
 c0058014
 c01987de
 c017001e
-c0208026
-c0098034
+c0208022
+c0098030
 202007e0
 da200040
 2040604d
@@ -1820,16 +1820,12 @@
 c3830000
 20404d80
 20200243
-6fe24170
-1fe0fe01
 68420739
-98467c00
-2421002a
 60424170
 20404d51
-2020002c
+20200028
 6fe20b96
-c0058028
+c0058024
 70007c03
 20204eb4
 70007c04
@@ -1854,6 +1850,10 @@
 00000000
 00000000
 00000000
+00000000
+00000000
+00000000
+00000000
 20200040
 da201000
 68440738
