Send CAN RTR flag on iMX6

I tested to send RTR flag on CAN bus but I could n’t send RTR flag.
I modified your sample some, and recorded the test screen.

sample : vs_project

I used under code to send RTR Message.
what is wrong?

canBuf.id    = 123;
memcpy(canBuf.data, data, sizeof(data));
canBuf.dataLen = 8;
canBuf.canMsgFlags = CanMsgFlags_RTR;

if (Can_Write(hCan, &canBuf))
{
    printf("\nCAN Transmit: Frame ID = 0x%x Remote/Data Frame = %s\nData:", canBuf.id, (canBuf.canMsgFlags & CanMsgFlags_RTR  ? "REMOTE" :  "DATA"));
    // display Transmit data
    for (i = 0; i < 8; i++)
    {
        printf(" %d", canBuf.data[i]);
    }
}
else
{
    printf("CAN Transmit error\r\n");
}

At the moment CanMsgFlags doesn’t seem to work (we need to investigate it a bit better), but using the “RtrFormat” parameter should work.
calling:
Can_SetConfigString(hCan,L"RtrFormat",L"remote",StoreVolatile);
before CAN_Write
should force packets to be sent as RTR until you configure “RtrFormat” back to “data”.