I am new to TTN and I can’t manage to get valid data for latitude and longitude for my LGT92. I only receive “0”. I have tried payload formatters “Repository” and Javascript with the code from MoLaender. All I get is “0”. Just for one time I received the correct value tor latitude, the rest of the time is only zero. If I can trust the FW output, Firmware is 164.
Go outside then switch the device on and leave it there (no motion, no alarm button). Still no GPS information ?
In the user manual 1.67 Draqino mentions : “If you have GPS position fix problem and the device serial number is between LGT92341971 ~ LGT92361311. If the device cannot be located, please set PDOP to 7 to fix it in a short time. The default PDOP of the device is 3.00.”
This exactly what I have did an hour ago. I went outside, put it on the ground and waited. Since then I get more or less a valid signal for the latitude. Longitude still delivers “0” or both (longitude and latitude) devlier exactly the same value e.g 37.000372, 37.000372. But these values are completly wrong.
The serial number of my device is 92432157, so unfortunately no in the mentioned range
Anyhow, do you have a manual for the update process? Do I need a special hardware for the update.
Try to power the unit via the USB port with a 5V power bank for instance. I read somewhere that the unit will deliver zero’s for lat and lon in case voltage is too low (and this is what I experienced). Connecting the unit to a serial terminal will also allow you to see whats going on inside the device.
Thanks for the hint. I tested it also while the device was connected via USB to my laptop - same behavior
Since yesterday evening it complete stoped sending. After reseting I still get only values for latitude. Battery SOC seems to be ok, it’s bit above 4V.
I have ordered a ST LINK V2 to update the FW, hopefully it is working then.
a ST LINK V2 is good to have one, in your case I would get a TTL adapter.
So you can see what the LGT-92 is doing and configure him.
If you have an Arduino with USB, you can also use this as a TTL adapter.
today I received a ST Link V2 from DSD Tech. I connected the device as mentioned in the tutorial and tried to connect with Putty. All I get is an error.
Then I tried to to update the tracker, but the ST Link V2 has no SWCLK and no SWDIO So updating is not possible at the moment.
Hi, I followed the explanations I found on the below page, and managed. But you will also need a USB-ttl adapter as mentioned by Thomas to monitor the traffic.
Now I see what I’ve done wrong. I thought USB-TTL is the same as ST Link V2 - shame over me
Anyhow I could not get a connection. I downloaded the the D2XX-Driver form ftdichip.com, installerd them. Then connect the Tracker to the USB2TTL and tried to connect with Putty as described in the manual.
Little progress: the connection with putty works - I have entered the wrong COM-Port
Now I could read out some values. Is Image-Version the same as FW-Version? Because in Putty it shows 1.6.7 in the “TTN Live data” I get 164. So I am little confused now. 1.6.7 is already the latest FW I can find on dragino.com
I would only rely on what you see via Putty. Now wait sometime, and you should also see Lat and Lon coming. In the meantime I encourage you to get familiar with the AT commands.
Just a remark, be carefull when posting critical info such as DevEui…
Hi, try below one. Might be the same but its the one which finally worked for me and that i just copied from my page. And also put it a the right place (not like me when I tried the 1st time), i.e.as shown on the screenshot.
/*function Decoder(bytes, port) {
// Decode an uplink message from a buffer
// (array) of bytes to an object of fields.
var value=bytes[0]<<16 | bytes[1]<<8 | bytes[2];
if(bytes[0] & 0x80)
{
value |=0xFFFFFF000000;
}
var latitude=value/10000;//gps latitude,units: °
value=bytes[3]<<16 | bytes[4]<<8 | bytes[5];
if(bytes[3] & 0x80)
{
value |=0xFFFFFF000000;
}
var longitude=value/10000;//gps longitude,units: °
var alarm=(bytes[6] & 0x40)?"TRUE":"FALSE";//Alarm status
value=((bytes[6] & 0x3f) <<8) | bytes[7];
var batV=value/1000;//Battery,units:V
value=bytes[8]<<8 | bytes[9];
if(bytes[8] & 0x80)
{
value |=0xFFFF0000;
}
var roll=value/100;//roll,units: °
value=bytes[10]<<8 | bytes[11];
if(bytes[10] & 0x80)
{
value |=0xFFFF0000;
}
var pitch=value/100; //pitch,units: °
return {
Latitude: latitude,
Longitud: longitude,
Roll: roll,
Pitch:pitch,
BatV:batV,
ALARM_status:alarm,
};
}*/
//The function is :
function Decoder(bytes, port) {
// Decode an uplink message from a buffer
// (array) of bytes to an object of fields.
var latitude;//gps latitude,units: °
latitude=(bytes[0]<<24 | bytes[1]<<16 | bytes[2]<<8 | bytes[3])/1000000;//gps latitude,units: °
var longitude;
longitude=(bytes[4]<<24 | bytes[5]<<16 | bytes[6]<<8 | bytes[7])/1000000;//gps longitude,units: °
var alarm=(bytes[8] & 0x40)?"TRUE":"FALSE";//Alarm status
var batV=(((bytes[8] & 0x3f) <<8) | bytes[9])/1000;//Battery,units:V
if((bytes[10] & 0xC0)==0x40)
{
var motion_mode="Move";
}
else if((bytes[10] & 0xC0) ==0x80)
{
motion_mode="Collide";
}
else if((bytes[10] & 0xC0) ==0xC0)
{
motion_mode="User";
}
else
{
motion_mode="Disable";
} //mode of motion
var led_updown=(bytes[10] & 0x20)?"ON":"OFF";//LED status for position,uplink and downlink
var Firmware = 160+(bytes[10] & 0x1f); // Firmware version; 5 bits
var roll=(bytes[11]<<24>>16 | bytes[12])/100;//roll,units: °
var pitch=(bytes[13]<<24>>16 | bytes[14])/100; //pitch,units: °
var hdop = 0;
if(bytes[15] > 0)
{
hdop =bytes[15]/100; //hdop,units: °
}
else
{
hdop =bytes[15];
}
var altitude =(bytes[16]<<24>>16 | bytes[17]) / 100; //Altitude,units: °
return {
Latitude: latitude,
Longitude: longitude,
Roll: roll,
Pitch:pitch,
BatV:batV,
ALARM_status:alarm,
MD:motion_mode,
LON:led_updown,
FW:Firmware,
HDOP:hdop,
Altitude:altitude,
};
}