T-beam V1.1 with LMIC not working when using OTAA

Dear all,

I have been trying to get my T-beam V1 to connect to TTN V3 using OTAA, but it is not working, it keeps looping at the “accept join-request” message. ABP works alright.

I just moved my gateway from TTN V2 to V3 and I am using this:https://github.com/RAKWireless/rak_common_for_gateway for my gateway setup. My concentrator is RAK831.

For my end device I am using, platform.io with LMIC-NODE, this https://github.com/lnlp/LMIC-node.

I think I have narrowed it down to timing issues, and I found other people with similar issues, some links here:
https://www.thethingsnetwork.org/forum/t/otaa-v3-acting-weird/46394,

https://www.thethingsnetwork.org/forum/t/mic-mismatch-when-joining-with-custom-device-over-otaa-arduino-rfm95hope/49016/13,

https://forum.chirpstack.io/t/otaa-failed-debugging-device-activation-otaa-issues/474/82

Alright, so here is my setup for the end-device:

LoRaWAN Version: MAC v1.0.2
Regional Parameters version: Phy v1.0.2 REV B
Frequency plan: Europe 863-879 MHz (SF9 for RX2 - recommended)

For platformio.ini: ttgo_t-beam_v1 is uncommented, DO_WORK_INTERVAL_SECONDS is set to 20.

The result from the serial of the end-device is this:

Device-id:     ttgo-tbeam-v1
LMIC library:  MCCI
Activation:    OTAA
LMIC debug:    2
Interval:      20 seconds

RXMODE_RSSI
000000057376:  Event: EV_JOINING
57411: engineUpdate, opmode=0x4

000000057443:  doWork job started
349581: engineUpdate, opmode=0x4
000000349611:  Event: EV_TXSTART
349660: TXMODE, freq=868100000, len=23, SF=7, BW=125, CR=4/5, IH=0
665275: setupRx1 txrxFlags 00 --> 01
start single rx: now-rxtime: 2
665906: RXMODE_SINGLE, freq=868100000, SF=7, BW=125, CR=4/5, IH=0
rxtimeout: entry: 666433 rxtime: 665900 entry-rxtime: 533 now-entry: 2 rxtime-txend: 312375
727776: setupRx2 txrxFlags 0x1 --> 02
start single rx: now-rxtime: 2
728405: RXMODE_SINGLE, freq=869525000, SF=12, BW=125, CR=4/5, IH=0
rxtimeout: entry: 742757 rxtime: 728400 entry-rxtime: 14357 now-entry: 2 rxtime-txend: 374875
742770: processRx2Jacc txrxFlags 0x2 --> 00
000000742815:  Event: EV_JOIN_TXCOMPLETE
743045: engineUpdate, opmode=0x4

000001307443:  doWork job started

This just loops forever and never connects

For the gateways the results is this:

image

For the end device the results is this:

image

I also have tried out different values for MAX_CLOCK_ERROR but it does not work.

Can anyone help me figure out what the problem is?

@bluejedi Maybe you have some comments on this?
btw, thanks for LMIC-node makes life easier :slight_smile:

LMIC only does this if it has successfully completed a join.

Does the serial log show the start up element each time (ie, is the device resetting)? If so, you may have a power issue or whatever it’s programmed to do next it doesn’t like.

Or is it stuck cycling round from EV_JOINING to EV_JOIN_COMPLETE - if so you may want to start with a clean project and copy the basics over as if it’s recy

Are you running your stack on a local machine? Not that should make any difference.

The device is not restarting i am sure of that:

Some more serial output:

LMIC-node

Device-id:     ttgo-tbeam-v1
LMIC library:  MCCI
Activation:    OTAA
LMIC debug:    2
Interval:      20 seconds

RXMODE_RSSI
000000057353:  Event: EV_JOINING
57389: engineUpdate, opmode=0x4

