Searching...

Matching results

    Displaying GPS ID on the AMM Dashboard

    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:

    1. 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.

    2. 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

    3. Configure dashboard of the AMM to display GPS Vehicle ID

    Initializing Table Of Contents...

    GPS Vehicle ID on MGOS device

    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.

    Configure GPS Vehicle ID using AMM Template

    Use the following procedure to configure the GPS Vehicle ID using an AMM Template.

    1. From the AMM dashboard, select Configuration > Templates
    2. Select Add to create a new template
    3. Specify the Platform to be MG90 and the Target Version to be the current version that the MG90 is running, so that it will not upgrade. Select Next.
    4. Select GPS Service Configuration Specification and then to move it to the right column. Select Next.
      Image 1 Image 2
    5. Enter a Template Name
    6. Select the Owner Group for which the template will be available for
    7. Under the TAIP section, set Enable to yes
    8. Specify the Fastest Report Interval.
    9. Select the Response
    10. Specify the Top of Hour
    11. Enter the Vehicle ID. This consists of four 7-bit ASCII alphanumeric characters. E.g. A123
    12. Select Submit to save the template
    13. In the list of Configuration Templates, select the template you just created and it will open the template so that you can edit it. Then select Publish. The template will be published as revision 1. Select Publish to publish it.
    14. In the left hand tree, select the MG90 router(s) that you will be applying this template to.
    15. In the right hand panel, select the template.

    16. Select Deploy

    17. 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.

    18. 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

    19. Select Submit

    20. 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.

    Check for post-sysinit file on AMM

    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.

    1. On the AMM dashboard, go to Configuration > Deployment > Configuration Control
    2. For a MGOS device, under the Files column, select Click to display files…
    3. Check to see if there is a post-sysinit file.

    Check for post-sysinit file on MG90

    1. Login to the MG90 LCI
    2. Go to General > Advanced Routing Rules
    3. Confirm that there is a BOOT file.

    Configure post-sysinit

    If there is no post-sysinit script

    1. Log on to the MG90 using the LCI
    2. Go to General > Advanced Routing Rules > BOOT > Add New File
    3. Paste the following code snippet into the file.
    4. 
      #!/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
          
    5. Save the file and reboot.
    6. Confirm that the post-sysinit file is showing on the AMM, after the MGOS device is fully booted up again. Refer to Check for post-sysinit file on AMM

    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.

    1. Create a text file named post-sysinit
    2. Paste the following code snippet into the file
    3. 
      #!/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
      
    4. Save and exit the file.
    5. On the AMM dashboard, select the MGOS device which the file will upload to
    6. Select Configuration > Deployment > Configuration Control and confirm that the MGOS device has a State of In Sync. If not, then select the MGOS device and select Revert to retrieve the current configuration from the device. If there are no issues, the State should change to In Sync
    7. On the AMM dashboard, select Configuration > Deployment > Upload
    8. Select Choose File, and specify the newly created post-sysinit file
    9. Select Upload
    10. Select Configuration > Deployment > Configuration Control
    11. Select the MGOS device that you have uploaded the file to. The State should be Pending(sync to device). If the State is In Sync, confirm that the # of files has increased by 1. Refer to Check for post-sysinit file on AMM
    12. If the State is Pending(sync to device), then select Sync Now to apply the file to the MGOS device

    If a post-sysinit script already exists

    1. Log on to the MG90 using the LCI
    2. Go to General > Advanced Routing Rules > BOOT > Configure
    3. Copy the code snippet below
    4. 
      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
      
    5. Paste it at the top of the post-sysinit script after the #!/bin/bash line
    6. Save the file and reboot.

    Alternatively, you can also add the code snippet to the existing post-sysinit script using the AMM.

    1. On the AMM, select the MGOS device that you want to modify
    2. Select Configuration > Deployment > Configuration Control
    3. Select Click to display files
    4. Click on the post-sysinit and the AMM will open a new window with the contents of the post-sysinit displayed.
    5. Paste the following code snippet into the file after the #!/bin/bash line
    6. 
      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
      
    7. Select Save
    8. The State will change to Pending(sync to device).
    9. Select Sync and the state should change to In Sync

    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.

    Configure Vehicle ID on dashboard

    Once the MGOS device has been configured, the AMM needs to configure the Stat Vehicle ID to be added to the dashboard.

    1. On the AMM, select Admin > Devices > Threshold > Add
    2. Enter the Label and, Group or gateway.
    3. Select the Stat Vehicle ID
    4. Adjust any other values as needed
    5. Select Save

    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.

    TOP