Xenon UART - Sensor1.write() not working

Finally got it working. Thanks everyone for your help.

Here is the simple script I am using -

int incomingByte = 0;

void setup()
{
  Serial.begin(9600);
  Serial1.begin(9600);

}

void loop()
{
  Serial1.print("hi");
  incomingByte = Serial1.read();
  Serial.println(incomingByte);
  delay(2000);
}

On my Pi:

ser = serial.Serial("/dev/serial0", 9600, timeout=0.5)
while True:
    x = ser.read(10)
    print(x.decode())

The key issue was using Serial1.write() should have been Serial1.print()