000000057421:  doWork job started
196796: engineUpdate, opmode=0x4
000000196826:  Event: EV_TXSTART
196875: TXMODE, freq=868300000, len=23, SF=7, BW=125, CR=4/5, IH=0
512491: setupRx1 txrxFlags 00 --> 01
start single rx: now-rxtime: 2
513121: RXMODE_SINGLE, freq=868300000, SF=7, BW=125, CR=4/5, IH=0
rxtimeout: entry: 513648 rxtime: 513115 entry-rxtime: 533 now-entry: 2 rxtime-txend: 312375
574991: setupRx2 txrxFlags 0x1 --> 02
start single rx: now-rxtime: 2
575620: RXMODE_SINGLE, freq=869525000, SF=12, BW=125, CR=4/5, IH=0
rxtimeout: entry: 589972 rxtime: 575615 entry-rxtime: 14357 now-entry: 2 rxtime-txend: 374875
589986: processRx2Jacc txrxFlags 0x2 --> 00
000000590030:  Event: EV_JOIN_TXCOMPLETE
590260: engineUpdate, opmode=0x4

000001307421:  doWork job started

000002557421:  doWork job started

000003807421:  doWork job started
4402093: engineUpdate, opmode=0x4
000004402114:  Event: EV_TXSTART
4402159: TXMODE, freq=868500000, len=23, SF=7, BW=125, CR=4/5, IH=0
4717773: setupRx1 txrxFlags 00 --> 01
start single rx: now-rxtime: 2
4718403: RXMODE_SINGLE, freq=868500000, SF=7, BW=125, CR=4/5, IH=0
rxtimeout: entry: 4718931 rxtime: 4718398 entry-rxtime: 533 now-entry: 2 rxtime-txend: 312375
4780273: setupRx2 txrxFlags 0x1 --> 02
start single rx: now-rxtime: 2
4780903: RXMODE_SINGLE, freq=869525000, SF=12, BW=125, CR=4/5, IH=0
rxtimeout: entry: 4795255 rxtime: 4780898 entry-rxtime: 14357 now-entry: 2 rxtime-txend: 374875
4795269: processRx2Jacc txrxFlags 0x2 --> 00
000004795327:  Event: EV_JOIN_TXCOMPLETE
4795558: engineUpdate, opmode=0x4

000005057421:  doWork job started

Here is the code that I am using: https://github.com/lnlp/LMIC-node/blob/main/src/LMIC-node.cpp

I am running my end-device on a local machine, yes :slight_smile:

That’s just pretty much the same as before - what I was trying to establish is how you can tell it is repeating …

Not really. It does this if it waits for a join accept and the wait times out.

The event for a successful join is EV_JOINED.

1 Like

Well, the fact that the serial output just loops, and on the application side I just see “accept join-request”, like below:

image

Do you need some other info?

/Fadi

Not sure, bit frustrating you managed to crop the information to show just one sequence and then did that again and now you show the repeating.

So the device isn’t hearing the join accept - where is the gateway - it needs to be at least 2 or 3m away so it doesn’t overload the device.

Hello again,

Sorry for that. The last code from the serial output is basically the same all the time, just looping. I just took a picture of the serial output from the beginning and as far down as possible in the crop frame.

Here is the full serial output:

LMIC-node

Device-id:     ttgo-tbeam-v1
LMIC library:  MCCI
Activation:    OTAA
LMIC debug:    2
Interval:      20 seconds

RXMODE_RSSI
000000057353:  Event: EV_JOINING
57389: engineUpdate, opmode=0x4

000000057421:  doWork job started
196796: engineUpdate, opmode=0x4
000000196826:  Event: EV_TXSTART
196875: TXMODE, freq=868300000, len=23, SF=7, BW=125, CR=4/5, IH=0
512491: setupRx1 txrxFlags 00 --> 01
start single rx: now-rxtime: 2
513121: RXMODE_SINGLE, freq=868300000, SF=7, BW=125, CR=4/5, IH=0
rxtimeout: entry: 513648 rxtime: 513115 entry-rxtime: 533 now-entry: 2 rxtime-txend: 312375
574991: setupRx2 txrxFlags 0x1 --> 02
start single rx: now-rxtime: 2
575620: RXMODE_SINGLE, freq=869525000, SF=12, BW=125, CR=4/5, IH=0
rxtimeout: entry: 589972 rxtime: 575615 entry-rxtime: 14357 now-entry: 2 rxtime-txend: 374875
589986: processRx2Jacc txrxFlags 0x2 --> 00
000000590030:  Event: EV_JOIN_TXCOMPLETE
590260: engineUpdate, opmode=0x4

