Index: program/patch.prog
===================================================================
--- /YC1308AC/branch/mouse_project/public_3mode/program/patch.prog	(revision 438)
+++ /YC1308AC/branch/mouse_project/public_3mode/program/patch.prog	(working copy)
@@ -25,9 +25,8 @@
 	beq patch30_7,p_ui_timer_check		
 	beq patch34_1,p_le_slave_match
 	
-//ifdef BATTERY_SERVICE_CANCEL
-//	beq patch38_0,p_le_parse_l2cap
-//endif	
+	beq patch38_0,p_le_parse_l2cap
+endif	
 	beq patch3d_4,p_g24_lpm_wait
 	branch loop
 
@@ -390,20 +389,26 @@
 	call le_transmit
 	branch le_slave_match+10
 
-//ifdef BATTERY_SERVICE_CANCEL
-//p_le_parse_l2cap:
-//	ifetch 2,contr
-//	beq LE_L2CAP_CID_ATT,p_le_parse_att
-//	branch le_parse_l2cap+10
+p_le_parse_l2cap:
+	ifetch 2,contr
+	beq LE_L2CAP_CID_ATT,p_le_parse_att
+	branch le_parse_l2cap+10
 		
-//p_le_parse_att:
+p_le_parse_att:
+//ifdef BATTERY_SERVICE_CANCEL
 //	call store_contr
 //	call p_mouse_le_reconn_write_enable_timer_reinit
 //	call get_contr
-//	ifetch 3,contr
-//	store 3,mem_le_att_opcode
+//endif	
+	ifetch 3,contr
+	store 3,mem_le_att_opcode
+//ifdef BATTERY_SERVICE_CANCEL
 //	beq ATTOP_READ_REQUEST,p_le_parse_att_read_request
-//	branch le_parse_att+2
+//endif
+	beq ATTOP_WRITE_REQUEST,p_le_parse_att_write_request	
+	branch le_parse_att+2
+	
+//ifdef BATTERY_SERVICE_CANCEL	
 //p_le_parse_att_read_request:
 //	call le_check_encrypt_state
 //	fetcht 2,mem_le_att_handle
@@ -434,6 +439,23 @@
 //	rtn
 //endif
 
+
+p_le_parse_att_write_request:		// mac os 10.9.5 reconnect can't move
+	copy contr,rega
+	fetch 2,mem_le_l2cap_size
+	add pdata,-3,regb
+	call le_writeatt_cb
+	fetch 1,mem_mouse_le_reconnect_flag
+	branch le_send_att_write_response_check_auth,blank
+	fetch 1,mem_le_connect_status_flag
+	bbit1 LL_START_ENC_FLAG,le_send_att_write_response_check_auth
+	setarg 0x001a		
+	fetcht 2,mem_le_att_handle
+	isub temp,null
+	nbranch le_send_att_write_response_check_auth,zero
+	jam ATT_ERR_INSUFFICIENT_AUTHENTICATION,mem_le_err_code
+	branch le_send_att_error_response
+
 p_g24_lpm_wait:			// ice connect led
 	fetch 1,mem_24g_device_led_status
 	ncall g24_transmit_by_interrupt_enable,blank
