Dear all,
I am testing the wio LoRaWan Field Tester, which is an open-source project from disk91, available on github. I purchased a kit from seedstudio. Then I removed the Helium key and installed a fresh firmware.
Surprisingly the integration webhook maps to a closed-server operated by disk91. So I am looking for information how to integrate it directly with TTN mapper.
Here is my webhook:
function Decoder(bytes, port) {
var decoded = {};
if ( port != 1 ) return decoded;
var lonSign = (bytes[0]>>7) & 0x01 ? -1 : 1;
var latSign = (bytes[0]>>6) & 0x01 ? -1 : 1;
var encLat = ((bytes[0] & 0x3f)<<17)+
(bytes[1]<<9)+
(bytes[2]<<1)+
(bytes[3]>>7);
var encLon = ((bytes[3] & 0x7f)<<16)+
(bytes[4]<<8)+
bytes[5];
var hdop = bytes[8]/10;
var sats = bytes[9];
const maxHdop = 2;
const minSats = 5;
if ((hdop < maxHdop) && (sats >= minSats)) {
// Send only acceptable quality of position to mappers
decoded.latitude = latSign * (encLat * 108 + 53) / 10000000;
decoded.longitude = lonSign * (encLon * 215 + 107) / 10000000;
decoded.altitude = ((bytes[6]<<8)+bytes[7])-1000;
decoded.accuracy = (hdop*5+5)/10
decoded.hdop = hdop;
decoded.sats = sats;
} else {
decoded.error = "Need more GPS precision (hdop must be <"+maxHdop+
" & sats must be >= "+minSats+") current hdop: "+hdop+" & sats:"+sats;
}
return decoded;
}
Unfortunately it does not return any information. I understand that hdop must be lower than 2.
Anyone using this device here? Sorry for posting here. I think a lot of TTN users are looking for a cheap testing device, so it might help. disk91 might answer but it might takes weeks so I am posting here.
Kind regards,
Ffries