serial port device; different options, which would be best?

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

    #1

    serial port device; different options, which would be best?

    Hello,

    I'm trying to control a Marantz receiver from Loxone. This receiver is connected with an rs232 port to a pc; at the moment, the pc runs Eventghost and interprets tcp commands which get translated in the software to serial port commands sent to the receiver; it also sends http-commands to the Loxone to tell the status. This approach is difficult to maintain (too much steps) and I don't manage to receive automated status changes from the receiver. So I'm changing my approach. The pc runs a LoxBerry on Hyper-V, and I'm looking at the following options:
    1. serial-port to named pipe ( e.g. https://github.com/albertjan/PipeToCom ), pipe to virtual comport on Hyper-V, Loxberry serial plugin ( https://www.loxwiki.eu/display/LOXBE...ial-USB-Bridge )
    2. serial-port to udp (e.g. https://sourceforge.net/projects/scriptcommunicator/ with https://sourceforge.net/projects/routeserialtcpudp/ )
    3. serial-port to tcp (similar tools as above).
    The receiver on serial ports takes commands such as @PWR:1<LF> to switch on, @PWR:?<LF> to request the state (it replies PWR:0 or PWR:1). Basically, it replies one thing at a time, returning either a number (e.g. the volume), a digit (0-9) or a hexadecimal value (0-F). Sometimes it sends 2 hexadecimal characters, and sometimes bit-coded bytes. But always preceded by the code with a semicolon (so easy to identify) and ended with a linefeed, it does not send strings - come to think of it, the code is readable on a terminal, so the hexadecimal value is actually the ascii character... When you change a setting on the receiver (and it is set to send changes through its serial port), it sends similar codes (these are the ones I cannot process in my current approach, and it would make things so much easier to have those).

    I thought of the approach 1. when I realized I could use the Loxberry serial plugin; it got more complicated when I realized that Hyper-V does not simply take physical com-ports. This led me to option 2. I think it could be the most elegant, with the least amount of connection issues (no handshake or so, no inbetween software). Option 3 may also not be bad, but IIRC, there are more limits to receiving TCP packets on Loxberry than receiving UDP packets.

    Any thoughts on this? Any suggestions for other approaches or better softwaretools?

    Thanks!

    Jörg
    Zuletzt geändert von J V; 04.02.2019, 15:56.
  • Gast

    #2
    another thing to consider is ser2net which lets you map a serial port to a RAW / Telnet / UDP port.. (all depends on config) but might be worth a look.

    Kommentar

    • J V
      LoxBus Spammer
      • 28.08.2015
      • 367

      #3
      Thanks! Always interesting to learn about alternative software, ser2net seems software to do my options 2 and 3.
      I forgot to mention: pc runs Windows 10... :-)

      Kommentar

      • J V
        LoxBus Spammer
        • 28.08.2015
        • 367

        #4
        I'm struggling with getting Scriptcommunicator to redirect the port, so unless I can find a solution for that or an alternative tool, I'll try option 1...

        Kommentar

        Lädt...