FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

4167 questions

4739 answers

3460 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
1,767 views
in Vehicle tracking by

Hello !

I would like to set geofencing by using a GPRS command.

For the moment, it looks like this : setparam 20100:1;20101:3;20102:1;20103:20;20104:0;20105:50;20106:5;20107:56

However, the problem is that in this command I don't specify which geofence I want to configure.
It's possible in the Teltonika interface, but I haven't find parameter ID in the Manual Geofence section of this page : https://wiki.teltonika.lt/wiki/index.php?title=FMB120_Parameter_list&mobileaction=toggle_view_desktop.

How could I configure a geofence zone using GPRS commands ?

Thanks a lot for your help !
Sincerely.

PS : Sorry for my bad english.

by anonymous

How do you set up a geofence?

shareit pc vidmate

by

Hello !

I don't know if I can explain better than the Teltonika Support himself, but I will try at least to explain differently. ^^

First of all, I excpect you are able to send data/commands to your Teltonika objects. By SMS (text) or by using the Codec 12 (hexadecimal).

You need to know two things :
(1) https://wiki.teltonika-gps.com/view/FMB_SMS/GPRS_Commands - This is all commands for FMB devices.
(2) https://wiki.teltonika-gps.com/view/FMB120_Parameter_list - This is all the parameters availables for a device with their description.

Now, you want to use the setparam command to define one geofencing (or more if you want) at time. Because a geofencing is a combination of parameters to set.
Here are two examples explaining the use of "setparam" command :

  • Only one paramter : setparam 20100:3
  • Two ore more parameters : setparam 20100:3;20101:3

Now, I will take the pictures of the Teltonika Support that you can find below. They are very good to explain you the parameters to set for Geofencing.
Alternatively, you can also use the link (2) to go in the "Manual GeoFence" part.

You have to understand that the first table is an explanation of the first line of the second table.

In fact, whatever which geofencing zone you want to create (1, 2, 3, 4, ..., 50), you just have to transpose parameters ID of the good row (1 or 2 or ..., 50) of the second table into the first table.

Here are complete commands for the firsts 3 geofencings.

For Geofencing 1 : setparam 20100:x;20101:x;20102:x;20103:x;20104:x;20105:x;20106:x;20107:x
For Geofencing 2 : setparam 20120:x;20121:x;20122:x;20123:x;20124:x;20125:x;20126:x;20127:x
For Geofencing 3 : setparam 20140:x;20141:x;20142:x;20143:x;20144:x;20145:x;20146:x;20147:x
For Geofencing 4 : You just have to add +20 to each parameter ID.

You just have to replace the "x" by a value you want to chose.

Like Gabrielius has said, you may notice that we have added +20 to each Parameters ID of Geofencing 2 compared to Geofencing 1. It is the same amount between Geofencing 3 and Geofencing 2.
This information can be useful for your programs if you want to automate something.

After having created the command, if you want to send it using C#, Java or an other language, you have to use the Codec 12 (you have to create it) and send the command into hexadecimal format.

I expect I was clear and my response, helpful.
If you have questions doesn't hesitate to ask me.
Sincerely.

2 Answers

+1 vote
by anonymous

Hello,

Thank you for your question,

The ID table for each of the geozones is provided below the main "Manual Geofence" table.

You should be able to configure the device via GPRS commands in same manner as using the SMS commands. Only difference is that Codec12 is used to send GPRS commands and the text should be converted into hexadecimal accordingly.

Please follow the information provided in our wiki link:

https://wiki.teltonika.lt/view/Codec_12

" Example 1: getinfo

Sending “getinfo” SMS command via GPRS Codec12:

00000000000000110C010500000009676574696E666F0D0A010000DA7E "

Hope this helps,

Regards.

Best answer
by
Hello !

Thanks a lot for your help !

I am sorry, I had not paid attention to the part under the table...
It's seems to be pretty easy to configure.
0 votes
by

Hi,

Manual Geofences have groups of parameter ID that correspond to which Geofence you are setting up/modifying.

Look at the section just below Manual Geofence. It has a Zone Number on the left, and all the parameter IDs for that Geofence. So Geofence 1 has the parameter IDs that you've posted, and that should successfuly set up a circular Geofence at coordinates 5;56 with your settings.

If you wanted to set up an identical Geofence 2, you would have to use the command:

setparam 20120:1;20121:3;20122:1;20123:20;20124:0;20125:50;20126:5;20127:56

You can see that, according to the table, if you add +20 to all the parameter IDs, you start setting up the next Geofence in the list.

by
Hello !

Many thanks for your reply and the sample.

It is really helpful !

I will try to implement functions based on this method.

Sincerely.
by
Hello !

I haven't tested the FMB640 device so I can't help you. :/

However, if you create your own topic, you can gain visibility and maybe a professional could help on your problem.
The "unanswered" part of this forum show that all questions asked are seens and got answer.

Or maybe, ask on the VIP HelpDesk of Teltonika.

Sincerely.