serial read and write with bytes

incomingByte = Serial.read();

                // say what you got:
               Serial.print("I sent: ");
               Serial.println(incomingByte, HEX);
               Serial.write(incomingByte);
////////changed to print from write
                Tx.write(incomingByte);

I have this code, it is sending "incomingByte" through a radio modem, it doesnt send as I want it to, but thats ok, it is predictable so I have coded something to decode the gobbldegok recieved.

now what I want to do is instead of take incomingByte from a Serial.read, I would like to hard code it, If I have pressed "1" for the serial read, (incomingByte,HEX) is printed as 31, yet if i simply put Tx.write(31) it doesnt work,

can anyone help me know what to put in Tx.write so that the result on the other end of the modem link is the same as pressing one upon serial read?

If I have pressed "1" for the serial read, (incomingByte,HEX) is printed as 31, yet if i simply put Tx.write(31) it doesnt work,

Because 31 and 0x31 are NOT the same value.

perfect, thank you