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

TCP DataSource Configuration


  • Hi guys, i have an issue trying to comunicate with a tcp gateway. This gateway is configured to periodically (every 10s) information about they sensors conected (Traffic sensors). The thing is, this gateway just send data without any request... just send data every 10s. So i am wondering to transform the data sent from the gateway into Mango Datapoints inside a tcp Datasource to handle it. I am trying to set the configuration on the tcp datasource (regex, and this stuff) to get the raw data sent from the gateway in a datapoint (inside the tcp datasource). Then with a scripting datasource and some virtual datapoints, i will decript the protocol and set the right values in the virtual datapoints.

    This is a screenshot of the raw hex data sent from the gateway.

    0_1550766084012_snipTCP.jpeg

    and this is the information about the protocol:

    0_1550766191207_protocol1.jpg

    0_1550766199999_protocol2.jpg

    I just want you guys help me with the tcp datasource and datapoint configuration to catch the raw data into a datapoint and then i can handle the rest with a scripting DS and some virtual datapoints.

    Thanks and rewards.


  • Hi Johnny Martinez, welcome to the forum!

    Generally, actual protocol implementation is beyond the scope of the free support of the forum. However, an approach is not:

    I would use a virtual serial server socket, which you could define on the /system_settings.shtm page, and then point your gateway at that IP/port. Now create a serial data source with settings to catch the whole message that uses the new virtual serial port, and do it as hex if that's easier for the parsing step, which you could perhaps do via the serial data source's regex or you could write a scripting data source to digest in the coming messages.

    Thread with catch all configuration for a serial data source: https://forum.infiniteautomation.com/topic/2274/serial-data-source-trouble-to-show-value-from-com-port

    Thread where I did help someone implement part of the custom protocol: https://forum.infiniteautomation.com/topic/2517/chinese-brand-psu_monitoring-rs485-and-mango


  • Phil! thanks for show me the light at the tunnel end hehe, with the virtual serial server i was able to get the data from the gateway, i think the magic is in the regex both in the datasource and datapoint. Now i can listen the raw data and digest it through an Scripting DS.

    Regards!.