ﯾﺎ ﺍﻟﻠﮧ ﮨﻤﯿﮟ ﻋﺎﺟﺰﯼ ،ﺍﻧﮑﺴﺎﺭﯼ، ﺩﺭﮔﺰﺭ ﺍﻭﺭ ﺗﻮﺑﮧ ﮐﺮﻧﮯ ﻭﺍﻟﻮﮞ ﻣﯿﮟ ﺷﺎﻣﻞ ﻓﺮﻣﺎ
~!~ Syed Jahanzaib ~!~
![]()
![traccar-demo]()
Assalam Va Alekum,
Greetings to all,
Recently I purchased an GPS tracking device for my car. As I can see its performance is very good, and it provides me quite accurate results of live or history track.of the vehicle movement, but the device has its costs and for web track there are annual charges too. So If I have few vehicles it will be costly to get them all monitored. So just for curiosity I did some R&D and found TRACCAR , which is a Linux base vehicle / fleet tracking management system , the best thign is its FREE ;) and we all love to have FREE lunch at anyplace, anywhere (if its Legal preferably :)
As I have made this or test purposes, if some is interested and have no experience in linux or want to first try it in easy way, simply install traccar client, and contact me, I will make one account for you on my web server which is live 24 hours, and you can then see its working and performance. Message me if required.
Benefits of TRACCAR and its possible usage …
- Any Vehicle Tracking / maintain history
– Can be used for personnel tracking
– Can be used as a commercial solution as well
– Can be used to track your lost mobile phone
– You can inquire about location by sending SMS to the device and it will return sms you the location with URL
– Maintain History and Track of the device and speed of vehicles
– Many others …
Hardware Software used in this Guide.
1- Linux base System , I used Ubuntu 12.04 32 bit edition as an example (hardware specs can be anything, nothing fancy required) , The system should have static public ip or it can work port forwarding as wel (if you dont have one, it can be manipulate with some workarounds like ddns too)
2- TRACCAR application which will be used to store/update client data and web portal for management purposes.
3- For client side tracking, I used ANDROID base mobile phone with GPS and GPRS. (HTC DESIRE HD MODEL with Ufone base GPRS (for location update on server, so GPRS must be activated on the SIM in order to update data from client to server) and WiFi where its available (it can store data if no internet is available and will update when it will get access to internet)
First we will configure SERVER side.
SERVER CONFIGURATION
[UBUNTU 12.04 32bit Edition]
Login to your linux server with root, and first update and install Java DK.
apt-get update
aptitude install openjdk-7-jre-headless
Now download TRACCAR server application in temp folder, unzip it and run its installer.
mkdir /temp
cd /temp
wget https://sourceforge.net/projects/traccar/files/traccar-linux-32-2.10.zip/download
unzip traccar-linux-32-2.10.zip
#=======
#INSTALL
#=======
/temp/traccar.run
.
Now Start TRACCAR service
service traccar start
#OR
sudo /opt/traccar/bin/traccar start
You should see some thing like on successful startup …
![traccar server status]()
You can see its logs as well for troubleshooting and information purposes.
tail -f /opt/traccar/logs/tracker-server.log
![TRACCAR server logs]()
TRACCAR server logs
Now access it from the WEB by
http://yourlinuxip:8082
It may take some times to load the page / plugin.
Login With following default credentials
ID = admin
Pass = admin
After successful login, you will see TRACCAR web panel with default map.
On left side you will see DEVICES menu, Click on ADD button, and enter details
As showed in the image below …
![ADd device in Traccar Server Panel]()
ADd device in Traccar Server Panel
NAME = Your Device or Person Name
UNIQUE IDENTIFIER = Enter your IMEI number, you can find it on your device properties.
Click on SAVE.
Now moving to CLIENT end configuration …
CLIENT SIDE CONFIGURATION:
For test purposes, I am showing you howto add android mobile device for tracking (as most of android phones nowa days have GPS module. So basically what you need is a GPS capable Device with Internet Access, (your SIM OR mobile must have Internet access in order to update data like coordinates and others to the server. in case your mobile/device have no internet access, it will store data locally and will update as soon it gets internet access.
Download TRACCAR-CLIENT application on your mobile and install it,
https://dl.dropboxusercontent.com/s/nwzqkt0dkif1bap/traccar-client-release.apk
or you can install it directly from Google play store like
https://play.google.com/store/apps/details?id=org.traccar.client
Once its installed open it (traccar client)
As showed in the image below …
![TRACCAR client on android]()
TRACCAR client on android
.
Now you must modify settings as shown, [pretty simple and common to understand :p ]
![traccar client settings]()
traccar client settings
- DEVICE IDENTIFIER = In Device identifier, you will see you unique IMEI No. (International Mobile Equipment Identity number IMEI) you should add the same in your server section as well (In ADD device)
- SERVER ADDRESS = Enter your server IP address (traccar server) or if you dont have static ip, you can use DYNAMIC DNS on your dsl/router and do port forwarding of required ports liek 8082 for web panel , and 5002 (depend on device model)
- SERVER PORT = In general cases port may be same as for this model its 5002, (but it can vary from GPS device model)
- FREQUENCY = How often (in seconds) client should upload data to the server (For initial test purpose make this value less like 60 seconds)
- LOCATION PROVIDER = Select MIXED provider, so that if GPS is not working, it should update possible coordinates with the nearest mobile network tower. The exact location may not be accurate in network provider settings , but sometimes sufficient to get idea.GPS only settings provide more accurate position but it requires sky sight.
- SERVICE STATUS = select this option so that the client starts sending data. (this service be running all the time )
If you click on MENU and then on STATUS, you can see the LOGS
As showed in the image below …
![CLIENT DEVICE LOGS]()
CLIENT DEVICE LOGS
.
Some more snaps of settings for android client, just for reference purposes
![Android Base Mobile - Location Settings]()
Android Base Mobile – Location Settings
![ANDROID = Traccar-client Configuration]()
ANDROID = Traccar-client Configuration
![Android - traccar-client location provider settings]()
Android – traccar-client location provider settings
![Traccar-client LOGS, on successful connection]()
Traccar-client LOGS, on successful connection
Now at server end… select the device you added earlier and you will start seeing its status. For a better tracking view, Go outside with your device and have a 4-5 kilometers walk or running (its good for health too you know but I myself is so lazy that even with over weight, I dont walk much :P )
Now see the view IN DIFFERENT STYLE ;)
![map-1]()
![map-2]()
UPDATING TRACCAR-WEB.WAR for new features ehancements
SOURCE:
To add some features and enhancements to your previous traccar web portal by Anton Tananaev, update it with Mr.Vitaly Litvak version.
Here are instructions: https://github.com/vitalidze/traccar-web/tree/dev#installation
> Download the updated .war file
wget http://myultrashare.appspot.com/s/traccar-web/dev/latest/traccar-web.war
Now stop traccar service and replace the war file in intalled folder.
service traccar stop
cp traccar-web.war /opt/traccar/
service traccar start
Now you will see new enhanced featured like which don’t exist in original traccar-web
project:
- converted traccar-web to maven project to simplify builds
- following device
- printing device name
- recording device trace
- printing time stamps at device trace points (frequency is configured in Settings >> Preferences) both for archive and recorded trace
- translations to
- russian language (available via ?locale=ru URL parameters)
- german language (available via ?locale=de URL parameter)
- italian language (available via ?locale=it URL parameter)
- spanish language (available via ?locale=es URL parameter)
- polish language (available via ?locale=pl URL parameter)
- tagalog language (available via ?locale=tl URL parameter)
- hungarian language (available via ?locale=hu URL parameter)
- show server log menu for viewing tracker-server.log file on Web
- speed filtering in archive view
- change default map center position, zoom, provider (Google, OSM, Bing) (in Settings >> Preferences)
- replaced ‘current state’ panel with popups. They appear either when you hover a row in ‘devices’ table or when you hover a marker on map
- archive panel is collapsed by default. There is a button in upper right hand corner to expand it
- new ‘managers’ functionality:
- added new role to traccar – manager. Managers can add users and can manage access between devices of their users. So they have access to their devices and to devices of all managed users.
- administrators have full access to everything. They can manage all devices, all users and access between devices and users
- there is a new menu item called ‘Share’ to manage access to selected device
- improved performance of positions loading when DB grows up
- fixed issue when devices are not updated between different instances of web browser
- moved DB transaction management and user rights checks outside of data service implementation (AOP) with google guice
- possibility to detect ‘offline’ devices – when signal hasn’t came for some time (set up in device settings). They will be shown on a map with a marker of different colour and there will be some sign in popup that they are actually offline.
- new device status – idle. It is shown in popup and also there will be a time of idling. Each device got new setting ‘Idle when speed is <=’, which is zero by default. It may be changed to some reasonable value, which is then used to consider device idle (for example to handle ‘satelite drift compansation’).
- possibility to restrict ordinary users to manage (i.e. add/edit/delete) devices. Configured in global application settings.
- save sort order in devices grid into browser cookies
- mobile web UI based on framework7 with general functions for GPS tracking, available at
m/
URL, i.e. http://server-ip:8082/m/
- RESTful API. Available at
/traccar/rest/{methodName}
– allows to call methods from DataService
class. Full documentation will be available by request.
- ‘Address’ column in archive (hidden by default)
- ‘Distance’ column in archive with total distance at the bottom
- possibility to export archive to CSV and GPX
- possibility to import archive from GPX
- possibility to log in via GET request to a separate servlet (for example, for integration on external sites) –
http://server-ip:8082/traccar/s/login?user=your_username&password=your_password
- possibility to change other user’s password for administrators and managers
- possibility to change device marker
If time will allow , I will add some more snaps and customizations that can be made. Its a open source application, you can make your contribution as well.
You can get more details on this project from following link
http://www.traccar.org/
.
.
Regard’s
Syed Jahanzaib
Filed under:
Linux Related