Arduino Mega- funny serial communication

Hello! I'm using Arduino to control an oven for Ultra High vacuum purposes. One of the things that I need is to do is to ask a pressure gauge controller for the pressure through a serial port, then send it with other data to a computer.

I simulated this serial communication with a script in python on a pc. The idea is that arduino sends a command (for instance "111") to the serial port, the python script reads the command and replies with a number if the command received corresponds to "111" otherwise replies with the string "null".

The problem is that this doesn't happen. The script reads something weird ("ggg" instead of "111") and then sends "null" but then the arduino sends this data to the usb serial port and the serial monitor shows something like "???". Can someone explain me why?

The serial ports need to be set up for the same parity and stop bits and baudrate - have you
checked these?

Now I checked bytesize parity and stopbits. What I get is that the Serial port from the arduino reads itself…
That is to say that the arduino sends now “ABC” on the serial port 2 and reads “ABC” instead of “212” in case of correct communication or “NNN” in case of wrong communication.
The code that I use is (arduino):


While for the python script I have:

import serial
ser = serial.Serial("/dev/ttyACM1", 9600, timeout = 2,bytesize =8, parity ="N",stopbits=1)

while True:
    cmd =;
    print cmd
    con = True
    if cmd !="":
        print(cmd+" ")
    if cmd == "ABC":

The ports that I can dispose of are:

$ ls /dev/tty*
/dev/tty    /dev/tty19  /dev/tty3   /dev/tty40  /dev/tty51  /dev/tty62
/dev/tty0   /dev/tty2   /dev/tty30  /dev/tty41  /dev/tty52  /dev/tty63
/dev/tty1   /dev/tty20  /dev/tty31  /dev/tty42  /dev/tty53  /dev/tty7
/dev/tty10  /dev/tty21  /dev/tty32  /dev/tty43  /dev/tty54  /dev/tty8
/dev/tty11  /dev/tty22  /dev/tty33  /dev/tty44  /dev/tty55  /dev/tty9
/dev/tty12  /dev/tty23  /dev/tty34  /dev/tty45  /dev/tty56  /dev/ttyACM0
/dev/tty13  /dev/tty24  /dev/tty35  /dev/tty46  /dev/tty57  /dev/ttyACM1
/dev/tty14  /dev/tty25  /dev/tty36  /dev/tty47  /dev/tty58  /dev/ttyS0
/dev/tty15  /dev/tty26  /dev/tty37  /dev/tty48  /dev/tty59  /dev/ttyS1
/dev/tty16  /dev/tty27  /dev/tty38  /dev/tty49  /dev/tty6   /dev/ttyS2
/dev/tty17  /dev/tty28  /dev/tty39  /dev/tty5   /dev/tty60  /dev/ttyS3
/dev/tty18  /dev/tty29  /dev/tty4   /dev/tty50  /dev/tty61

I realized that the usb was not plugged in correctly.
Indeed now it appears a "/dev/ttyUSB0". Anyway, changed the port on the python script and everything, but still they do not understand each other. I checked all the parameters to coincide.