GlobalSat LT-100E

Hi
Did you end up developing a decoder that works for this device? If so, please share :slight_smile:

@bolding We worked out a simple one

    function Decoder(bytes) {
var Battery = bytes[2];
var d = (bytes[3]<<24) | (bytes[4] <<16) | (bytes[5]<<8) | (bytes[6]);
var e = (bytes[7]<<24) | (bytes[8] <<16) | (bytes[9]<<8) | (bytes[10]);
var Longitude = parseInt(e) * 0.000001;
var Latitude = parseInt(d) * 0.000001;

return {Battery:Battery,Latitude:Latitude,Longitude:Longitude};

}

2 Likes

https://drive.google.com/drive/folders/1KQM_FuhBAxrEAnKo8kIBFe-1x9f4A423

Here is all about the configuration of this node if someone can send me the link to buy the device on usa

I strugled to configure the device too. In the end I used a terminal from GlobaSat to do it:

But even with this one I had to wait about a minute after sending the LR in GSC mode, before the AT commands would work correctly in Others mode.

Docs and links found here:
https://drive.google.com/drive/folders/0BwZMBLXo7nICNXNBNHVjNThpaU0?usp=sharing

I’ve made an update to the decoder so that the “cached location” when the gps fix failed doesn’t get interpreted as a valid live location.

For reference see Remove GPS coordinates when there is no fix · Issue #233 · TheThingsNetwork/lorawan-devices · GitHub and Infer location from decoded payload and publish location solved by johanstokking · Pull Request #4311 · TheThingsNetwork/lorawan-stack · GitHub.

function Decoder(bytes) {
  if(bytes[0] === 0) {
    /*
    GPS Fix Status Report Type
    Bit6~Bit7 Bit0~Bit5
    00=not fix, 01=2D, 10=3D
    */
    var parsed_payload = {};

    parsed_payload.gps_status = bytes[1]>>6;
    parsed_payload.gps_valid = 1;
    if(parsed_payload.gps_status === 0) {
      parsed_payload.gps_valid = 0;
    }
    
    parsed_payload.message_type_code = bytes[1] & 0x3F;
    parsed_payload.message_type = "Unknown";
    
    switch(parsed_payload.message_type_code) {
      case 2:
        parsed_payload.message_type = "Periodic mode report"
        break;
      case 4:
        parsed_payload.message_type = "Motion mode static report"
        break;
      case 5:
        parsed_payload.message_type = "Motion mode moving report"
        break;
      case 6:
        parsed_payload.message_type = "Motion mode static to moving report"
        break;
      case 7:
        parsed_payload.message_type = "Motion mode moving to static report"
        break;
      case 14:
        parsed_payload.message_type = "Help report"
        break;
      case 15:
        parsed_payload.message_type = "Low battery alarm report"
        break;
      case 17:
        parsed_payload.message_type = "Power on (temperature)"
        break;
      case 19:
        parsed_payload.message_type = "Power off (low battery)"
        break;
      case 20:
        parsed_payload.message_type = "Power off (temperature)"
        break;
      case 24:
        parsed_payload.message_type = "Fall advisory report"
        break;
      case 27:
        parsed_payload.message_type = "Fpending report"
        break;
      default:
        break;
    }
    
    parsed_payload.battery = bytes[2];
    var d = (bytes[3]<<24) | (bytes[4] <<16) | (bytes[5]<<8) | (bytes[6]);
    var e = (bytes[7]<<24) | (bytes[8] <<16) | (bytes[9]<<8) | (bytes[10]);
    var longitude = parseInt(e) * 0.000001;
    var latitude = parseInt(d) * 0.000001;
    
    if(parsed_payload.gps_valid === 1) {
      parsed_payload.latitude = latitude;
      parsed_payload.longitude = longitude;
    } else {
      parsed_payload.cached = {};
      parsed_payload.cached.latitude = latitude;
      parsed_payload.cached.longitude = longitude;
    }

    return parsed_payload;
  }
}

I’ll try and get this decoder into the lorawan-devices repo when I get a chance.

2 Likes

Hello, beyond the URL, do you have any other parameters like the Downlink API key and the Webhook format?