Open dvisser opened 1 year ago
I skimmed the code and it doesnt appear obvious at first glance. I am using Wisblock 2 kit also (RAK1900 GPS module, so it uses the TinyGPSPlus library).
@beegee-tokyo what do you think?
I guess you are using the latest code from this repo. What payload decoder are you using in Chirpstack? I was testing with our RAKwireless_Standardized_Payload.
Just run a test and it works as expected.
BLE Log:
10:44:48->GNSS Task wake up
10:44:48->
10:44:48->+EVT:START_LOCATION
10:44:48->poll_gnss
10:44:48->
10:44:48->GNSS timeout 90000
10:44:48->
10:44:48->Using RAK1910
10:44:48->
10:45:23->Location valid
10:45:23->
10:45:23->Location valid
10:45:23->
10:45:23->Altitude valid
10:45:23->
10:45:23->Lat: 14.4214 Lon: 121.0069
10:45:23->
10:45:23->Alt: 55.30
10:45:23->
10:45:23->Acy: 99.99
10:45:23->
10:45:23->+EVT:LOCATION FIX
10:45:23->GNSS Task finished
10:45:23->
10:45:28->Packet enqueued
10:45:28->
10:45:31->LPWAN TX cycle finished ACK
10:45:31->
10:45:31->+EVT:SEND OK
Output in Chirpstack:
Yes I am using the latest code. However, I used the chirpstack decoder from the decoder folder and not the one you mentioned.
I will try the decoder you suggest on Monday and advise.
Thankyou for the prompt response.
Hi @beegee-tokyo I had to modify the decoder you mention slightly such that it would work with latest chirpstack version (decodeUplink method with input and requirement to return 'data').
See below output, as latitude is still reading 0.
function decodeUplink(input) {
bytes = input.bytes;
fPort = input.fPort;
// flat output (like original decoder):
var response = {};
lppDecode(bytes, 1).forEach(function (field) {
response[field['name'] + '_' + field['channel']] = field['value'];
});
return {
data: {
response
}
};
}
I have also set "AT+GNSS=1" as well if that helps?
What do you get in the direct log output of the device? Like what I showed in my test:
10:44:48->Using RAK1910
10:44:48->
10:45:23->Location valid
10:45:23->
10:45:23->Location valid
10:45:23->
10:45:23->Altitude valid
10:45:23->
10:45:23->Lat: 14.4214 Lon: 121.0069
10:45:23->
10:45:23->Alt: 55.30
10:45:23->
10:45:23->Acy: 99.99
10:45:23->
You can get this through USB and it should be as well available on BLE UART connection.
OK so firmware confirmed to be 1.1.2 Jan 17 2023 13:24:19
I also tried your RAKwireless_Standardized_Payload decoder.
I am still getting latitude of 0, as well as on the local log output of the device via USB, I will screenshot a copy of the output for you.
That is strange, I know there was a problem with negative lat/long values before, but that was solved.
What is the latitude that you would expect to get? Do you have by any chance another RAK1910 module that you could try to use?
I have six wisblock kits here all doing the same thing.
So what is the expected latitude?
Testing here with the latest firmware version works fine.
approx -24.4428XX
You are testing outside of a building or inside? I cannot find any problem and the negative latitude should be no problem. RAK members in South America tested it and they are on negative lat and negative long.
I am outside
I have honestly no idea what happens. I cannot see any problem when testing here. Can you try our very simple RAK1910 example code? But it requires a laptop connected to see the output. RAK1910_GPS_UBLOX7
I tried your test on the same wisblock unit, and it seems to work.
I believe there is an issue in your lpwan tracker code now.
The test code reads the latitude perfectly.
Still outputting Latitude as 0. I built from source using PlatformIO.
There has to be a bug in the LPWAN Tracker code, as the RAK1910_GPS_UBLOX7 test was successful.
The only relevant difference I can see between the _RAK1910_GPS_UBLOX7.ino and the LPWAN-Tracker-Solution.ino_ is the used library. The first one uses the TinyGPS library, the second one the TinyGPSPlus library.
Can you check which version of the TinyGPSPlus library you have installed. My TinyGPSPlus library is version 1.0.3 which seems to be the latest.
Can you try to flash this UF2 file on your tracker? This is the code that I am using and I don't see your problem with it. WisBlock_LPWAN_Tracker_V1.1.2_2023.05.02.10.47.05.uf2.zip
I guess you know how to flash the UF2 file, but just in case:
The only relevant difference I can see between the _RAK1910_GPS_UBLOX7.ino and the LPWAN-Tracker-Solution.ino_ is the used library. The first one uses the TinyGPS library, the second one the TinyGPSPlus library.
Can you check which version of the TinyGPSPlus library you have installed. My TinyGPSPlus library is version 1.0.3 which seems to be the latest.
Can you try to flash this UF2 file on your tracker? This is the code that I am using and I don't see your problem with it. WisBlock_LPWAN_Tracker_V1.1.2_2023.05.02.10.47.05.uf2.zip
Thanks, I am testing this now, will report back shortly.
No change, I am still seeing latitude as 0 with your UF2 file.
Still no idea why it does not work for you. This code is for the RAK10700 which uses the RAK12500 GNSS module, not the RAK1910. So I created a test version that runs with a different library for the RAK1910, but as I didn't see the problem before, I am not sure whether it changes anything.
Can you give it a try? WisBlock_LPWAN_Tracker_V1.1.3_2023.05.15.14.35.13.uf2.zip
@dvisser I made a mistake in the altitude. The old library was returning meters, the new one is returning centimeter.
Please use this version: WisBlock_LPWAN_Tracker_V1.1.3_2023.05.15.15.04.55.uf2.zip
@dvisser I made a mistake in the altitude. The old library was returning meters, the new one is returning centimeter.
Please use this version: WisBlock_LPWAN_Tracker_V1.1.3_2023.05.15.15.04.55.uf2.zip
OK I will test now and report back ASAP
Latitude still reading 0. I don't understand!
I changed the code to use the library that is used in the RAK1910_GPS_UBLOX7 example that you tried before.
I have no more ideas. It simply works with both libraries for me.
I was running the app with fake coordinates with all possible negative/positive lat/Long combinations and it works. so everything after reading the data from the GPS library is ok.
I have no idea why you get 0 as latitude.
I have deployed this solution using the ArduinoIDE version and used the chirpstack decoder, however the returned gps latitude is always "0" whilst longitude appears correct. Please can this issue be addresses? All other functionality appears to be working correctly.