 // serial commands
 #define CMD_TIMEOUT   10E3
 #define MAX_CMD_SIZE  64
+#define SERIAL_RX_PIN 13
 
 // some global vars
 // mode
 bool dump_mode = false;
 // rs rate info
+char rs_parity = 'N';
 uint32_t rs_baudrate = 9600;
 uint16_t rs_eof_us = 3500;
 // stats


  Hardware:
  - Arduino MKR Zero
  - Arduino MKR 485 shield (with 3 dip switch to off) 
      -> RS signal to spy connect to Y and Z
*/

#include <stdarg.h>

      s_arg.toLowerCase();
    }
    // check command
    if (s_cmd.equals("?") or s_cmd.equals("help")) {
      Serial.println("-------------------------------------------------------------------------------");
      Serial.println("dump           turn on dump mode (= display modbus frame as hexadecimal values)");
      Serial.println("end            turn off dump mode");
      Serial.println("stat           view current RS485 modbus stat (nb of frames, CRC errors....)");
      Serial.println("clear          clear current RS485 modbus stat");
      Serial.println("echo on        turn on command echo");
      Serial.println("echo off       turn off command echo");
      Serial.println("echo           display current status");
      Serial.println("auto           view autodetected serial baudrate");
      Serial.println("serial         view current RS485 params");
      Serial.println("rate 9600      set RS485 baudrate to 9600 bauds (auto update EOF)");
      Serial.println("parity even    set RS485 parity to even (other choice are none or odd)");
      Serial.println("eof 3500       set modbus EOF (end of frame) to 3500 us (= 3.5 ms)");
      Serial.println("-------------------------------------------------------------------------------");
    }
    else if (s_cmd.equals("echo")) {
      if (s_arg.equals("on")) {