000001307421:  doWork job started

000002557421:  doWork job started

000003807421:  doWork job started
4402093: engineUpdate, opmode=0x4
000004402114:  Event: EV_TXSTART
4402159: TXMODE, freq=868500000, len=23, SF=7, BW=125, CR=4/5, IH=0
4717773: setupRx1 txrxFlags 00 --> 01
start single rx: now-rxtime: 2
4718403: RXMODE_SINGLE, freq=868500000, SF=7, BW=125, CR=4/5, IH=0
rxtimeout: entry: 4718931 rxtime: 4718398 entry-rxtime: 533 now-entry: 2 rxtime-txend: 312375
4780273: setupRx2 txrxFlags 0x1 --> 02
start single rx: now-rxtime: 2
4780903: RXMODE_SINGLE, freq=869525000, SF=12, BW=125, CR=4/5, IH=0
rxtimeout: entry: 4795255 rxtime: 4780898 entry-rxtime: 14357 now-entry: 2 rxtime-txend: 374875
4795269: processRx2Jacc txrxFlags 0x2 --> 00
000004795327:  Event: EV_JOIN_TXCOMPLETE
4795558: engineUpdate, opmode=0x4

000005057421:  doWork job started

000006307421:  doWork job started

000007557421:  doWork job started
8644659: engineUpdate, opmode=0x4
000008644679:  Event: EV_TXSTART
8644724: TXMODE, freq=868100000, len=23, SF=7, BW=125, CR=4/5, IH=0

000008807421:  doWork job started
8960339: setupRx1 txrxFlags 00 --> 01
start single rx: now-rxtime: 1
8960969: RXMODE_SINGLE, freq=868100000, SF=7, BW=125, CR=4/5, IH=0
rxtimeout: entry: 8961497 rxtime: 8960964 entry-rxtime: 533 now-entry: 1 rxtime-txend: 312375
9022839: setupRx2 txrxFlags 0x1 --> 02
start single rx: now-rxtime: 1
9023468: RXMODE_SINGLE, freq=869525000, SF=12, BW=125, CR=4/5, IH=0
rxtimeout: entry: 9037821 rxtime: 9023464 entry-rxtime: 14357 now-entry: 2 rxtime-txend: 374875
9037834: processRx2Jacc txrxFlags 0x2 --> 00
000009037893:  Event: EV_JOIN_TXCOMPLETE
9038123: engineUpdate, opmode=0x4

000010057421:  doWork job started

000011307421:  doWork job started

000012557421:  doWork job started
13051187: engineUpdate, opmode=0x4
000013051206:  Event: EV_TXSTART
13051251: TXMODE, freq=868300000, len=23, SF=8, BW=125, CR=4/5, IH=0
13370082: setupRx1 txrxFlags 00 --> 01
start single rx: now-rxtime: 1
13370712: RXMODE_SINGLE, freq=868300000, SF=8, BW=125, CR=4/5, IH=0
rxtimeout: entry: 13371624 rxtime: 13370707 entry-rxtime: 917 now-entry: 1 rxtime-txend: 312375
13432582: setupRx2 txrxFlags 0x1 --> 02
start single rx: now-rxtime: 1
13433211: RXMODE_SINGLE, freq=869525000, SF=12, BW=125, CR=4/5, IH=0
rxtimeout: entry: 13447564 rxtime: 13433207 entry-rxtime: 14357 now-entry: 2 rxtime-txend: 374875
13447577: processRx2Jacc txrxFlags 0x2 --> 00
000013447652:  Event: EV_JOIN_TXCOMPLETE
13447883: engineUpdate, opmode=0x4

000013807421:  doWork job started

000015057421:  doWork job started

000016307421:  doWork job started

000017557421:  doWork job started

000018807421:  doWork job started

