fasteddy516 / SimplySerial

A windows console application for serial communications.
MIT License
208 stars 24 forks source link

Arrow and function keys not being sent to connected device #19

Closed svcguy closed 1 year ago

svcguy commented 2 years ago

Hello,

Thanks for a wonderful app. My use case is to run this from Windows Terminal to connect to a proprietary hardware device over RS232 using a USB to Serial adapter. Everything works great except sending arrow keys for the (somewhat) menu based navigation on the device. I think I need to just send arrow keys, but I'm not 100% sure. Unfortunately, I can't provide a lot of detail regarding the device itself, but can test.

Running SimplySerial 0.7.0 on WIN10

gartzia commented 2 years ago

I have a similar problem. I connect to a target that runs a linux distribution, when I execute the htop command, I cannot scroll through its menu due to the same problem indicated by @svcguy . Thanks in advance and for all the development, good job.

fasteddy516 commented 2 years ago

I will have to look into this. Support for ANSI escape sequences (cursor keys, etc.) was added in version 0.6.0, but the Linux serial terminal may be expecting something different. Do the cursor up/down keys work to navigate your command history at a shell prompt?

fasteddy516 commented 2 years ago

I did some testing using a serial console connection to a Raspberry Pi as well as an old HP ProCurve switch (which has a menu-based serial console) using SimplySerial V0.7.0 on Windows 10 as well as Windows 11.

@svcguy, the arrow keys worked fine for menu navigation on the HP Procurve switch, as well as for navigation (i.e. in raspi-config) and bash command history on the Raspberry Pi. If you are able to provide any information at all about the device and/or application you are having trouble with, that would be helpful as I am unable to reproduce the problem with what I have on hand.

@gartzia, I tried executing the htop command on the Raspberry Pi through serial connection, and the cursor keys do function normally for scrolling through the process list, but the function keys (F1 - F10) for triggering menu options do not function. I can look at adding support for sending function keys, but was hoping you could confirm if this is the issue you were reporting, or if you were also having issues with the arrow keys specifically.

svcguy commented 2 years ago

Edward,

Unfortunately I really can’t. It’s a proprietary PLC-like controller that I don’t know the architecture of myself. I know that doesn’t help much so don’t sweat it.

On Mon, Aug 22, 2022 at 08:37 Edward Wright @.***> wrote:

I did some testing using a serial console connection to a Raspberry Pi as well as an old HP ProCurve switch (which has a menu-based serial console) using SimplySerial V0.7.0 on Windows 10 as well as Windows 11.

@svcguy https://github.com/svcguy, the arrow keys worked fine for menu navigation on the HP Procurve switch, as well as for navigation (i.e. in raspi-config) and bash command history on the Raspberry Pi. If you are able to provide any information at all about the device and/or application you are having trouble with, that would be helpful as I am unable to reproduce the problem with what I have on hand.

@gartzia https://github.com/gartzia, I tried executing the htop command on the Raspberry Pi through serial connection, and the cursor keys do function normally for scrolling through the process list, but the function keys (F1 - F10) for triggering menu options do not function. I can look at adding support for sending function keys, but was hoping you could confirm if this is the issue you were reporting, or if you were also having issues with the arrow keys specifically.

— Reply to this email directly, view it on GitHub https://github.com/fasteddy516/SimplySerial/issues/19#issuecomment-1222374452, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIOVJI2P4LQKOMFMFFMSYTV2N66BANCNFSM5XVUK3JA . You are receiving this because you were mentioned.Message ID: @.***>

-- Andy Josephson