Hi everyone,

Could anyone help me on how to continuouslly poll the console and once it receives a keystroke, it sends the character to the serial port…


Depends on what you really want to do.
The easiest would be “ln -sfP ser1 /dev/console”, everything in/out of /dev/console will then goes to /dev/ser1.
If you actually need to parse the data, or do something different, it could be another solution.

What do you mean by console? Do you mean the standard PC text mode console or something else?

why would you want to poll, yeirk ;-) Check the doc for ionotify. You should be able to figure out how to receive an event when the keyboard is pressed. Then you would read the data from the keyboard device (stdin) and write it to serial port.