Announcement

Collapse
No announcement yet.

UART (serial ?) splitter ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    UART (serial ?) splitter ?

    Good day folks. I got a project on hand and would like some thoughts on whether it's possible to achieve, albeit impractical. You know me - I like to over-complicate stuff

    The setup: I got a Paradox EVO192 alarm panel, a serial-to-ethernet adapter and an official PCS250 GSM communicator.

    The task (TL/DR): connecting both the ethernet adapter AND the communicator to the single serial port of the Paradox panel. Connecting their TX/RX lines in parallel the data would get all messed up. At the very most, I THINK I could parallel the RX pins of the ethernet adapter and the communicator with the TX pin on the panel, but since the panel needs to be controlled by both of them at some point (i.e. for arming/disarming/changing settings), doing this to the TX pins would likely not work.

    I'm trying to work out a way to achieve this, by using some sort of bright idea that would, in layman terms, buffer (?) the commands from both "incoming" devices and spit them out to the panel in the order of the device that transmitted first (ethernet/PCS250)....if such a thing even exists or is even achievable (multiplexer ?)...surely someone thought of splitting UART before....maybe ?


    Extra info: the panel has a 4 pin serial connector, consisting of a 12v output, a GND and the TX/RX lines, so no RS2320-compliant stuff like DTR/CTS.

    As of now, this is all a bit hypothetical and I'm jumping the gun slightly, as I have not been able to connect via ethernet to the panel with the official Paradox suite. I AM able to connect via a regular DB9 port, so I KNOW the panel works, but when I point the software to an IP instead of a serial port, it gets stuck. Granted, my serial to ethernet adapter is a 0trash-picked Tibbo DS203 I scrounged up ages ago. Ironically, the software for it still works and I was able to get it to recognize the Tibbo. The paradox software manages to open the socket (also confirmed by the Tibbo monitor which I run on a separate machine), but it doesn't go any further - I get blips of TX from the interface TO the panel every now and then, but the panel doesn't TX back (or it does, but the software isn't receiving it right). I THINK this may be down to incorrect configuration of the Tibbo thingy, as I have seen this setup being advertised as "possible" with a different adapter. One idea, which I haven't yet tried is that the Tibbo is expecting a signal on one of its RS232-specific pins (CTS ?) to actually push the received data back OVER the network...although I have disabled flow control in Tibbo, if this is even correct.

    Cheers and thanks for any ideas.
    Wattevah...

    #2
    Re: UART (serial ?) splitter ?

    there will be no general solution for this without knowing the underlying protocol. If there is a command to periodically send status, it would confuse whatever multiplexer you have.

    Normally you have to do it just like any other shared resource, have to write another program that emulates the resource to both and this program is the sole interface to the device - a 3 port device...

    Can't this multiplexing be done at the ethernet level perhaps... then all you'd need is write software for a pc or pi, else you'd need to write microcontroller software?

    BTW: one example of this exact situation is NMEA GPS serial and have two programs access the same GPS. Same problem here, a multiplexer software needs to be written...
    Last edited by eccerr0r; 08-18-2023, 03:42 PM.

    Comment


      #3
      Re: UART (serial ?) splitter ?

      Is there a special reason you're trying to roll your own instead of getting the correct Paradox module ?
      Is this a project for money or fun ?

      Comment


        #4
        Re: UART (serial ?) splitter ?

        Originally posted by eccerr0r View Post
        there will be no general solution for this without knowing the underlying protocol. If there is a command to periodically send status, it would confuse whatever multiplexer you have.
        Without the proper equipment, like a scope or logic analyzer, I don't know for sure how it works. All I have to work with is the TX/RX status indicators in the software, which is how I determined it sends but doesn't receive. I think the panel periodically refreshes the status, so the software displays when a zone is open or there's an alarm. The same thing happens with the PCS module - the panel periodically pings it (or vice-versa), otherwise it throws a trouble code if it doesn't reply back.

        Originally posted by diif View Post
        Is there a special reason you're trying to roll your own instead of getting the correct Paradox module ?
        Is this a project for money or fun ?
        It's mostly for fun and because I found the Tibbo ethernet module and thought I'd outsmart the manufacturer by not buying its (rather expensive) product They also removed some functionality from it and make it tough to configure, so there's that too...

        Someone else had this idea in mind on another forum, where they were trying to achieve the same thing: connect an unofficial GSM dialer and an ESP8266 to the panel for some home automation project. Sadly they never followed up on how and IF they managed to pull it off. The guys were talking about using a second ES8266 as the multiplexer between the panel and the other 2 devices, which some programming buffs there agreed would be easy to achieve, but I never actually came to a conclusion or some exact resource. You know I'm sh!t with programming, so I'll have to keep searching.
        Wattevah...

        Comment


          #5
          Re: UART (serial ?) splitter ?

          I came across these things, which, granted, are already pushing the price limit of the official Paradox product

          Still, unless I maybe get two of these boxes, I'm not sure it solves the problem of allowing bidirectional data from TWO devices (an arbitrary PC on the network via the configuration software and the PCS250, which I'm not entirely sure would function correctly over such interface to begin with, as I haven't tried. Not exactly cheap to "experiment" with...
          Wattevah...

          Comment


            #6
            Re: UART (serial ?) splitter ?

            Today was a slow day at work, so I messed around some more with the alarm panel. Couple of things I learned and discovered:

            The panel requires a straight cable from its serial pins to whatever adapter you're using (TX to TX and RX to RX). No additional pins pins are required, besides of course GND, so that rules out the possibility of this being related to the flow control pins of the Tibbo DS203. I was able to connect using the good old CH341 this way.

            I still could not get the software to connect to the panel directly over the IP option using the Tibbo adapter, though. It establishes the connection ("socket") but doesn't go any further. I used WireShark to try and have a look at what it's doing and although I do not have the necessary knowledge to use WireShark properly, I saw that as it hangs, it sends packets every 5 seconds or so until it gives up or I stop it, but the "length" is always zero - it's like the Tibbo is not replying back or the software doesn't "shake hands" with it. The only way I was able to get it to work somewhat close to how I want it was by creating a virtual COM port and pointing the software to this instead - not exactly ideal, as I now depend on an additional piece of software on the machine, instead of doing it directly.

            I also tried UDP but it's even worse: the connection doesn't even happen, implying the software connects exclusively via TCP. UDP does work if I use the virtual COM port. For the heck of it, I tried connecting two clients at once via virtual COM ports. This sort-of worked, but only in UDP mode, as the manual of the DS203 informs you multiple TCP clients are NOT supported. When I say "sort-of", I mean both clients managed to connect to the panel at some point, but it only worked half the time and even then it was far from ideal: alarm events were not updated properly, arming/disarming only worked from either workstation at random and making any programming changes almost never worked, until I disconnected one of the stations. True, this was not my initial plan and was already pushing the limits of what this is designed to do.
            Wattevah...

            Comment


              #7
              Re: UART (serial ?) splitter ?

              TX would normally connect to RX and vice versa.

              Comment


                #8
                Re: UART (serial ?) splitter ?

                Originally posted by diif View Post
                TX would normally connect to RX and vice versa.
                That's what I was expecting too, but the fact remains that when I connect the TX pin of my CH341 to what the internet "agrees" to be RX on the panel, it doesn't work (and vice versa). It could be the drawing of the pinout I found for the panel is incorrect, although there are many others floating around that all seem to agree. It's probably not a difference between different models of panels either, because the official Paradox USB-serial interface, which I also own, works fine on both the REALLY old models and the newest ones. In other words, I doubt they swapped the pins around over time and I doubt the interface is smart enough to actively switch the pins around. I think it's just like a straight serial cable, which still confuses me slightly as to how it works, even outside this Paradox panel - it used to be a thing with modems too if I'm not mistaken. In this context, we can assume the PC is the "DTE" and the Paradox is the "DCE"...
                Last edited by Dannyx; 08-23-2023, 12:02 AM.
                Wattevah...

                Comment


                  #9
                  Re: UART (serial ?) splitter ?

                  Here's the discussion I mentioned in my original post. The guy wanted to do almost the same thing but we unfortunately do not know the outcome..
                  Wattevah...

                  Comment


                    #10
                    Re: UART (serial ?) splitter ?

                    Something I tried out today: I built a simple resistor divider out of a 1k and 2.2k resistor and stuck this on both the TX/RX lines of the CH341 and the alarm panel. On the CH341, I got the expected result: the RX line read 0v and the TX line read 3.3v, which is what I learned at some point - at idle, the TX line should be high and the RX line should be low. On the panel however, both lines read 0v...no idea why that is. I thought I'd be able to differentiate once and for all between the TX/RX lines this way, with no fancy equipment. It only worked half way though...no idea why. When floating, the lines on the panel both read 5v.
                    Wattevah...

                    Comment

                    Working...