Heads Up :
The post you are writing will appear in a public forum. Please ensure all content is appropriate for public consumption. Review the employee guidelines for the community here.
Serial interface is totally different from Ethernet. You may share or convert your serial device to Ethernet network with the software - https://www.eltima.com/serial-ethernet-converter/
Or use the hardware converter like Perl or smth.