On Mon Jan 15th, 2024 at 18:19, phoebus phoebus wrote:

> Hello,
>
> >> I confess I have not read all messages. I think "expect" might be the
> program
> >> you need.
>
> Thank you for your suggestion and assistance. While 'Expect' is primarily
> designed to automate interactions with text-based programs, its use for
> intercepting and managing escape sequences to enable pass-through mode on a
> terminal screen is complex, particularly in the specific context and
> configuration of our POS system.
>
> Given that the terminal needs to interact very frequently and dynamically
> with the printer based on real-time feedback from the server, I believe
> that 'Expect' may not be the best solution for our situation. It is
> generally more suitable for scripted interactions and predictable scenarios.
>
> I appreciate your input, and if you have any alternative suggestions or
> insights that align more closely with our requirements, I would be grateful
> for your guidance.
>

    You may need to write the program yourself. It's probably not very
  complicated, but you have to be accustomed to writing programs.
  I'd write it in C, forking an ssh (or whatever is needed to connect
  to your server), leaving its standard input untouched, and piping
  its standard output to your program. Your program would send
  the data it receives to its own standard output, except between
  pairs of "magical escape sequences", where it would send the data
  either to the COM port, or to whatever program that may be needed.

       Best,

             Loïc

Reply via email to