Problem with send hex data from TCP/IP

Hi all there! Can you help me please understand how i can send the hex data pattern to remote device ip ike and port 8234?
i try use that code

Client c1;
byte[] dataIn ={};
int flag =0;
byte[] request = {0xA5, 0xC3, 0x3C, 0x5A, 0xFF, 0x63, 0x0C, 0x01, 0x01, 0xEE};

void setup() {
  size(1000, 900);
  c1 = new Client(this, "", 8234);
void draw() {

void clientEvent(Client someClient) {
  dataIn =;

But processing write me - cannot convert int to byte.
Threre is example, that i need

You can use the Java ByteBuffer class to convert any primitive type to an array of bytes, then send it over the network. You can also use ByteBuffer to convert an array of bytes to any primitive. Another thing to note is that the ByteBuffer has as option for byte order, which allows you to change the endianness of the stored data. Depending on the device that is receiving the data, you may need to change that option to something specific, rather than the default.

byte[] request = byte(new int[] {
  0xA5, 0xC3, 0x3C, 0x5A, 0xFF, 0x63, 0x0C, 0x01, 0x01, 0xEE

Hello @demoss,

See integer literals:

Related discussions:


1 Like

Thank you very much for your help!

Hello @demoss,

What is the name of this application that you used?

From your previous post:


I have very similar tools but have not seen this one.