<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 2020-05-19 02:40,
<a class="moz-txt-link-abbreviated" href="mailto:zhouyuanqing8@outlook.com">zhouyuanqing8@outlook.com</a> wrote:<br>
</div>
<blockquote type="cite"
cite="mid:HK2PR04MB38266B4510637846C7FAF9FCFEB90@HK2PR04MB3826.apcprd04.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
Hi All</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
I use the i2cget to read the device data, but the i2cset did
not write the data to the device, and the operation of i2cset
did not report any errors.<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
for example:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<span>root@starlake-bmc:/usr/sbin# i2cget 9 0x10 0x00 i 3<br>
</span>
<div>WARNING! This program can confuse your I2C bus, cause data
loss and worse!<br>
</div>
<div>I will read from device file /dev/i2c-9, chip address 0x10,
data address<br>
</div>
<div>0x00, 3 bytes using read I2C block data.<br>
</div>
<div>Continue? [Y/n]<br>
</div>
<div>3: 0x02 0x32 0xcc<br>
</div>
<div><br>
</div>
<div>root@starlake-bmc:/usr/sbin# i2cset 9 0x10 0x82 0x0101 2<br>
</div>
<div>WARNING! This program can confuse your I2C bus, cause data
loss and worse!<br>
</div>
<div>I will read from device file /dev/i2c-9, chip address 0x10,
data address<br>
</div>
<span>0x00, using read word data.</span></div>
</blockquote>
<p>Well, that is a bit odd. It looks like that just did a read, not
a write.</p>
<p><br>
</p>
<p>Do you need to use the force access option? What is that 2?
Should it be a word (w)?<br>
</p>
<p><a class="moz-txt-link-freetext" href="https://linux.die.net/man/8/i2cset">https://linux.die.net/man/8/i2cset</a></p>
<p>i2cset -f 9 0x10 0x82 0x0101 w<br>
</p>
<blockquote type="cite"
cite="mid:HK2PR04MB38266B4510637846C7FAF9FCFEB90@HK2PR04MB3826.apcprd04.prod.outlook.com">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<span><br>
</span></div>
<div><font size="3" face="Calibri, Arial, Helvetica, sans-serif"
color="#000000">when </font><font face="Calibri, Arial,
Helvetica, sans-serif" color="#000000"><span
style="caret-color: rgb(0, 0, 0);">I</span></font><font
size="3" face="Calibri, Arial, Helvetica, sans-serif"
color="#000000"> check the 0x82 reg,the value is not changed.</font></div>
<div><font size="3" face="Calibri, Arial, Helvetica, sans-serif"
color="#000000"><br>
</font></div>
<div><font size="3" face="Calibri, Arial, Helvetica, sans-serif"
color="#000000">Thanks</font></div>
<div><font size="3" face="Calibri, Arial, Helvetica, sans-serif"
color="#000000">harley</font></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<span><br>
</span></div>
</blockquote>
</body>
</html>