TCP2UDP not conneting tcp side

Einklappen
X
 
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge
  • J V
    LoxBus Spammer
    • 28.08.2015
    • 367

    #1

    TCP2UDP not conneting tcp side

    Hello,

    I am trying to use the TCP2UDP plugin to try and get communication from my amplifier. First, the setup:

    Amplifier --serial cable--> PC (Win10, e.g. 192.168.1.10)

    On the PC, I have Hyper-V and a Loxberry in Hyper-V. I use the tool COM by TCP ( https://sourceforge.net/projects/combytcp/ ) to forward the com-port to a tcp port (e.g. port 8000). The amplifier is set to send layer 1 event changes, so if I change e.g. the volume, it sends this change over serial port. From the Hyper-V Loxberry, I can telnet to 192.168.1.10:8000 and see in COM by TCP that a client is connected. In addition, on the Loxberry telnet I see the data that comes in (e.g. when I change the volume, it prints the output - for this amp e.g. @VOL:-40). So the pc and port are reachable from the Loxberry...

    In the TCP2UDP plugin, I set the IP address and port number, I deselect "connect on demand", but it never seems to connect (nothing shows in COM by TCP). Nothing also gets passed to Loxone.
    The log files don't show anything regarding failed connections or so. When I put a hostname instead of an ip address, the log file contain the messages that it cannot resolve the hostname, but there is nothing when I put the ip address.

    Any ideas?
    Nothing urgent, I can understand that it is something to deal with after Loxberry 2 is out.

    (I have tried other options to get the serial port forwared (e.g. using npcom to forward it to a named pipe, and assign that pipe as a comport to hyper-v), but then I'm stuck on how to forward that one, the serial-udp plugin only works for usb devices. Still open to other approaches to do it.)


    Thanks!


    Zuletzt geändert von J V; 24.09.2019, 09:34.
  • Christian Fenzl
    Lebende Foren Legende
    • 31.08.2015
    • 11237

    #2
    Hi,

    could you please set to DEBUG loglevel, and send your settings ang logs.
    I can give it a look.

    Regards, Christian
    Hilfe für die Menschen der Ukraine: https://www.loxforum.com/forum/proje...Cr-die-ukraine

    Kommentar

    • J V
      LoxBus Spammer
      • 28.08.2015
      • 367

      #3
      The logs showed what I assumed wrong: the TCP2UDP plugin acts a server which expects the other side to initiate the connection. Once I changed the other side to be a client rather than a server, the connection worked.

      Still some issues (e.g. the serial commands that are received by TCP2UDP are split; the udp packages do not arrive on the miniserver), but these are rather related to my setup than to the plugin. The split-serial commands is probably due to ComByTcp; the lost packets are probably due to some wrong network setting (Hyper-V networking is not always very intuitive ).

      Is there a way to make TCP2UDP initiate the TCP connection?
      Thanks!

      Kommentar

      • Christian Fenzl
        Lebende Foren Legende
        • 31.08.2015
        • 11237

        #4
        The tcp connection is established automatically.
        Possibly it needs some first send string, that you could set in the plugin (init command and/or keep-alive).
        Hilfe für die Menschen der Ukraine: https://www.loxforum.com/forum/proje...Cr-die-ukraine

        Kommentar

        • J V
          LoxBus Spammer
          • 28.08.2015
          • 367

          #5
          Yes, adding a "connection init command" and a "keep alive command" solves the issue and makes TCP2UDP initiate the connection (and keep it).

          Interestingly, the data from the serial port is much better (one serial command is not split). Also, the UDP packets now arrive on the loxone config udp monitor. So it seems I'm able to do what I need.

          Thanks!

          Kommentar

          • J V
            LoxBus Spammer
            • 28.08.2015
            • 367

            #6
            Just for those interested: there are various tools on Windows to forward serial ports to tcp ports (COMByTCP, TCPCOM32, probably socat, ...). Just now I came across the Lorris Toolbox ( https://tasssadar.github.io/Lorris/ ), which seems to offer most functionalities and seems very good for monitoring ports as well - I can monitor the serial port with it, while it forwards the serial port at the same time.

            Kommentar

            Lädt...