000020057421:  doWork job started
20804619: engineUpdate, opmode=0x4
000020804639:  Event: EV_TXSTART
20804684: TXMODE, freq=868500000, len=23, SF=8, BW=125, CR=4/5, IH=0
21123515: setupRx1 txrxFlags 00 --> 01
start single rx: now-rxtime: 2
21124145: RXMODE_SINGLE, freq=868500000, SF=8, BW=125, CR=4/5, IH=0
rxtimeout: entry: 21125057 rxtime: 21124140 entry-rxtime: 917 now-entry: 2 rxtime-txend: 312375
21186015: setupRx2 txrxFlags 0x1 --> 02
start single rx: now-rxtime: 2
21186645: RXMODE_SINGLE, freq=869525000, SF=12, BW=125, CR=4/5, IH=0
rxtimeout: entry: 21200997 rxtime: 21186640 entry-rxtime: 14357 now-entry: 2 rxtime-txend: 374875
21201011: processRx2Jacc txrxFlags 0x2 --> 00
000021201085:  Event: EV_JOIN_TXCOMPLETE
21201322: engineUpdate, opmode=0x4

000021307421:  doWork job started

000022557421:  doWork job started

000023807421:  doWork job started

000025057421:  doWork job started

000026307421:  doWork job started

000027557421:  doWork job started

000028807421:  doWork job started
28884930: engineUpdate, opmode=0x4
000028884948:  Event: EV_TXSTART
28884991: TXMODE, freq=868100000, len=23, SF=8, BW=125, CR=4/5, IH=0
29203822: setupRx1 txrxFlags 00 --> 01
start single rx: now-rxtime: 2
29204453: RXMODE_SINGLE, freq=868100000, SF=8, BW=125, CR=4/5, IH=0
rxtimeout: entry: 29205364 rxtime: 29204447 entry-rxtime: 917 now-entry: 2 rxtime-txend: 312375
29266322: setupRx2 txrxFlags 0x1 --> 02
start single rx: now-rxtime: 2
29266952: RXMODE_SINGLE, freq=869525000, SF=12, BW=125, CR=4/5, IH=0
rxtimeout: entry: 29281304 rxtime: 29266947 entry-rxtime: 14357 now-entry: 2 rxtime-txend: 374875
29281318: processRx2Jacc txrxFlags 0x2 --> 00
000029281393:  Event: EV_JOIN_TXCOMPLETE
29281623: engineUpdate, opmode=0x4

000030057421:  doWork job started

000031307421:  doWork job started

000032557421:  doWork job started

000033807421:  doWork job started

000035057421:  doWork job started

000036307421:  doWork job started
37154869: engineUpdate, opmode=0x4
000037154889:  Event: EV_TXSTART
37154935: TXMODE, freq=868300000, len=23, SF=9, BW=125, CR=4/5, IH=0
37479558: setupRx1 txrxFlags 00 --> 01
start single rx: now-rxtime: 2
37480188: RXMODE_SINGLE, freq=868300000, SF=9, BW=125, CR=4/5, IH=0
rxtimeout: entry: 37481996 rxtime: 37480183 entry-rxtime: 1813 now-entry: 2 rxtime-txend: 312375
37542058: setupRx2 txrxFlags 0x1 --> 02
start single rx: now-rxtime: 2
37542688: RXMODE_SINGLE, freq=869525000, SF=12, BW=125, CR=4/5, IH=0
rxtimeout: entry: 37557040 rxtime: 37542683 entry-rxtime: 14357 now-entry: 2 rxtime-txend: 374875
37557054: processRx2Jacc txrxFlags 0x2 --> 00
000037557129:  Event: EV_JOIN_TXCOMPLETE
37557360: engineUpdate, opmode=0x4

000037557547:  doWork job started

000038807547:  doWork job started

000040057547:  doWork job started

000041307547:  doWork job started

000042557547:  doWork job started

000043807547:  doWork job started

000045057547:  doWork job started

000046307547:  doWork job started

000047557547:  doWork job started

000050057547:  doWork job started
50942059: engineUpdate, opmode=0x4
000050942079:  Event: EV_TXSTART
50942125: TXMODE, freq=868500000, len=23, SF=9, BW=125, CR=4/5, IH=0
51266748: setupRx1 txrxFlags 00 --> 01
start single rx: now-rxtime: 2
51267379: RXMODE_SINGLE, freq=868500000, SF=9, BW=125, CR=4/5, IH=0
rxtimeout: entry: 51269186 rxtime: 51267373 entry-rxtime: 1813 now-entry: 2 rxtime-txend: 312375

