I have connected a device with the raspberry pi on serial port. I can talk to the device from within the raspberry pi (works fine). I am using a dongle to connect raspberry pi to the internet. I can SSH the RPi remotely on port 22.
Now I want to talk to this device (connected on serial port) remotely. This means, I want to be able to open a socket on port 10001 to talk to the device (socket programming). How do I configure raspberry pi so that anything coming on port 10001 goes to the device on serial port. How to map external port 10001 to internal serial port COM5.