[SOLVED] UART never receive what I sent

Hello ,

I'm a user of arduino (uno and mega 1280)
I would like to use serial connection to use Enocean TCM310 , a HF receiver.

so need to send some frame with the serial conection, but when I do simple code to test the serial connection like that :

void setup()   { 
Serial.begin(115200); 
} 
void loop(){ 
delay(1000);

 Serial.print("texte");
 
}

I receive (with realterm serial console)

BE  EE  FC  BF  EE  FD  BF  EE  FC  BF  EE  FD

for Hex

any idea ??
Thx

You don't give us details about the connection you have to the Arduino or what settings you have in your RealTerm.

Have you chosen the correct baudrate (in Arduino code you have 115200, so you should in RealTerm)? Rest of serial configuration on the PC should be 8N1 (8 data bits, 1 stop bit, no parity).

Sorry,

Yes Realterm is on 8N1 mode, 115200b.

I actually want to send frame exactly like
const uint8_t VERSION[] = {'0x55','0x00','0x01','0x00','0x05','0x12','0x03'} ;

I connect the arduino just with the USB, and I will use SoftwareSerial library to send my different frames on the arduino UNO

EDIT :
when i try :

const uint8_t VERSION[] = {'0x55','0x00','0x01','0x00','0x05','0x12','0x03'} ;

for(i=0;i<6;i++){
  
  Serial.print(VERSION[i],HEX);
}

I receive :

33 35 33 30 33 31 33 30 33 35 33 32

Try using this:

const uint8_t VERSION[] = {0x55,0x00,0x01,0x00,0x05,0x12,0x03} ;

for(i=0;i<6;i++){
  
  Serial.write(VERSION[i]);
}

Your code contained several errors (hex literals as characters with single quotes, printing in HEX and the like).

OH thank you !
Works perfectly !!