Enable Remote transmission request ESP32

hi,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

#include <CAN.h>

void setup() {
  Serial.begin(9600);
  while (!Serial);

  Serial.println("CAN Sender");

  // start the CAN bus at 500 kbps
  if (!CAN.begin(500E3)) {
    Serial.println("Starting CAN failed!");
    while (1);
  }
}

void loop() {
  // send packet: id is 11 bits, packet can contain up to 8 bytes of data
  Serial.print("Sending packet ... ");

  CAN.beginPacket(0x12);
  CAN.write('h');
  CAN.write('e');
  CAN.write('l');
  CAN.write('l');
  CAN.write('o');
  CAN.endPacket();

  Serial.println("done");

  delay(1000);

  // send extended packet: id is 29 bits, packet can contain up to 8 bytes of data
  Serial.print("Sending extended packet ... ");

  CAN.beginExtendedPacket(0xabcdef);
  CAN.write('w');
  CAN.write('o');
  CAN.write('r');
  CAN.write('l');
  CAN.write('d');
  CAN.endPacket();

  Serial.println("done");

  delay(1000);
}

i used this code for sand the data using can bus, i need to enable the remote transmission request bit in side the massage frame, how can i do it, help me please,

thank you,,,,,,,,,,,,,,,,,,,,,,,,,,,

madhawapolkotuwa:
i used this code for sand the data using can bus, i need to enable the remote transmission request bit in side the massage frame, how can i do it, help me please,

That reads as if you want to set some bit that is part of the CAN system (but I may be wrong as I am not familiar with CAN). If so it is not at all obvious from your Title.

If you need help with CAN then your Title should say so in order that the CAN experts will read your question. If you modify your Original Post you can change the Title. I suggest "Help to set remote transmission request in CAN message"

...R