AMM provides functionality to display the GPS Vehicle ID on the AMM dashboard, enabling easy identification and tracking of vehicles.
In order to display the GPS Vehicle ID on the AMM dashboard, there are three steps that need to be taken:
Set the GPS Vehicle ID on the MGOS device : this can be done directly on the MGOS device, using AMM templates, or by uploading a CSV file.
Create/modify post-sysinit script on the MGOS device : on boot up of the MGOS device, the script will read the GPS Vehicle ID from the configuration and send it as an event to the AMM
Configure dashboard of the AMM to display GPS Vehicle ID
The GPS Vehicle ID can be customized and configured when utilizing TAIP (Trimble ASCII Interface Protocol) messaging. Refer to the MG90 Software Configuration Guide for more details on how to configure the GPS Vehicle ID on the MGOS device.
Use the following procedure to configure the GPS Vehicle ID using an AMM Template.
In the right hand panel, select the template.
Select Deploy
If you are configuring the GPS Vehicle ID on more than one gateway, select and it will download a template of the file that allows you to configure multiple GPS Vehicle IDs. The format of the CSV template file looks like this: Once you have configured the CSV template file with the GPS Vehicle IDs, select to upload the file.
Scroll down, and verify that the Affected Gateway(s) column identifies the correct number and name of the MGOS device that the template is being applied to
Select Submit
Go to the Admin > System > Operations to see the status of the template deployment or select the shortcut displayed to verify that the operation was succesful.
To show the GPS Vehicle ID on the AMM dashboard, a script with the necessary commands must be installed on the MGOS devices. To confirm if a script already exists, use the following procedure.
If there is no post-sysinit script
#!/bin/bash
VEHICKLE=$(awk '/vehicleId:/ { print $2 }' /opt/inmotiontechnology/config/gps.yaml)
if [ "$VEHICKLE" == "~" ]; then
/usr/bin/logger -t VehicleIdCheck "the vehicle id is tilde"
exit 1
elif [ "$VEHICKLE" == "" ]; then
/usr/bin/logger -t VehicleIdCheck "the vehicle id is blank"
exit 2
else
/usr/bin/logger -t VehicleIdCheck "the vehicle id is "$VEHICKLE""
delsinject 1 0 0 0 "=<$VEHICKLE>"
exit 0
fi
Alternatively, you can also create the post-sysinit file on your local computer using a text editor, such as vim and upload the file to the MGOS device.
If you want to create the post-sysinit file on a Windows PC by utilizing a text editor like Notepad++, then make sure that you enable the EOL Conversion to Unix (LF) format instead of the default Windows (CR LF) format. Without this conversion, the “CR LF” end-of-line characters may lead to unexpected behavior on the AMM side.
#!/bin/bash
VEHICKLE=$(awk '/vehicleId:/ { print $2 }' /opt/inmotiontechnology/config/gps.yaml)
if [ "$VEHICKLE" == "~" ]; then
/usr/bin/logger -t VehicleIdCheck "the vehicle id is tilde"
exit 1
elif [ "$VEHICKLE" == "" ]; then
/usr/bin/logger -t VehicleIdCheck "the vehicle id is blank"
exit 2
else
/usr/bin/logger -t VehicleIdCheck "the vehicle id is "$VEHICKLE""
delsinject 1 0 0 0 "=<$VEHICKLE>"
exit 0
fi
If a post-sysinit script already exists
VEHICKLE=$(awk '/vehicleId:/ { print $2 }' /opt/inmotiontechnology/config/gps.yaml)
if [ "$VEHICKLE" == "~" ]; then
/usr/bin/logger -t VehicleIdCheck "the vehicle id is tilde"
elif [ "$VEHICKLE" == "" ]; then
/usr/bin/logger -t VehicleIdCheck "the vehicle id is blank"
else
/usr/bin/logger -t VehicleIdCheck "the vehicle id is "$VEHICKLE""
delsinject 1 0 0 0 "=<$VEHICKLE>"
fi
Alternatively, you can also add the code snippet to the existing post-sysinit script using the AMM.
VEHICKLE=$(awk ‘/vehicleId:/ { print $2 }’ /opt/inmotiontechnology/config/gps.yaml)
if [ “$VEHICKLE” == “~” ]; then
/usr/bin/logger -t VehicleIdCheck “the vehicle id is tilde”
elif [ “$VEHICKLE” == “” ]; then
/usr/bin/logger -t VehicleIdCheck “the vehicle id is blank”
else
/usr/bin/logger -t VehicleIdCheck “the vehicle id is “$VEHICKLE””
delsinject 1 0 0 0 “=<$VEHICKLE>”
fi
Once the post-sysinit has been configured on the MGOS device, reboot it. Verify the stat is sent to the AMM. Use the Stats tab or the Events tab to search for Vehicle to verify that the correct value is set.
Once the MGOS device has been configured, the AMM needs to configure the Stat Vehicle ID to be added to the dashboard.
Note: If the Vehicle ID is a numeric, the AMM dashboard will display it enclosed in quotes. However, if the Vehicle ID is alphanumeric, it will be displayed without quotes.