Hello, good day!
To make te configuration between the "DIN2/AIN1" and "Ground sense" go to Teltonika's configurator>> System and in the bottom is the "Input mode" section, here you can choose between the "DIN2/AIN1" and "Ground Sense".

You can configure it with "SMS" using the command "setparam" and the ID of the "Input mode" (ID:135) with the following structure:
<space><space>setparam<space>135:0
If you set a passcode to the device you have to include them in the SMS command:
user<space>passcode<space>setparam<space>135:1
Note: 0 is for seting the "Din/AIN1" mode and 1 is for setting the "Ground Sense" mode.

You can find detailed information about the SMS/GPRS commands in this link:
https://wiki.teltonika-gps.com/view/FMB_SMS/GPRS_Commands
And you can find the parameter list in this link:
https://wiki.teltonika-gps.com/view/FMM130_Parameter_list
Let me know if any doubt left.
Have a great day!