diff --git a/02.nicsensor/nicsensor.sh b/02.nicsensor/nicsensor.sh index d38d89c..08ffb1b 100644 --- a/02.nicsensor/nicsensor.sh +++ b/02.nicsensor/nicsensor.sh @@ -50,8 +50,16 @@ server_type="5280m7" # Common Varible (请勿随意修改) # --------------------------------------------------------- # Input Param +# Introduction of pcie_slot +# 1.脚本即将访问的网卡位于服务器上的PCIe插槽位置 pcie_slot=$1 + +# Introduction of sensor_type +# 1.脚本即将读取和处理的传感器名称 sensor_type=$2 + +# Introduction of chip_slave +# 1.chip i2c slave address(7bit) chip_slave=$3 # Introduction of option_data @@ -126,7 +134,7 @@ ina3221_ch2_volt="0" ina3221_ch0_current="0" ina3221_ch1_current="0" ina3221_ch2_current="0" -SCRIPT_VRESION="1.2 InTest Rev1" +SCRIPT_VRESION="1.2 InTest Rev2" fru_file_name=$option_data2 fru_write_size=0 @@ -147,6 +155,10 @@ print_usage(){ echo " [slave] : chip slave address , please provide 7 bit address" echo " E.G. : ./nicsensor.sh 0 adc128 0x1f" echo "" + echo " To Auto detect i2c slave on server, please use:" + echo " ./nicsensor.sh detect" + echo " This function now only support on server 5280m7, 5468m7, donghu" + echo "" echo " If want to read/write chip register, use the below format" echo " ./nicsensor.sh [slot] chip [slave] [i2c_command]" echo " i2c_command : such as [i2ctransfer -y 13 w1@0x10 0x00 r2]" diff --git a/02.nicsensor/readme.txt b/02.nicsensor/readme.txt index 56b159c..a231dcd 100644 --- a/02.nicsensor/readme.txt +++ b/02.nicsensor/readme.txt @@ -64,7 +64,7 @@ 1.5、DEBUG模式 - 可通过配置脚本中的 DEBUG_MODE 变量(In Srcipt Line:104)来使用debug模式,在debug模式下,不会执行选通 + 可通过配置脚本中的 DEBUG_MODE 变量(In Srcipt Line:112)来使用debug模式,在debug模式下,不会执行选通 9641,9548的操作,仅执行读取传感器的操作,因此启用debug模式后需要手动配置的变量有: i2c_bus