000051307547:  doWork job started
51329248: setupRx2 txrxFlags 0x1 --> 02
start single rx: now-rxtime: 2
51329879: RXMODE_SINGLE, freq=869525000, SF=12, BW=125, CR=4/5, IH=0
rxtimeout: entry: 51344230 rxtime: 51329873 entry-rxtime: 14357 now-entry: 2 rxtime-txend: 374875
51344244: processRx2Jacc txrxFlags 0x2 --> 00
000051344319:  Event: EV_JOIN_TXCOMPLETE
51344550: engineUpdate, opmode=0x4

000052557547:  doWork job started

000053807547:  doWork job started

000055057547:  doWork job started

000056307547:  doWork job started

000057557547:  doWork job started

000058807547:  doWork job started

000060057547:  doWork job started

000061307547:  doWork job started

000062557547:  doWork job started

000063807547:  doWork job started
64243071: engineUpdate, opmode=0x4
000064243090:  Event: EV_TXSTART
64243135: TXMODE, freq=868100000, len=23, SF=9, BW=125, CR=4/5, IH=0
64567758: setupRx1 txrxFlags 00 --> 01
start single rx: now-rxtime: 2
64568388: RXMODE_SINGLE, freq=868100000, SF=9, BW=125, CR=4/5, IH=0
rxtimeout: entry: 64570196 rxtime: 64568383 entry-rxtime: 1813 now-entry: 1 rxtime-txend: 312375
64630258: setupRx2 txrxFlags 0x1 --> 02
start single rx: now-rxtime: 2
64630888: RXMODE_SINGLE, freq=869525000, SF=12, BW=125, CR=4/5, IH=0
rxtimeout: entry: 64645240 rxtime: 64630883 entry-rxtime: 14357 now-entry: 2 rxtime-txend: 374875
64645254: processRx2Jacc txrxFlags 0x2 --> 00
000064645328:  Event: EV_JOIN_TXCOMPLETE
64645559: engineUpdate, opmode=0x4

000065057547:  doWork job started

000066307547:  doWork job started

000067557547:  doWork job started

000068807547:  doWork job started

000070057547:  doWork job started

000071307547:  doWork job started

000072557547:  doWork job started

000073807547:  doWork job started

000075057547:  doWork job started

000076307547:  doWork job started

000077557547:  doWork job started

000078807547:  doWork job started

000080057547:  doWork job started
81005384: engineUpdate, opmode=0x4
000081005404:  Event: EV_TXSTART
81005450: TXMODE, freq=868300000, len=23, SF=10, BW=125, CR=4/5, IH=0

000081307547:  doWork job started
81340377: setupRx1 txrxFlags 00 --> 01
start single rx: now-rxtime: 1
81341007: RXMODE_SINGLE, freq=868300000, SF=10, BW=125, CR=4/5, IH=0
rxtimeout: entry: 81344607 rxtime: 81341002 entry-rxtime: 3605 now-entry: 2 rxtime-txend: 312375
81402877: setupRx2 txrxFlags 0x1 --> 02
start single rx: now-rxtime: 1
81403506: RXMODE_SINGLE, freq=869525000, SF=12, BW=125, CR=4/5, IH=0
rxtimeout: entry: 81417859 rxtime: 81403502 entry-rxtime: 14357 now-entry: 1 rxtime-txend: 374875
81417872: processRx2Jacc txrxFlags 0x2 --> 00
000081417947:  Event: EV_JOIN_TXCOMPLETE
81418177: engineUpdate, opmode=0x4

000082557547:  doWork job started

000083807547:  doWork job started

000085057547:  doWork job started

000086307547:  doWork job started

000087557547:  doWork job started

000088807547:  doWork job started

000090057547:  doWork job started

000091307547:  doWork job started

000092557547:  doWork job started

000093807547:  doWork job started

000095057547:  doWork job started

000096307547:  doWork job started

000097557547:  doWork job started

000098807547:  doWork job started

000100057547:  doWork job started

