In the arduino firmware: Make sure to enable "Both NL & CR" when you make the call to M503.
Sometimes the computer will not recognize the serial port if proterface is opened before connecting the printer to the usb port.