• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    Help with TCP/IP Data Source

    User help
    2
    4
    1.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • cmusselmC
      cmusselm
      last edited by cmusselm

      Hello,

      I have a setup where we can use Putty to hit an IP and port (Cell Modem) and can see the stream of data returning to us. We can see this data using the Telnet or Raw connection type in Putty.

      0_1594155862006_e228f896-d6c1-4c83-8089-c4559a3b0f8b-image.png

      Here's what the data output looks like:
      0_1594155831805_14991fe7-85d6-49a3-880a-ee9962a4f6aa-image.png

      We're pretty sure the lines end in \r\n

      We have a TCP/IP data source created, but are unsure what parameters should be set to read the data. Any help or pointers is appreciated. We've been looking through the MA.log as well as turned on I/O logging for the data source but after looking into them, can't see anything obvious to us that we need to change.

      We're running Mango 3.7.7.

      Thanks,
      Chad

      1 Reply Last reply Reply Quote 0
      • cmusselmC
        cmusselm
        last edited by

        We did get this to work. If anyone is interested, here's how we were able to do it. I'm sure there are other, and possibly better ways, but after our struggles, we're just glad to be recording data.

        The data source streams the data in the following format to us:
        0_1594316584028_df89b90f-4246-4ce6-9d9b-41f3dbd98df4-image.png

        Here's a quick view of values we set in our data source:
        0_1594316665082_c4f92b9a-f55d-4306-a8d5-490c51eed39c-image.png

        We have an update period of 5 seconds, and our initial timeout wast 5 seconds, then we set it to 10. After that we were getting a lot of aborted poll errors. Setting the timeout to 500ms resolved that for us.

        Here's a quick look at the data point values we set:
        0_1594316757909_1dafa343-57b2-4788-bf0c-07b791fcce54-image.png

        Understanding that the Regex needs to return capturing groups was a key for us to get this working as well, and the fact that the Value Index is really the group number.

        With our Regex, we hard-code for the $SDDBT start of our data since that's fixed, then look at the value between the commas. We only need the 2nd item in the data stream, which is Value Index 2.

        We also got stuck on the read command a bit. Just putting READ in there worked, but not sure if there's a more "correct" way to do it.

        Hopefully this helps anyone ready to pull their hair out like we were for 3 or 4 days straight.

        1 Reply Last reply Reply Quote 0
        • MattFoxM
          MattFox
          last edited by

          Usually it's regex that's the issue. I use regexr.com to test my matching query. Alternatively, did you ever consider trying a serial data source with a virtual socket? Mango can connect as either a server or a client and generally works quite well.

          Fox

          Do not follow where the path may lead; go instead where there is no path.
          And leave a trail - Muriel Strode

          1 Reply Last reply Reply Quote 0
          • cmusselmC
            cmusselm
            last edited by

            Hi, Fox,

            We didn't think to try the serial data source with a virtual socket. I may experiment with that to see what we can get going.

            Thanks for the tip.

            Chad

            1 Reply Last reply Reply Quote 0
            • First post
              Last post