DeuxVis / Lora-TTNMapper-T-Beam

TTNMapper on the TTGO T-Beam
GNU General Public License v3.0
109 stars 47 forks source link

No ABP joining #6

Closed covra closed 6 years ago

covra commented 6 years ago

I have been testing this soft on a TTGO T-Beam T22_V05 (ESP32+NEO-M8N+LORA32_SX127x?) and I have not achive the ABP join...

:(

Any idea? thanks in advance-...

DeuxVis commented 6 years ago

Hello, sorry I don't own a T-Beam T22_05, I only have an old first version T-Beam. Could you share a link to where you bought it from please, so that I can have a glance at its specs ?

Did you change the pin mapping values in "lmic_pins" to adapt for the difference(s) of that T22_05 version ?

This said, from the serial logs it seems to me that it is successfully transmitting packets.

Also, sorry if this is obvious, but what gateway model is it ? Single channel gateway will only transmit some of the packets more or less randomly.

covra commented 6 years ago

Did you change the pin mapping values in "lmic_pins" to adapt for the difference(s) of that T22_05 version ?

yes I did and that part is working well :)

This said, from the serial logs it seems to me that it is successfully transmitting packets...

I think so, but I have not traffic in the gateway... So, I'd like know if the node is really joined or if it is only transmitting packets to the air . I´d like to work in this part... Do yo know if there is a method to obtain joinning status from the node? I really like to know if problems come from server authentication or radio issues

what gateway model is it ?

Its a LoRaGo Dock v1.1 with @JaapBraam firmware. It is shows as connected in TTN. Despite can hear only one channel, it should show 1/8 messages from node (its configurated for channel 0)

Thank you again

DeuxVis commented 6 years ago

Can you paste the whole serial output of the node so I can compare it with mine ? You should have seen a "EV_JOINED" line in there I believe, or it shouldn't have carried onto the packet sending step.

Can you monitor the traffic that the gateway sees passing by ? I mean on the gateway itself - log file, serial output, whatever - not in the TTN console.

Also, and again potentially stating what is obvious for you, get sure to move the node a few meters away from the gateway - Although I never experienced it myself, I've read on the TTN forums that the gateway reception can saturate if they are too close.

Last but not least suggestion, you can force your node to only use the same single channel as the gateway for testing purposes using LMIC_disableChannel() : https://github.com/matthijskooijman/arduino-lmic/commit/0567e468c0a2419189f183f5dfa9ad1e8876099b#r18589665

covra commented 6 years ago

I have just go to a near university which have a multichannel gateway. This is the log of the T-beam after button reset:

`ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (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:808 load:0x40078000,len:6084 load:0x40080000,len:6696 entry 0x400802e4 TTN Mapper Valid gps Fix. Lat: 39.483211 Lng: -0.348000 Packet queued EV_TXCOMPLETE (includes waiting for RX windows) Valid gps Fix. Lat: 39.483209 Lng: -0.347960 Packet queued EV_TXCOMPLETE (includes waiting for RX windows) Valid gps Fix. Lat: 39.483212 Lng: -0.347954 Packet queued EV_TXCOMPLETE (includes waiting for RX windows)`

device_status

Later, when I arrive to home, will test the gw...

Thankyou again!!

DeuxVis commented 6 years ago

First, sorry for the long "No fix" sequence, I was inside.

The log does not seem different from mine :

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (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:2
load:0x3fff0018,len:4
load:0x3fff001c,len:952
load:0x40078000,len:6084
load:0x40080000,len:7944
entry 0x40080310
TTN Mapper
No gps Fix.
No gps Fix.
No gps Fix.
No gps Fix.
No gps Fix.
No gps Fix.
No gps Fix.
No gps Fix.
No gps Fix.
No gps Fix.
No gps Fix.
No gps Fix.
No gps Fix.
Valid gps Fix.
Lat: 45.166558
Lng: 5.712520
Packet queued
EV_TXCOMPLETE (includes waiting for RX windows)

... and so on.

So I don't think this is a "join" problem.

Did you uncheck the "Frame Counter Checks" tickbox in the device settings of TTN console ? If you didn't you'd have to wait until it goes back to the bigger counter value it ever reached to see anything appear in TTN console "data" tab.

Edit : sorry I just realized it has never been seen by TTN so it cannot be a frame counter problem : the counter is still at 0 as far as TTN is concerned.

covra commented 6 years ago

I just noticed it continues logging EV_TXCOMPLETE even the GW is turned off and I am sure there is not another GW near me.... :(

I have realized that the hour isnt correct... Could be there any problem with the ntp server? Could be there any problem with that? Its not a GMT hour...

I have checked the GW and despite its shows connected in TTN, in its internal log, doesnt show traffic.

Did you anytime your T-Beam work? I mean, did you see traffic in TTN generated by the T-Beam?

DeuxVis commented 6 years ago

Yes my T-Beam works fine and its traffic is received by both TTN and TTNmapper.

Seeing EV_TXCOMPLETE even when there is no gateway around is normal : there is no confirmation of reception sent back from the gateway to the node, the node is always transmitting "blindly".

Maybe you should start by trying a very simple LMIC example code - ttn-abp for instance - to eliminate the possibility that your T-Beam has an hardware problem forbidding it to actually transmit ?

covra commented 6 years ago

I hace just try the lmic example and again, It doesnt work ... I am thinking the problem could be the seller send me 433 MHz modules instead 868 eu versión... I dont know, the monday I will test them at work

:S

DeuxVis commented 6 years ago

In the meantime I am expecting delivery of what should also be a T22_V05 revision, I'll be able to test on my side. Bought from https://www.aliexpress.com/item/T-Beam-868MHZ-915MHZ-433MHZ-TTGO-ESP32-WiFi-Wireless-Bluetooth-Module-GPS-NEO-6M-SMA-LORA/32873105485.html

DeuxVis commented 6 years ago

Also, this might be related : https://github.com/matthijskooijman/arduino-lmic/issues/164#issuecomment-418092610

covra commented 6 years ago

Hello again I have just arrive from a relaxing mountain days... :)

Meanwhile I wrote to my AliExpress seller and he wrote me back:

"Hello my friend, You can tear the label off and you can see that the black dot on the lid of the module is labeled 433."

And.....surprise! One if them is a 433 MHz module...😔 In addition, the 868 versión, has a diffeent gps chip.... I dont know, how those stuffs affects ,but I continue searching... (I mean: gps chip version, I obviously know frequency incompatibility)

PD: I modified that library at the beginig. If you dont do that, the module restarts steadily. img_20180903_183313_605

covra commented 6 years ago

Finally, I solved the problem: The key was the SF. Cause I was using a Single cannel Gateway, it only could listen in a single cannel and SF , then, I modified

LMIC_setupChannel(0....8, 868100000, DR_RANGE_MAP(DR_SF10, DR_SF10), BAND_CENTI); // g-band

and

LMIC_setDrTxpow(DR_SF10,14)

Now, I receive some (not all) messages from T-Beam (1/4) .... I think the main radio problem is finally close (I have to adjust several parameters to improve the succefull data packets that arrrive to TTN)

Thanks for your interest ;)

DeuxVis commented 6 years ago

Great news.

Have fun with your mapper.

PS that Neo M8 GPS you have on the 433Mhz TBeam is better than the M6 supposedly.

covra commented 6 years ago

Now, I only pray to see data packets on ttmapper :P ;)