Join-accept message not received by the node (LMIC)

I am using a custom node based on RFM95 module and MCCI LMIC library on a Atmel SAMD21 microcontroller.
Using the basic example ttn-otaa, with proper keys configured, the node does send join request and it is processed by the application, but the join-accept message is not received by the node.

This is the output of the node:

251390: engineUpdate, opmode=0x8
Packet queued
251595: EV_JOINING
251606: engineUpdate, opmode=0xc
398982: engineUpdate, opmode=0xc
399200: EV_TXSTART
399272: TXMODE, freq=868500000, len=23, SF=7, BW=125, CR=4/5, IH=0

The gateway console shows this report with device correlated join request:

The application console shows this report:

I tried implementing

LMIC_setClockError(MAX_CLOCK_ERROR * 10 / 100);

with no success (for different percentages).

A different node with the same firmware works fine. I have checked the hardware connections and there seems to be no problem.

You haven’t shown the log messages printed after the TX…

That strongly suggests that it is actually a wiring problem, or some other hardware difference.

You might spend some time understanding which DIO pin is used to indicate the end of transmission, and capturing that on a scope in single shot mode along with the SPI chip select used to talk to the radio and see if the join RX windows are being done correctly.

Different node with different or identical hardware?
Same firmware using identical or different configuration settings (LMIC pin mappings)?

Failing to receive downlink messages (including join accept) is usually caused by DIO1 being incorrectly mapped in the LMIC pin mappings (or not or incorrectly being wired).

You should not set/change ClockError for SAMD21. It’s not needed and therefore will only make things worse.

Exactly. You will probably see an EV_JOIN_TXCOMPLETE which indicates the join accept was not received/recognized. But you did not show it in your log.

Pointless on the SAMD21 for most vendors - this was a work around for cheap Pro Mini’s.

I did not show log messages printed after the TX because there is no log messages :slight_smile:
The working node uses a different pin mapping, I will try changing it on the node under test.

Thanks for everyone’s time, I appreciate it.

I will post an update.

Then something’s gone seriously wrong. The software shouldn’t hang there.

Perhaps it’s waiting for something that’s never going to happen like detecting the end of the uplink transmission, due to incorrect wiring between the MCU and radio which makes that undetectable.

As above said, I will rewire it on different DIO and test it again, then update this post.
If the rewire will not work I will try probing the DIOs.


After a quick rewire of DIO0 and DIO1 pins the node is able to join OTAA and working. Somehow the physical connections went bad.

Thanks everyone for help.

rewire fix

251484: engineUpdate, opmode=0x8
Packet queued
251707: EV_JOINING
251722: engineUpdate, opmode=0xc
689280: engineUpdate, opmode=0xc
689496: EV_TXSTART
689573: TXMODE, freq=868500000, len=23, SF=7, BW=125, CR=4/5, IH=0
1005189: setupRx1 txrxFlags 00 --> 01
start single rx: now-rxtime: 8
1005957: RXMODE_SINGLE, freq=868500000, SF=7, BW=125, CR=4/5, IH=0
1010726: Setup channel, idx=3, freq=867100000
1010921: Setup channel, idx=4, freq=867300000
1011093: Setup channel, idx=5, freq=867500000
1011306: Setup channel, idx=6, freq=867700000
1011455: Setup channel, idx=7, freq=867900000
1011646: EV_JOINED
netid: 19
1011889: engineUpdate, opmode=0x808
1012127: EV_TXSTART
1012198: TXMODE, freq=868100000, len=26, SF=7, BW=125, CR=4/5, IH=0
1327814: setupRx1 txrxFlags 0x1 --> 01
start single rx: now-rxtime: 7
1328634: RXMODE_SINGLE, freq=868100000, SF=7, BW=125, CR=4/5, IH=0
rxtimeout: entry: 1328978 rxtime: 1328439 entry-rxtime: 539 now-entry: 3 rxtime-txend: 312375
1390314: setupRx2 txrxFlags 0x1 --> 02
start single rx: now-rxtime: 8
1391070: RXMODE_SINGLE, freq=869525000, SF=9, BW=125, CR=4/5, IH=0
rxtimeout: entry: 1392758 rxtime: 1390939 entry-rxtime: 1819 now-entry: 4 rxtime-txend: 374875
1393096: processRx2DnData txrxFlags 0x2 --> 00
1393241: processDnData_norx txrxFlags 00 --> 20
1393391: EV_TXCOMPLETE (includes waiting for RX windows)
1393405: engineUpdate, opmode=0x900

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.