000101307547:  doWork job started

000102557547:  doWork job started

000103807547:  doWork job started

000105057547:  doWork job started
105327774: engineUpdate, opmode=0x4
000105327794:  Event: EV_TXSTART
105327839: TXMODE, freq=868500000, len=23, SF=10, BW=125, CR=4/5, IH=0
105662766: setupRx1 txrxFlags 00 --> 01
start single rx: now-rxtime: 2
105663396: RXMODE_SINGLE, freq=868500000, SF=10, BW=125, CR=4/5, IH=0
rxtimeout: entry: 105666996 rxtime: 105663391 entry-rxtime: 3605 now-entry: 2 rxtime-txend: 312375
105725266: setupRx2 txrxFlags 0x1 --> 02
start single rx: now-rxtime: 2
105725896: RXMODE_SINGLE, freq=869525000, SF=12, BW=125, CR=4/5, IH=0
rxtimeout: entry: 105740248 rxtime: 105725891 entry-rxtime: 14357 now-entry: 2 rxtime-txend: 374875
105740262: processRx2Jacc txrxFlags 0x2 --> 00
000105740353:  Event: EV_JOIN_TXCOMPLETE
105740583: engineUpdate, opmode=0x4

000106307547:  doWork job started

000107557547:  doWork job started

000108807547:  doWork job started

000110057547:  doWork job started

000111307547:  doWork job started

000112557547:  doWork job started

000113807547:  doWork job started

000115057547:  doWork job started

000116307547:  doWork job started

000117557547:  doWork job started

000118807547:  doWork job started

000120057547:  doWork job started

000121307547:  doWork job started

000122557547:  doWork job started

000123807547:  doWork job started

000125057547:  doWork job started

000126307547:  doWork job started

000127557547:  doWork job started

000128807547:  doWork job started

000130057547:  doWork job started
130840242: engineUpdate, opmode=0x4
000130840262:  Event: EV_TXSTART
130840307: TXMODE, freq=868100000, len=23, SF=10, BW=125, CR=4/5, IH=0
131175234: setupRx1 txrxFlags 00 --> 01
start single rx: now-rxtime: 1
131175864: RXMODE_SINGLE, freq=868100000, SF=10, BW=125, CR=4/5, IH=0
rxtimeout: entry: 131179464 rxtime: 131175859 entry-rxtime: 3605 now-entry: 1 rxtime-txend: 312375
131237734: setupRx2 txrxFlags 0x1 --> 02
start single rx: now-rxtime: 1
131238363: RXMODE_SINGLE, freq=869525000, SF=12, BW=125, CR=4/5, IH=0
rxtimeout: entry: 131252715 rxtime: 131238359 entry-rxtime: 14356 now-entry: 2 rxtime-txend: 374875
131252729: processRx2Jacc txrxFlags 0x2 --> 00
000131252820:  Event: EV_JOIN_TXCOMPLETE
131253051: engineUpdate, opmode=0x4

000131307547:  doWork job started

000132557547:  doWork job started

000133807547:  doWork job started

000135057547:  doWork job started

000136307547:  doWork job started

000137557547:  doWork job started

000138807547:  doWork job started

000140057547:  doWork job started

000141307547:  doWork job started

000142557547:  doWork job started

000143807547:  doWork job started

000145057547:  doWork job started

000146307547:  doWork job started

000147557547:  doWork job started

000148807547:  doWork job started

000150057547:  doWork job started

000151307547:  doWork job started

000152557547:  doWork job started

000153807547:  doWork job started

000155057547:  doWork job started

000156307547:  doWork job started

000157557547:  doWork job started

000158807547:  doWork job started

