Index: download/2.4g_address.hex
===================================================================
--- /1121s/branch/tools/1011-P_download/download/2.4g_address.hex	(nonexistent)
+++ /1121s/branch/tools/1011-P_download/download/2.4g_address.hex	(working copy)
@@ -0,0 +1 @@
+00 00 00 00 00 00
\ No newline at end of file
Index: download/YC1021-UserGuide v1.2.docx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: download/YC1021-UserGuide v1.2.docx
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: download/YC1021-UserGuide v1.2.pdf
===================================================================
--- /1121s/branch/tools/1011-P_download/download/YC1021-UserGuide v1.2.pdf	(nonexistent)
+++ /1121s/branch/tools/1011-P_download/download/YC1021-UserGuide v1.2.pdf	(working copy)
@@ -0,0 +1,5 @@
+%PDF-1.7
+%³
+1 0 obj
<</Names <</Dests 4 0 R>> /Outlines 5 0 R /Pages 2 0 R /Type /Catalog>>
endobj
3 0 obj
<</Author (KouFan) /Comments () /Company () /CreationDate (D:20161108165904+08'59') /Creator (WPS Office) /Keywords () /ModDate (D:20161108165904+08'59') /Producer () /SourceModified (D:20161108165904+08'59') /Subject () /Title () /Trapped false>>
endobj
19 0 obj
<</BitsPerComponent 8 /ColorSpace /DeviceGray /Filter /FlateDecode /Height 189 /Length 10053 /Matte [0 0 0] /Subtype /Image /Type /XObject /Width 749>>
+stream
+xw@G+EEQXb,I-Xc/QcwbAzgٻys{;;;U##FjlZȲh1%K9s+YJ
\ No newline at end of file
Index: download/YcDownload.bat
===================================================================
--- /1121s/branch/tools/1011-P_download/download/YcDownload.bat	(nonexistent)
+++ /1121s/branch/tools/1011-P_download/download/YcDownload.bat	(working copy)
@@ -0,0 +1,35 @@
+@echo off
+:start
+set/p cmd=Please click enter to download:
+if /I "%cmd%" equ "d" (goto download)
+if /I "%cmd%" equ "D" (goto download)
+if "%cmd%" equ "" (goto download)  else (goto error)
+
+
+:download
+set baud=a0
+e pu
+e 8043 0
+e 807a 3e
+e 807b 6c
+e 807c 6d
+call updateADDR.bat
+e ep output/eeprom.dat
+e er 0 10
+e ku 
+e au
+e 44f1l6
+e 42dbl6
+e ku
+e au
+goto end
+
+:end
+set cmd=d
+echo/
+goto start
+
+:error
+echo Cmd error, enter again
+goto end
+
Index: download/ble_address.hex
===================================================================
--- /1121s/branch/tools/1011-P_download/download/ble_address.hex	(nonexistent)
+++ /1121s/branch/tools/1011-P_download/download/ble_address.hex	(working copy)
@@ -0,0 +1 @@
+00 00 00 00 00 00
\ No newline at end of file
Index: download/e.exe
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: download/e.exe
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: download/geneep.exe
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: download/geneep.exe
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: download/osiuasm.exe
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: download/osiuasm.exe
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: download/updataADDR_2.4G.pl
===================================================================
--- /1121s/branch/tools/1011-P_download/download/updataADDR_2.4G.pl	(nonexistent)
+++ /1121s/branch/tools/1011-P_download/download/updataADDR_2.4G.pl	(working copy)
@@ -0,0 +1,196 @@
+$eeprom_path=$ARGV[0];
+$address_path=$ARGV[1];
+open (file , $eeprom_path)||goto enter_exit;
+@text = <file>;
+open (Result , ">$eeprom_path")||goto enter_exit;
+open (Address , $address_path)||goto enter_exit;
+@Address = <Address>;
+close(Address);
+$Address = @Address[0];
+$HavedADDR = 0;
+$ADDRSub=0;
+$Die=0;
+if($Address =~ /[\da-fA-F]{2} [\da-fA-F]{2} [\da-fA-F]{2} [\da-fA-F]{2} [\da-fA-F]{2} [\da-fA-F]{2}/){
+	if($Address =~ /[1-9a-fA-F]/){
+		$HavedADDR = 1;
+		@ADDR = split (/[ \n]+/,$Address);
+	}
+}
+else{
+	if($Address =~ /\S{2} \S{2} \S{2} \S{2} \S{2}/){
+		$Die=2;#data is error
+	}
+	else{
+		$Die=1;#structure is error
+	}
+	#die("illegal address");
+}
+
+$Sub = 0;
+$Match = 0;
+$spill = 0;
+$AllSpill = 0;
+$MatchBit=1;
+$MatchStr="";
+$MatchFirstVal="";
+@ave = ("aa\n","55\n","06\n","00\n","f1\n","44\n");
+$found_ave = 0;
+$length_text = @text;
+$replace_str = "";
+@BT_ADDR_3 = ("","","","","","");
+$BTADDRSub=0;
+
+for($count=0;$count<$length_text;$count++){
+	$text = @text[$count];
+#foreach $text (@text){
+	if($Match==1){
+		if($HavedADDR==1){
+			$replace_str = $replace_str.@ADDR[$ADDRSub]."\n";
+			print Result (@ADDR[$ADDRSub],"\n");
+			@BT_ADDR_3[$BTADDRSub]=@ADDR[$ADDRSub];
+			$BTADDRSub++;
+			$ADDRSub++;
+			if($ADDRSub>=6){
+				$Match=0;
+				$HavedADDR=0;
+				open (Address , ">$address_path")||goto enter_exit;
+				print Address ("00 00 00 00 00 00");
+				close(Address);
+			}
+		}
+		else{
+		$Match=0;
+		$text = &hex_add($text);
+		if($text eq "100"){
+			$spill=1;
+			if($MatchBit==1){
+				$MatchFirstVal="00\n";
+				@BT_ADDR_3[$BTADDRSub]="00";
+				$BTADDRSub++;
+			}
+			elsif($MatchBit<6){
+				$MatchStr.="00\n";
+				@BT_ADDR_3[$BTADDRSub]="00";
+				$BTADDRSub++;
+			}
+			else{
+				$MatchFirstVal="01\n";
+				$MatchStr.="00\n";
+				$AllSpill=1;
+				@BT_ADDR_3[$BTADDRSub]="00";
+				@BT_ADDR_3[0]="01";
+				$BTADDRSub++;
+			}
+			$Match=1;
+			$MatchBit++;
+		}
+		elsif($spill==0){
+			print Result ($text,"\n");
+			@BT_ADDR_3[$BTADDRSub]=$text;
+			$BTADDRSub++;
+			$replace_str = $replace_str.$text."\n";
+			for($i=1;$i<6;$i++)
+			{
+				@BT_ADDR_3[$BTADDRSub]=&DeletEnter(@text[$count+$i]);
+				$BTADDRSub++;
+				$replace_str = $replace_str.@text[$count+$i];
+			}
+		}
+		else{
+			@BT_ADDR_3[$BTADDRSub]=&DeletEnter($text);
+			&spill_print($text);
+			print Result ("\n");
+			$replace_str=$replace_str."\n";
+			#@BT_ADDR_3[$BTADDRSub]=$text;
+			$BTADDRSub++;
+			for($i=1;$i<6-$MatchBit;$i++)
+			{
+				@BT_ADDR_3[$BTADDRSub]=&DeletEnter(@text[$count+$i]);
+				$BTADDRSub++;
+				$replace_str = $replace_str.@text[$count+$i];
+			}
+		}
+		}
+	}
+	else{
+		print Result ($text);
+		if(($Match == 0) && ($text eq @ave[$Sub])){
+			if($Sub < 5){
+				$Sub=$Sub+1;
+			}
+			else{
+				if(@text[$count+7] eq "aa\n" && @text[$count+8] eq "55\n"){
+					$Match=1;
+					$found_ave=1;
+				}
+				else{
+					$Match=0;
+				}
+				$Sub=0;
+			}
+		}
+		else{
+			$Sub=0;
+		}
+	}
+	if($AllSpill==1){
+		&spill_print("");
+	}
+}
+if($found_ave==1){
+	print ("2.4G address:\t");
+	for($count=0;$count<6;$count++)
+	{
+		print (@BT_ADDR_3[5-$count]," ");
+	}
+	print ("\n");
+}
+close(file);
+close(Result);
+
+if($Die==1){
+	print ("ERROR :address structure is error in address.hex\n");
+	open (Address , ">$address_path")||goto enter_exit;
+	print Address ("00 00 00 00 00 00");
+	close(Address);
+}
+elsif($Die==2){
+	print ("ERROR :address data is error in address.hex\n");
+	open (Address , ">$address_path")||goto enter_exit;
+	print Address ("00 00 00 00 00 00");
+	close(Address);
+}
+open (Address , ">$address_path")||goto enter_exit;
+print Address ("00 00 00 00 00 00");
+close(Address);
+close(Result);
+
+sub hex_add{
+	my($Original_data)=@_;
+	$data=hex($Original_data);
+	$data++;
+	return(sprintf("%02x",$data));
+}
+sub DeletEnter{
+	my($Original_data)=@_;
+	$data=hex($Original_data);
+	return(sprintf("%02x",$data));
+}
+sub spill_print{
+	my($localStr)=@_;
+	$AllSpill=0;
+	$Match=0;
+	$spill=0;
+	$text = $MatchFirstVal.$MatchStr.$localStr;
+	$replace_str = $text;
+	print Result ($text);
+	$MatchFirstVal="";
+	$MatchStr="";
+	$MatchBit=1;
+}
+
+exit(0);
+
+enter_exit:
+	print ("Could not open file\n");
+	sleep();
Index: download/updataADDR_BLE.pl
===================================================================
--- /1121s/branch/tools/1011-P_download/download/updataADDR_BLE.pl	(nonexistent)
+++ /1121s/branch/tools/1011-P_download/download/updataADDR_BLE.pl	(working copy)
@@ -0,0 +1,196 @@
+$eeprom_path=$ARGV[0];
+$address_path=$ARGV[1];
+open (file , $eeprom_path)||goto enter_exit;
+@text = <file>;
+open (Result , ">$eeprom_path")||goto enter_exit;
+open (Address , $address_path)||goto enter_exit;
+@Address = <Address>;
+close(Address);
+$Address = @Address[0];
+$HavedADDR = 0;
+$ADDRSub=0;
+$Die=0;
+if($Address =~ /[\da-fA-F]{2} [\da-fA-F]{2} [\da-fA-F]{2} [\da-fA-F]{2} [\da-fA-F]{2} [\da-fA-F]{2}/){
+	if($Address =~ /[1-9a-fA-F]/){
+		$HavedADDR = 1;
+		@ADDR = split (/[ \n]+/,$Address);
+	}
+}
+else{
+	if($Address =~ /\S{2} \S{2} \S{2} \S{2} \S{2}/){
+		$Die=2;#data is error
+	}
+	else{
+		$Die=1;#structure is error
+	}
+	#die("illegal address");
+}
+$Sub = 0;
+$Match = 0;
+$spill = 0;
+$AllSpill = 0;
+$MatchBit=1;
+$MatchStr="";
+$MatchFirstVal="";
+@ave = ("aa\n","55\n","06\n","00\n","db\n","42\n");
+$found_ave = 0;
+$length_text = @text;
+$replace_str = "";
+@BT_ADDR_3 = ("","","","","","");
+$BTADDRSub=0;
+
+for($count=0;$count<$length_text;$count++){
+	$text = @text[$count];
+#foreach $text (@text){
+	if($Match==1){
+		if($HavedADDR==1){
+			$replace_str = $replace_str.@ADDR[$ADDRSub]."\n";
+			print Result (@ADDR[$ADDRSub],"\n");
+			@BT_ADDR_3[$BTADDRSub]=@ADDR[$ADDRSub];
+			$BTADDRSub++;
+			$ADDRSub++;
+			if($ADDRSub>=6){
+				$Match=0;
+				$HavedADDR=0;
+				open (Address , ">$address_path")||goto enter_exit;
+				print Address ("00 00 00 00 00 00");
+				close(Address);
+			}
+		}
+		else{
+		$Match=0;
+		$text = &hex_add($text);
+		if($text eq "100"){
+			$spill=1;
+			if($MatchBit==1){
+				$MatchFirstVal="00\n";
+				@BT_ADDR_3[$BTADDRSub]="00";
+				$BTADDRSub++;
+			}
+			elsif($MatchBit<6){
+				$MatchStr.="00\n";
+				@BT_ADDR_3[$BTADDRSub]="00";
+				$BTADDRSub++;
+			}
+			else{
+				$MatchFirstVal="01\n";
+				$MatchStr.="00\n";
+				$AllSpill=1;
+				@BT_ADDR_3[$BTADDRSub]="00";
+				@BT_ADDR_3[0]="01";
+				$BTADDRSub++;
+			}
+			$Match=1;
+			$MatchBit++;
+		}
+		elsif($spill==0){
+			print Result ($text,"\n");
+			@BT_ADDR_3[$BTADDRSub]=$text;
+			$BTADDRSub++;
+			$replace_str = $replace_str.$text."\n";
+			for($i=1;$i<6;$i++)
+			{
+				@BT_ADDR_3[$BTADDRSub]=&DeletEnter(@text[$count+$i]);
+				$BTADDRSub++;
+				$replace_str = $replace_str.@text[$count+$i];
+			}
+		}
+		else{
+			@BT_ADDR_3[$BTADDRSub]=&DeletEnter($text);
+			&spill_print($text);
+			print Result ("\n");
+			$replace_str=$replace_str."\n";
+			#@BT_ADDR_3[$BTADDRSub]=$text;
+			$BTADDRSub++;
+			for($i=1;$i<6-$MatchBit;$i++)
+			{
+				@BT_ADDR_3[$BTADDRSub]=&DeletEnter(@text[$count+$i]);
+				$BTADDRSub++;
+				$replace_str = $replace_str.@text[$count+$i];
+			}
+		}
+		}
+	}
+	else{
+		print Result ($text);
+		if(($Match == 0) && ($text eq @ave[$Sub])){
+			if($Sub < 5){
+				$Sub=$Sub+1;
+			}
+			else{
+				if(@text[$count+7] eq "aa\n" && @text[$count+8] eq "55\n"){
+					$Match=1;
+					$found_ave=1;
+				}
+				else{
+					$Match=0;
+				}
+				$Sub=0;
+			}
+		}
+		else{
+			$Sub=0;
+		}
+	}
+	if($AllSpill==1){
+		&spill_print("");
+	}
+}
+if($found_ave==1){
+	print ("Ble address:\t\t");
+	for($count=0;$count<6;$count++)
+	{
+		print (@BT_ADDR_3[5-$count]," ");
+	}
+	print ("\n");
+}
+close(file);
+close(Result);
+
+if($Die==1){
+	print ("ERROR :address structure is error in address.hex\n");
+	open (Address , ">$address_path")||goto enter_exit;
+	print Address ("00 00 00 00 00 00");
+	close(Address);
+}
+elsif($Die==2){
+	print ("ERROR :address data is error in address.hex\n");
+	open (Address , ">$address_path")||goto enter_exit;
+	print Address ("00 00 00 00 00 00");
+	close(Address);
+}
+open (Address , ">$address_path")||goto enter_exit;
+print Address ("00 00 00 00 00 00");
+close(Address);
+
+close(Result);
+
+sub hex_add{
+	my($Original_data)=@_;
+	$data=hex($Original_data);
+	$data++;
+	return(sprintf("%02x",$data));
+}
+sub DeletEnter{
+	my($Original_data)=@_;
+	$data=hex($Original_data);
+	return(sprintf("%02x",$data));
+}
+sub spill_print{
+	my($localStr)=@_;
+	$AllSpill=0;
+	$Match=0;
+	$spill=0;
+	$text = $MatchFirstVal.$MatchStr.$localStr;
+	$replace_str = $text;
+	print Result ($text);
+	$MatchFirstVal="";
+	$MatchStr="";
+	$MatchBit=1;
+}
+
+exit(0);
+
+enter_exit:
+	print ("Could not open file\n");
+	sleep();
\ No newline at end of file
Index: download/updateADDR.bat
===================================================================
--- /1121s/branch/tools/1011-P_download/download/updateADDR.bat	(nonexistent)
+++ /1121s/branch/tools/1011-P_download/download/updateADDR.bat	(working copy)
@@ -0,0 +1,3 @@
+@echo off
+perl updataADDR_2.4G.pl output/eeprom.dat 2.4G_address.hex
+perl updataADDR_BLE.pl output/eeprom.dat ble_address.hex
\ No newline at end of file
