Not long ago we introduced the proxy channel and told how to use it for migration between systems and debugging. This time we will focus on the reverse direction — accepting and applying commands sent from the platforms to the target tracker.
HW manufacturers: setting up your customer’s trackers to work over the proxy channel you can always easily check any issues reported by the customer (be it failing commands, missing commands, etc.) by reproducing the scenario at your target (see below).
Telematics Service Providers (TSPs): enable your customers to receive data from their trackers in several platforms (e.g. a fleet management platform and an ERP); on top of that, let the trackers receive commands from the desired platforms (plus have a chance to debug issues by adding the same platform as another target and checking the behavior).
Enthusiasts: get extended capabilities for juggling the telemetry data for your custom projects — split the flow, send commands from multiple spots, store the incoming data in the channel buffer, debug any abnormalities.
Configuring the proxy channel
We’ve chosen Wialon Hosting platform and the flespi Queclink channel as the targets to split traffic across. You can pick up to three destinations of your choice as proxy targets.
Plugging the proxy channel between the tracker and the destination platforms is straightforward:
Create a channel and pick the proxy type
Enter the targets’ configurations — we will be sending data to Wialon (target 1) and to the flespi Queclink channel (target 2)
Pick which target is mandatory — if the mandatory target is unresponsive, the proxy channel will throw an error and will drop the input connection.
And the key thing — turn on the Proxy replies back option for the targets from which you want your device to accept commands. We’ve turned it on for both targets below.
Pointing the device to the proxy channel
Now we have to specify the IP and port of the proxy channel in the tracker’s server settings. You can do it in the manufacturer’s device configuration tool or using flespi device configurator:
Now we can check the logs of the proxy channel in Toolbox to make sure the messages are coming as expected:
We can also check if the targets are receiving the data:
Yep, they do get the data. Now let’s see if the flow works in the opposite direction.
Sending commands to the tracker
Wialon does not currently offer a convenient way to configure device settings, so we will simply send a message to the driver and see if arrives at the device:
Here’s the corresponding record in the proxy channel log:
Let’s make sure this is the command we sent by converting it from HEX to text:
Let’s change the message send interval for the tracker — we’ll set it to 20 seconds:
Here’s our command in the proxy channel log:
And here’s the converted result (note the number 20 in the message — it’s telling the tracker to change its send interval to this value):
We can see that the device has successfully accepted the setting and started sending messages every 20 seconds:
Remark: remember that you can always change replies from which targets to receive (using the Proxy replies back switch).
Proxy channel is destined for data flow splitting and debugging. The cool thing is that you can check not only how messages get to their destination(s) but also what happens when a platform sends commands to the device.
Contemplate on the ways to use the proxy channel for your projects and give it a try at flespi.io.