000160057547:  doWork job started
160655872: engineUpdate, opmode=0x4
000160655892:  Event: EV_TXSTART
160655937: TXMODE, freq=868300000, len=23, SF=11, BW=125, CR=4/5, IH=0
161019152: setupRx1 txrxFlags 00 --> 01
start single rx: now-rxtime: 1
161019782: RXMODE_SINGLE, freq=868300000, SF=11, BW=125, CR=4/5, IH=0
rxtimeout: entry: 161026966 rxtime: 161019777 entry-rxtime: 7189 now-entry: 1 rxtime-txend: 312375
161081652: setupRx2 txrxFlags 0x1 --> 02
start single rx: now-rxtime: 1
161082281: RXMODE_SINGLE, freq=869525000, SF=12, BW=125, CR=4/5, IH=0
rxtimeout: entry: 161096634 rxtime: 161082277 entry-rxtime: 14357 now-entry: 2 rxtime-txend: 374875
161096648: processRx2Jacc txrxFlags 0x2 --> 00
000161096739:  Event: EV_JOIN_TXCOMPLETE
161096976: engineUpdate, opmode=0x4

000161307547:  doWork job started

000162557547:  doWork job started

000163807547:  doWork job started

000165057547:  doWork job started

000166307547:  doWork job started

000167557547:  doWork job started

000168807547:  doWork job started

000170057547:  doWork job started

000171307547:  doWork job started

000172557547:  doWork job started

000173807547:  doWork job started

000175057547:  doWork job started

000176307547:  doWork job started

000177557547:  doWork job started

000178807547:  doWork job started

000180057547:  doWork job started

000181307547:  doWork job started

000182557547:  doWork job started

000183807547:  doWork job started

000185057547:  doWork job started

000186307547:  doWork job started

000187557547:  doWork job started

000188807547:  doWork job started

000190057547:  doWork job started

000191307547:  doWork job started

000192557547:  doWork job started

000193807547:  doWork job started

000195057547:  doWork job started

000196307547:  doWork job started

000197557547:  doWork job started

000198807547:  doWork job started

000200057547:  doWork job started

000201307547:  doWork job started

000202557547:  doWork job started

000203807547:  doWork job started

000205057547:  doWork job started

000206307547:  doWork job started

000207557547:  doWork job started

000208807547:  doWork job started

000210057547:  doWork job started

000211307547:  doWork job started

000212557547:  doWork job started
212846179: engineUpdate, opmode=0x4
000212846197:  Event: EV_TXSTART
212846241: TXMODE, freq=868500000, len=23, SF=11, BW=125, CR=4/5, IH=0
213209455: setupRx1 txrxFlags 00 --> 01
start single rx: now-rxtime: 2
213210086: RXMODE_SINGLE, freq=868500000, SF=11, BW=125, CR=4/5, IH=0
rxtimeout: entry: 213217269 rxtime: 213210080 entry-rxtime: 7189 now-entry: 2 rxtime-txend: 312375
213271955: setupRx2 txrxFlags 0x1 --> 02
start single rx: now-rxtime: 2
213272585: RXMODE_SINGLE, freq=869525000, SF=12, BW=125, CR=4/5, IH=0
rxtimeout: entry: 213286937 rxtime: 213272580 entry-rxtime: 14357 now-entry: 2 rxtime-txend: 374875
213286951: processRx2Jacc txrxFlags 0x2 --> 00
000213287042:  Event: EV_JOIN_TXCOMPLETE
213287272: engineUpdate, opmode=0x4

000213807547:  doWork job started

000215057547:  doWork job started

000216307547:  doWork job started

000217557547:  doWork job started

000218807547:  doWork job started

000220057547:  doWork job started

000221307547:  doWork job started

000222557547:  doWork job started

000223807547:  doWork job started

000225057547:  doWork job started

000226307547:  doWork job started

000227557547:  doWork job started

000228807547:  doWork job started

000230057547:  doWork job started

000231307547:  doWork job started

000232557547:  doWork job started

Yes, I believe that you are right. The device is not hearing the join accept, and I suspect it has to do with timing issue, not sure though.

The device is approx 300 meters away from the gateway :slight_smile:

/Fadi

Did you have the same node connected to V2 while your gateway was still connected to V2 and was it working successfully then?
Or is the T-Beam new and did you add it to V3 after your gateway was moved from V2 to V3?


You defined LoRaWAN 1.0.2 for the node. Have you also tried LoRaWAN 1.0.3? If not try to define a new (test) device using LoRaWAN v1.0.3. Does this solve the problem?


As for:

Above is related to 8-bit AVR, 8 MHz which is known to require relaxation of timing (ClockError) but should not be necessary for ESP32.


