user54800: I want to know why Wire.onRequest can not detect below massage and what I can do to detect it.(I am not able to change I2C massage)
I was able to read this part of the massage with wire.onReceive:

But I can not read this massage at all, which is requesting:

#include <Wire.h>
byte val = 170;
int sendv;

char c;

byte dataArray[16];

void setup() {
  Wire.begin(0x77);                // join i2c bus with address #8
  Wire.onReceive(receiveEvent); // register event
  Wire.onRequest(requestEvent); // register event
  Serial.begin(9600);           // start serial for output
}

void loop() { }

void receiveEvent(int howMany) {
  Serial.println(howMany);

  if (howMany >= 2) {
    for (int i = 0 ; i < howMany; i++) {
      dataArray[i] =  Wire.read();
      Serial.println(dataArray[i], HEX);
    }

  } else {
    c =  Wire.read();
    Serial.println(c, HEX);
  }
}

void requestEvent() {
  Serial.println("REqEVENT");
}


user54800: I was able to solve the issue with by adding  twi_stop(); to twi.c
base on this website
enter link description here

54800: <p>I want to know why <code>Wire.onRequest</code> can not detect below massage and what I can do to detect it.(I am not able to change I2C massage)</p>

<p>I was able to read this part of the massage with <code>wire.onReceive</code>:</p>

<p><a href="https://i.stack.imgur.com/MCtZ4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MCtZ4.png" alt="enter image description here"></a></p>

<p>But I can not read this massage at all, which is requesting:
<a href="https://i.stack.imgur.com/PJ9v5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PJ9v5.png" alt="enter image description here"></a></p>

<pre><code>#include &lt;Wire.h&gt;
byte val = 170;
int sendv;

char c;

byte dataArray[16];

void setup() {
  Wire.begin(0x77);                // join i2c bus with address #8
  Wire.onReceive(receiveEvent); // register event
  Wire.onRequest(requestEvent); // register event
  Serial.begin(9600);           // start serial for output
}

void loop() { }

void receiveEvent(int howMany) {
  Serial.println(howMany);

  if (howMany &gt;= 2) {
    for (int i = 0 ; i &lt; howMany; i++) {
      dataArray[i] =  Wire.read();
      Serial.println(dataArray[i], HEX);
    }

  } else {
    c =  Wire.read();
    Serial.println(c, HEX);
  }
}

void requestEvent() {
  Serial.println("REqEVENT");
}
</code></pre>
 54800: <p>I was able to solve the issue with by adding  twi_stop(); to twi.c</p>

<p>base on this website
<a href="https://github.com/helenarobotics/Arduino/commit/8aff39a229362e0167e5f48f6c15d02b39b0fbca" rel="nofollow noreferrer">enter link description here</a></p>
