// Command - write and read hex
if (cmd[1].equals("hex") || cmd[1].equals("h")) {
RpSerialPort port = getPortForConsoleCommand(cmd);
byte[] bout = RpHyperstring.hexStringToBytes(cmd, 3);
svcConsole.write(JRoboStrings.SVCSERIAL_WRITE_TO + port.getName()+": "+ RpHyperstring.bytesToHexString(bout) +"\n" );
port.writeBytes(bout);
byte[] bin = new byte[2048];
int n = port.readBytes(bin);
byte[] bb = Arrays.copyOfRange(bin, 0, Math.abs(n));
svcConsole.write(JRoboStrings.SVCSERIAL_READ_FROM + port.getName()+": "+ RpHyperstring.bytesToHexString(bb) +"\n" );
} else