[SOLVED] ISCP -interface with amplifier

Hello, I’m trying to steering from Blynk amplifier onky over ethernet.
It is usind ISCP protocol. I need to send simple command to it over TCP on port 60128.
Command for power on is:
ISCP\x00\x00\x00\x10\x00\x00\x00\x08\x01\x00\x00\x00!1PWR01\x0D
I’m converting this command to hex:
byte command[] = {0x49, 0x53, 0x43, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x08, 0x01, 0x00, 0x00, 0x00, 0x21, 0x31, 0x50, 0x57, 0x52, 0x30, 0x31, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};

and doing simple
client.write(command, sizeof(command));

It is working, but i think this is “dirty” solution. Is there any way to send this command without converting?

Thnaks for info

@elgato: Just take this:

ISCP\x00\x00\x00\x10\x00\x00\x00\x08\x01\x00\x00\x00!1PWR01\x0D

… and turn it into this:

  char cmd[] = "ISCP\x00\x00\x00\x10\x00\x00\x00\x08\x01\x00\x00\x00!1PWR01\x0D";

… and send it out:

  for(int i = 0; i < (sizeof(cmd) - 1); i++)
  {
    Serial.write(cmd[i]);
    //client.write(cmd[i]);
  }

or:

 Serial.write(cmd,(sizeof(cmd)-1));

I’ve verified with a serial port sniffer and it works fine. Not Blynk related … But anyhow enjoy testing :wink:

THANKS! :smile:
Works like a charm