Is there a particular reason why the baud rate in the sketch was to 115200?
No particular reason, itâs just the most common value for me.
Nope, but the monitor needs to use the same one as in the sketch.
Lots of ??? is a classic symtom of baud rate miss-match.
After matching, the serial monitor prints: âNo gps Fixâ and removing the comment in the else function of https://github.com/DeuxVis/Lora-TTNMapper-T-Beam/blob/master/gps.cpp file the message in the serial monitor becomes:
No gps Fix.
location valid: 0
location age: -1
hdop valid: 1
hdop age: 549
hdop: 9999
altitude valid: 0
altitude age: -1
Finally, making the variable âbool gps::checkGpsFix()â always true the massage printed on the serial monitor is the following:
ets Jun 8 2016 00:22:57
rst:0x5 (DEEPSLEEP_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:928
ho 0 tail 12 room 4
load:0x40078000,len:8740
load:0x40080400,len:5788
entry 0x4008069c
TTN Mapper
Valid gps Fix.
Lat: 0.000000
Lng: 0.000000
Packet queued
EV_TXCOMPLETE (includes waiting for RX windows)
not sure what the question is? which version of board do you have?
Then maybe the GPS does not have a fix ?
Is the GPS outdoors with a good view of the sky ?
For âjzedâ, the version I have is the T22_V07 20180711.
For âLoRa Trackerâ the GPS was indoor.
Yup the GPS wonât get a fix inside.
What I usually do to debug is use a battery to power up the board outside - under sky - and wait until it get a fix then move it inside. If your walls are not too thick the GPS could continue working.
Otherwise, use a laptop and work outside
IT WORKS!!! At last GPS works. Thanks to all of you that helped me. Now in order to make it works as TTN Mapper node Iâve only to load the following ino file on the board âhttps://github.com/DeuxVis/Lora-TTNMapper-T-Beam/blob/master/Lora-TTNMapper-T-Beam.inoâ and move near a gateway?
(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)
Did you register you device on the things network ?
Youâll also have to do some setup around there : register, set decoder script, âŚ
I registered the device on the things network, I did the ABP activation but at the moment the device status is ânever seenâ. I inserted the APPSKEY, NWKSKEY and Device Address in the config.h file. and finally I configured the payload decoder of the application created on the TTN with the following code:
function Decoder(bytes, port) {
var decoded = {};
decoded.latitude = ((bytes[0]<<16)>>>0) + ((bytes[1]<<8)>>>0) + bytes[2];
decoded.latitude = (decoded.latitude / 16777215.0 * 180) - 90;
decoded.longitude = ((bytes[3]<<16)>>>0) + ((bytes[4]<<8)>>>0) + bytes[5];
decoded.longitude = (decoded.longitude / 16777215.0 * 360) - 180;
var altValue = ((bytes[6]<<8)>>>0) + bytes[7];
var sign = bytes[6] & (1 << 7);
if(sign)
{
decoded.altitude = 0xFFFF0000 | altValue;
}
else
{
decoded.altitude = altValue;
}
decoded.hdop = bytes[8] / 10.0;
return decoded;
}
I didnât touch the converter, validator and encoder.
Tomorrow Iâll go close a gateway. The last thing I will have to do tomorrow is to connect the Lora pin with the pin 33 and turn on the board?
I think something I got wrong in the registration of my device because it doesnât talk with ttn gateway. What are the exact instruction I have to follow in order to register and join my ttgo t-beam to ttn? I think I missed some steps.
I donât mean to sound rude, but have you checked out the tutorials at all? registering devices etc are all in the docs > https://www.thethingsnetwork.org/docs/devices/registration.html
I followed all the instructions of that tutorial. But my device seems not to communicate with the gateway I was close to.
I am not sure you need to connect a dio pin manually on your version of the T-Beam.
Iâll check that later at home - hopefully I have one of that version.
First of all I apologise with all because after I checked the config.h file three times I realized that I miss one digit of my device address. Now seems to work because on ttn mapper Iâm seeing the circle representing my device node even if I donât see the gateway (itâs not the mine). Therefore I tell all of you I am sorry once again.
Anyway, for curiosity, how can I understand if for my device I need to connect a DIO PIN other that seeing the it works?
Thank you
T-beam works out of the box, both versions - no need for extra wiring
You need to do some reading up on the LMIC library and pin connections, some boards come with DIO pins unwired and so a little soldering is needed but not for your T-Beams, its documented which pins are needed form different setups
DIO pins documented a little here > https://github.com/mcci-catena/arduino-lmic
No problem Felice, we all learn from our mistakes.
Only the first versions of the T-Beams needed that patch cable as far as I know. Hereâs a pic of mine, notice it did not even had a version string at the usual location. You also can see in the little pin chart that only âLora IO0â is mentioned, which means you needed to add that cable as I did (I wired DIO1 and DIO2 but only the former is needed for TTN usage AFAIK) :
And here is a pic of my other one which doesnât need the patch wire. Notice if mentions pins connection for âLora IO0â âIO1â and âIO2â :
Looks like itâs the same as yours.
Thank you very much DeuxVis. Youâve been crystal clear and very patient.