Send notification if device lost signal

  • Anonymous - 2013-02-13

    I have custom GPS tracker. It periodically send data to server via GSM. (for example twice/hour)
    There is a situation when GSM signal may be lost and device can't sent data to sever in correct time. In this situation server must send notification to email or SMS.

    I use OpenGTS.
    Any idea how to implement this?

  • Sandeep

    Sandeep - 2013-02-13


    You can use Cron Job and Simple Unix Script. ( Only if u have shell access and using Linux OS)
    Scan all the devices from Device Table and check the last data received time.

    Thank you

  • Anonymous - 2013-02-13

    Thank for idea. But I use Windows as server.

  • Anonymous - 2013-02-15

    I add some function to tk10x code.
    and add two field to

        public static final String FLD_deviceLostSignal = "DeviceLostSignal";      //DeviceLostSignal
        public static final String FLD_notificationFlag      = "NotificationFlag";

           new DBField(FLD_deviceLostSignal     , Boolean.TYPE        , DBField.TYPE_BOOLEAN     , I18N.getString(Device.class,"Device.fld.deviceLostSignal"     , "DeviceLostSignal"            ), "edit=2"),
            new DBField(FLD_notificationFlag     , Boolean.TYPE        , DBField.TYPE_BOOLEAN     , I18N.getString(Device.class,"Device.fld.notificationFlag"     , "NotificationFlag"            ), "edit=2"),

    and get/set function

    This is my test log

    Thus must be set         device.setDeviceLostSignal(true); device.setNotificationFlag(false);
    But when I see a database via SQLyog I see DeviceLostSignal == 0 and NotificationFlag ==0.

    Where is my problem?

  • Sandeep

    Sandeep - 2013-02-15


    In Device.sql Table there are 2 field. LAST latitude and longitude with time.

    So just use while loop in java program and check the last data received on server and If any value is matching with your requirement then send an email.

    Use schedule task to run the script or alternate way is make a bin file and start that file on boot up and add sleep timer in it.

    Thank you

  • Anonymous - 2013-02-15

    Thank you.
    I am trying to understand why my function ( not update fields in DB.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks