digital_newbie has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to control an OMAP with Linux, from a Windows laptop running Perl via serial port. I could open serial port (COM1) and send commands, but not able to execute them by sending the enter key. I tried \n but it only moving the cursor to the next line, and not imitating enter key. Code is below. Any suggestions? Please help!!
open( PORT, "+>COM1") or die "Cant open COM1 - $!"; $msg="ls\n"; print PORT $msg;
The output comes as
.#ls |
but doesn't execute..
Thanks
Joseph
https://nurosoft.id/
https://flits.id/
Code tags and various other formatting corrected by Grandfather
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: transferring \n to linux from perl via serial port
by stevieb (Canon) on Nov 28, 2020 at 16:30 UTC | |
by haukex (Archbishop) on Nov 29, 2020 at 12:45 UTC | |
|
Re: transferring \n to linux from perl via serial port
by haukex (Archbishop) on Nov 29, 2020 at 11:36 UTC | |
|
Re: transferring \n to linux from perl via serial port
by LanX (Saint) on Nov 28, 2020 at 20:18 UTC |