Mango as GPS packet repeater
-
Hy,
in my project I have the following:
*) 1 modem with a gps interface that produce GPS packet and can send it over TCP (any port) to just one IP address
*) an Ubuntu server running mango 2.8.8
+) several STM32Nucleo each one with a different IP address and each one requires the same GPS packet produced by the modemSo here it is my question,
is it possible to use mango to receive such GPS packet and forward it to all the STM32Nucleo IP addresses?No data elaboration, just retransmit the packet to a list of IP address.
I don't know if it possible to achieve the same result using some network feature (redirect or something else), but broadcast from the modem is not allowed in this network.
Thanks,
Antonio -
Hi Antonio,
The current version of Mango certainly can do this. I think the mechanisms were present in 2.8.8, but there may be some lurking bugs.
But, you could point the GPS modem at a virtual serial server socket created on the system settings page.
A serial data source could read in the value from the packet received on that socket and store the value in a point.
That point can be linked via several point links to TCP/IP data points each on their own data sources pointed at the other devices which require the packet.
There probably is a way to do this more efficiently with network hardware.
-
Thanks,
virtual serial server socket is completely new to me,
there's always something new to learn about Mango!! :-)The modem offer also a reporting agent that I can configure in this way:
so it can send it's data using TCP and HTTP.
Here I still have problem to understand,I can't use a TCP datasource because it is based on a request from Mango,
the only way to accept such data sent by the modem is using virtual serial server socket.Modem data are in this format:
@IMEI=352948070039411,Lan Status=Connected,Lan IP(IPv4)=192.168.1.1,Lan Uptime(Seconds)=329501,Lan TX bytes=572260469,Lan RX bytes=117212098,Wan Status=Connected,Wan IP(IPv4)=192.16 9.1.110,Wan Uptime(Seconds)=329389,Wan Gateway=192.169.1.1,Wan DNS=27.109.1.2 27.109.1.3,Wan TX bytes=75455301,Wan RX bytes=344481735,
Instead if I choose HTTP messages sent from the modem
I can see the data in the "HTTP receiver listener" but the following datapoint for IMEI
{ "dataPoints":[ { "xid":"DP_672952", "name":"IMEI", "enabled":true, "loggingType":"INTERVAL", "intervalLoggingPeriodType":"MINUTES", "intervalLoggingType":"INSTANT", "purgeType":"YEARS", "pointLocator":{ "dataType":"ALPHANUMERIC", "binary0Value":"", "parameterName":"IMEI", "setPointName":"", "settable":false }, "eventDetectors":[ ], "plotType":"STEP", "unit":"", "chartColour":"black", "chartRenderer":null, "dataSourceXid":"MaestroHTTPReceiver", "defaultCacheSize":1, "deviceName":"MaestroHTTPReceiver", "discardExtremeValues":false, "discardHighLimit":1.7976931348623157E308, "discardLowLimit":-1.7976931348623157E308, "intervalLoggingPeriod":1, "intervalLoggingSampleWindowSize":0, "overrideIntervalLoggingSamples":false, "purgeOverride":false, "purgePeriod":1, "readPermission":"", "setPermission":"", "textRenderer":{ "type":"PLAIN", "useUnitAsSuffix":true, "unit":"", "renderedUnit":"", "suffix":"" }, "tolerance":0.0 } ] }
returns much more information
how can I take in account the separating comma?
Maybe the problem is the url setted in the modem :http://xxx.yyy.zz.ww:8xyz/httpds
Thanks,
Antonio -
You certainly would want to point the device at /httpds to use the HTTP receiver, as you have seen.
I would advise using that HTTP receiver point to update the context in a scripting data source, where I would split the value on the command and then process the different fields. The HTTP Receiver does not supply a means to parse within a parameter's value, and that whole value is the IMEI parameter in the HTTP message.