TCP binding: How to catch response

I have a remote device (Optoma projector) with a RS232 interface connected over a RS232-Ethernet converter ( USR-IOT RS232-302 ) to my openhab2.
I can send successful commands to the device and I can also receive commands, but how can I set the received data in context to the sent data?

If controlled by the IR remote, hardware buttons or on error, the projector will send data like “INFO1”. If controlled by serial connection, e.g. “~0100 1” to switch it on, it returns a string like “OK1”. The responses for success “OK1” or failure “OK0” belong to the command send before. Other commands return a longer string, e.g. “~01108 1” will return “OK1234” for 1234 hours of usage.

I lack an idea how to implement a setup that allows me to send commands and catch the response and also react on INFO codes that are received without initial action at the openhab server.
Any idea?

Create one more item to store the serial command context as a string
When you receive your tcp packet the bound receiving item will change and in the rule with different conditions depending on the state of your serial context or if the packet contains INFO. Your can process the packet as you wish.

Thank you. I have a working solution now. It uses three item definitions:

String Projector_RS232    "Projector RS232 [%s]" { tcp="<[myIP:23:'REGEX(([INFOK0-9]+))']" } //catch any response from projector
String Projector_RS232out "Projector RS232out [%s]" { tcp=">[myIP:23:default]" } //send data to Projector
String Projector_RS232tmp "Projector tmp [%s]"  // remember last send command

and theses rules:

rule "rProjectorCommunication"
  Item Projector_RS232 changed
  if (Projector_RS232.state.toString.contains ("INFO")) {
    switch E_Wo_Beam_RS232.state.toString {
        case "INFO0": { Projector_Status.postUpdate("Standby") }
        case "INFO1": { Projector_Status.postUpdate("Warming") }
        // ... repeat for all other INFO codes
  if (Projector_RS232.state.toString.contains ("OK")) {
    switch Projector_RS232tmp.state.toString {
      case "~01124 1": { // repeat the case part for all other commands that will be send 
        if (Projector_RS232.state.toString == "OK1") { logInfo("Projector.rules", " Projector is ON ") }
        if (Projector_RS232.state.toString == "OK0") { logInfo("Projector.rules", " Projector is Standby") }
  if (Projector_RS232.state.toString.contains ("~")) {
    logInfo("Projector.rules", "RS232 Command to Projector: "+E_Wo_Beam_RS232.state)

And from anywhere needed, I send the necessary command with e.g.:

Projector_RS232.postUpdate("~01124 1")

This is maybe not the most elegant way to do it. So I am happy for any advice to improve the code.
The other problem with the TCP binding is the spamming of the log (see here