I am working on a project where I am trying to get an Arduino to act as a motor controller interface that is remotely commanded via my Linux machine over ethernet. Commands are successfully being sent back and forth when the USB is plugged into the Arduino and the ethernet is plugged in to the Ethernet Shield. Once I unplug the USB and replace it with an external power supply(5V) I am no longer able to make a connection over the TCP/IP. I took a step a back and decided to just run the WebServer and ChatServer examples. Once again I am able to send commands from my computer to the Arduino when the USB is plugged, but can not when the USB is replaced with an external power supply.
On my Linux machine I want to link the TCP/IP from the Arduino to a serial port on the Linux machine. I am using the below 'socat' command to make the link and 'screen' to send the commands. They work properly with the USB plugged in, but do not work with USB replaced with the external power supply. I tried using 'telnet' in the chance that I didn't set the 'socat' command up correctly, but more or less got the same result and telnet couldn't make connection with the TCP/IP.
socat pty,link=/dev/ottyXX,raw,waitslave tcp:YYY.YYY.YYY.YYY:YYYY& screen /dev/ottyXX 9600 telnet YYY.YYY.YYY.YYY YYYY
I have been scouring the forums and there seem to be a few threads on the topic, but the threads are either outdated i.e. press the Reset button when unplugging the USB for older boards, or the threads didn't come to a solution.
Any insight into the issue or what I am doing wrong would be very helpful.
Board: ARDUINO MEGA 2560 REV3
Ethernet Shield: SunFounder Ethernet Shield W5100 (LINK)
Linux OS: Ubuntu 18.04