I assume you mean something different from what you wrote, please explain.
MAX_CLOCK_ERROR is a fixed enum value that represents 100% ClockError.
In LMIC-node changing ClockError is done by defining and setting a value for LMIC_CLOCK_ERROR_PPM in the BSF.
Did you try that? What values did you try? Have you looked at bsf_pro8mhzatmega328.h for an example value to start with?


What is your device, T-Beam V1.0 or V1.1?
Shouldn’t matter for LMIC-node, the ‘ttgo_t_beam_v1’ boardid was tested with both T-Beam V1. 0 and T-Beam V1.1 (V1.0 was tested by meself).


Why is there 300m distance between node and gateway? Is there anything between that may affect RF signals (e.g. buildings).
Have you tried moving the node closer to the gateway?
Have you tried other nodes with your gateway? After moving it to V3?
Have you tried the node with a different gateway?

So here is the story:

The gateway was setup on ttn V2 before and OTAA never worked there too, only ABP worked. I then moved it to V3 and still OTAA is not working, but ABP works on V3.

The T-beam I am using is the newest with the AXP power controller (V1.1), I also tried with TTGO-Lora32-v21 (which is the v2.1.6), exactly the same problem. OTAA does not work and I get “accept join-request” in a loop.

Yes, I have tested if DI01 and DI02 are connected to the pins of the Lora module, and they are both connected correctly by the manufacturer: TTGO T-beam V1 (v1.1) and TTGO-lora32-v21(2.1.6). So no problem there.

I have tested MAC 1.0.3, and I get the same problem for both OTAA.

Sorry, my mistake I meant LMIC_CLOCK_ERROR_PPM. I changed the value to anywhere between 50 to 5000. I just took a look at bsf_pro8mhzatmega328.h and tried to use the numbers 30000 to 70000, and I still get the same problem.

The figure below shows, 3 things: The blue color is my gateway on TTN V3, and I am approx 565 meters away from it. The red color is another gateway on TTN V2, not my gateway. So I did some tests, and here is what I found out:

Yes, I have been walking near both gateways like 50 meters away from both. When I got closer to my own (red) there is no difference, the same problem OTTA does not work, but when I go to the blue gateway the end-device gets accepted with OTAA (LMIC_CLOCK_ERROR_PPM was commented out, meaning off), after the acceptance of the end-device, both gateways were capable of receiving data. So the conclusion must be that there is something wrong with my gateway when trying to accept end-devices that use OTAA?

I have read this forum: https://forum.chirpstack.io/t/otaa-failed-debugging-device-activation-otaa-issues/474/79 and maybe this is because of the packet-forwarder inside my gateway?

Right now i am using rak_common_for_gateway, which uses the lora-pkt-fwd. Maybe someone else can test this out?

What are your suggestions?

Next thing I will do is to give you more detailed info from my gateway.

Which devices did not work with OTAA?

DIO0, DIO1 and DIO2 are pins of the LoRa module. So what did you check then?
Did you physically check to which ESP32 GPIO ports they are connected? What was the result, which is connected to what?

Not clear what you mean. Please be exact and correct.
Do you mean you tried a real TTGO LoRa32 v2.1.6 board with your gateway or tried to use LMIC-node boardid ttgo_lora32_v21 for your TTGO T-Beam V1.1 board?
Selecting a different board(id) makes no sense (at all) and won’t help.

Not clear what you mean here.

So your node works then.

Yes, your gateway seems to be the culprit.

If you want useful help from others you will need to be more specific in providing information and details (so others don’t have to ask every time).

What is your gateway except just for a RAK831 concentrator board?
Presumingly Raspberry Pi. Which version exactly?

What exact version of the gateway software are you running?

In one of your referenced links above someone describes an issue with the RAK gateway software which got fixed after installing the multi protocol packet forwarder (mpp forwarder).

Installing other gateway software on your gateway may fix your problem.

In addition to mpp forwarder another option is to install ‘LoRaWAN Basics Station’ on the Raspberry Pi (I’m not sure if it supports RAK831 out of the box though).

Have a look at other topics on the forum and search for RAK831 and multi protocol packet forwarder (or basics station or basicstation).