Uplinks drop after a few packets

Hi,

I’m running a LoRaWAN node in AU915 on TTN (fsb 2). The hardware is an ESP32 and an SX1276 module using radiolib (7.2.1).
On boot, joining works fine. I adapted the session restore example in the radiolib-persistence repo for ESP-IDF, and that seems to work fine.

The problem is, that uplinks work initially for about 5-10 uplinks (spaced over 30 mins) then the node goes “silent”. Nothing in the gateway live data. Nothing in the node live data. On my node, it keeps happily reporting success, with either radiolib code 0 or 1.

My gateway has a 12db omni antenna and is about 20m away from the node (with walls in between), so I don’t think it being too close should be an issue, and certainly not too far. RSSI is around -75 and SNR 13.

I tried disabling ADR and using SF7 and SF9. It looks like some packets go through, perhaps more than with ADR, but they still kind of just peter out after a while.

I also tried disabling the dutycycle temporarily (although if im not mistaken, Australia does not enforce duty cycle?) but this did not solve the problem.

If anyone has any ideas or could help further diagnose this issue, it would be greatly appreciated.

Nikolai

Code:

I have cut out a lot of the app-specific code for making the node actually collect the data, so sorry if there are parts missing.

#define SLEEP_INTERVAL_US (30ULL * 60ULL * 1000000ULL)

#define RADIOLIB_LORAWAN_JOIN_EUI REDACTED
#define RADIOLIB_LORAWAN_DEV_EUI REDACTED
#define RADIOLIB_LORAWAN_APP_KEY REDACTED
#define RADIOLIB_LORAWAN_NWK_KEY REDACTED

#define RADIOLIB_LORAWAN_REGION AU915
#define RADIOLIB_LORAWAN_SUB_BAND 2

#define LORAWAN_SAVE_BOOTCOUNT 10

int radioLibState;

extern RTC_DATA_ATTR uint8_t LWsession[RADIOLIB_LORAWAN_SESSION_BUF_SIZE]; // from lorawan_storage.cpp

uint64_t joinEUI = RADIOLIB_LORAWAN_JOIN_EUI;
uint64_t devEUI = RADIOLIB_LORAWAN_DEV_EUI;
uint8_t appKey[] = { RADIOLIB_LORAWAN_APP_KEY };
uint8_t nwkKey[] = { RADIOLIB_LORAWAN_NWK_KEY };

EspHal *hal = new EspHal(SPI_SCK_PIN, SPI_MISO_PIN, SPI_MOSI_PIN);

const LoRaWANBand_t Region = RADIOLIB_LORAWAN_REGION;
const uint8_t subBand = RADIOLIB_LORAWAN_SUB_BAND;

SX1276 radio = new Module(
	hal,
	SX1276_CS_PIN,
	SX1276_IRQ_PIN,
	SX1276_RST_PIN,
	SX1276_BUSY_PIN);

LoRaWANNode node(&radio, &Region, subBand);

RTC_DATA_ATTR int bootCount = 0;

static const char *TAG = "main";

extern "C" void app_main(void)
{
	bootCount++;
	ESP_LOGI(TAG, "Boot count: %d", bootCount);

	// initialise NVS
	esp_err_t err = nvs_flash_init();
	if (err == ESP_ERR_NVS_NO_FREE_PAGES ||
	    err == ESP_ERR_NVS_NEW_VERSION_FOUND) {
		ESP_ERROR_CHECK(nvs_flash_erase());
		ESP_ERROR_CHECK(nvs_flash_init());
	}

	// Initializ
se radio and join LoRaWAN network
	ESP_LOGI(TAG, "[SX1276] Initialising radio...");
	radioLibState = radio.begin();
	if (radioLibState != RADIOLIB_ERR_NONE) {
		ESP_LOGE(TAG, "Failed to initialise radio: %d", radioLibState);
		return;
	}
	ESP_LOGI(TAG, "[LoRaWAN] Initialising node...");
	radioLibState = node.beginOTAA(joinEUI, devEUI, nwkKey, appKey);
	if (radioLibState != RADIOLIB_ERR_NONE) {
		ESP_LOGE(TAG, "Failed to initialise LoRaWAN node: %d", radioLibState);
		return;
	}

	radioLibState = lwActivate(node);

        // device-specific logic for collecting data omitted for brevity

	size_t uplink_len = 0;

	if (uplink_len > 0) {
		ESP_LOGI(TAG, "Built uplink payload with %zu bytes", uplink_len);
		radioLibState = node.sendReceive(uplink_payload, uplink_len);
		ESP_LOGI(TAG, "Radiolib code: %d, FCntUp now %" PRIu32, radioLibState, node.getFCntUp());
		memcpy(LWsession, node.getBufferSession(), RADIOLIB_LORAWAN_SESSION_BUF_SIZE);
	} else {
		ESP_LOGW(TAG, "Nothing to send (payload %zu bytes)",uplink_len);
	}

	esp_sleep_enable_timer_wakeup(SLEEP_INTERVAL_US);
	ESP_LOGI(TAG, "Entering deep sleep for %u seconds…", (unsigned)(SLEEP_INTERVAL_US / 1000000ULL));
	esp_deep_sleep_start();
}

And the lwActivate() function:

#define MIN(a, b) (((a) < (b)) ? (a) : (b))

extern RTC_DATA_ATTR int bootCount;
RTC_DATA_ATTR static int bootCountSinceUnsuccessfulJoin = 0;
RTC_DATA_ATTR uint8_t LWsession[RADIOLIB_LORAWAN_SESSION_BUF_SIZE];

int lwActivate(LoRaWANNode& node)
{
	int state = RADIOLIB_ERR_UNKNOWN;
	nvs_handle_t handle;

	ESP_LOGI(TAG, "Recalling nonces and session...");

	if (nvs_open(LORAWAN_NAMESPACE, NVS_READONLY, &handle) == ESP_OK) {
		size_t len = RADIOLIB_LORAWAN_NONCES_BUF_SIZE;
		uint8_t buffer[RADIOLIB_LORAWAN_NONCES_BUF_SIZE];
		if (nvs_get_blob(handle, LORAWAN_KEY_NONCES, buffer, &len) == ESP_OK) {
			state = node.setBufferNonces(buffer);
			if (state != RADIOLIB_ERR_NONE)
				ESP_LOGE(TAG, "Failed to set nonces buffer: %d", state);
			else
				ESP_LOGI(TAG, "Nonces buffer restored successfully.");
		}
		state = node.setBufferSession(LWsession);
		if (state != RADIOLIB_ERR_NONE && bootCount > 1)
			ESP_LOGE(TAG, "Restoring session buffer failed (code: %d, bootCount: %d)",
				 state, bootCount);
		else
			ESP_LOGI(TAG, "Session buffer restored successfully.");
		nvs_close(handle);
		if (state == RADIOLIB_ERR_NONE) {
			ESP_LOGI(TAG, "Session restored successfully. Attempting to join...");
			state = node.activateOTAA(3);
			if (state != RADIOLIB_LORAWAN_SESSION_RESTORED)
				ESP_LOGE(TAG, "Failed to restore session: %d", state);
			else
				ESP_LOGI(TAG, "Session restored successfully.");
			return state;
		}
	} else {
		ESP_LOGI(TAG, "No nonces found in NVS, starting new session...");
	}

	state = RADIOLIB_ERR_NETWORK_NOT_JOINED;

	while (state != RADIOLIB_LORAWAN_NEW_SESSION) {
		ESP_LOGI(TAG, "Attempting to join network...");
		state = node.activateOTAA();

		ESP_LOGI(TAG, "Saving nonces to flash...");
		if (nvs_open(LORAWAN_NAMESPACE, NVS_READWRITE, &handle) == ESP_OK) {
			const uint8_t *persist = node.getBufferNonces();
			if (nvs_set_blob(handle, LORAWAN_KEY_NONCES,
					 persist, RADIOLIB_LORAWAN_NONCES_BUF_SIZE) == ESP_OK) {
				nvs_commit(handle);
				ESP_LOGI(TAG, "Nonces saved successfully.");
			} else {
				ESP_LOGE(TAG, "Failed to save nonces to flash.");
			}
			nvs_close(handle);
		}

		if (state != RADIOLIB_LORAWAN_NEW_SESSION) {
			ESP_LOGI(TAG, "Join failed: %d", state);
			int sleepForSeconds = MIN((bootCountSinceUnsuccessfulJoin + 1) * 60, 180);
			bootCountSinceUnsuccessfulJoin++;
			ESP_LOGI(TAG, "Boots since last successful join: %d",
				 bootCountSinceUnsuccessfulJoin);
			ESP_LOGI(TAG, "Retrying in %d seconds...", sleepForSeconds);
			esp_sleep_enable_timer_wakeup(uint64_t(sleepForSeconds) * 1000000ULL);
			esp_deep_sleep_start();
		}
	}

	ESP_LOGI(TAG, "Join successful!");
	bootCountSinceUnsuccessfulJoin = 0;
	vTaskDelay(1000 / portTICK_PERIOD_MS);
	return state;
}

Hi @artichoke,

To find out whether this something with your device or on the TTN side, you can try investigating the device & gateway logs.
To get device logs, you can enable the DEBUG_PROTOCOL flag in BuildOptUser.h in the RadioLib source folder. Do you have access to gateway logs as well?

If you can share here what you see in both their logs, I’m sure we’ll be able to help.

Can you give us ALL the details!

Is it a Heltec/LilyGo offering or did you being the modules together and if so how (DuPont/Vero/own PCB)?
How is it powered?
Do you have a copy of the hardware you can run in parallel?
Can you get a Heltec LoRa V3 module and run that (it’s the RadioLib test teams goto device for testing)?
Can you turn off the deep sleep to see how that plays out?
Is it consistent with the number of packets that are heard before it drops out?

The use of this doesn’t appear in your code and 10 is too much of a coincidence to not want to look at how this is used.

Here is the radiolib debug output of an uplink that was successfully received:

I (10509) main: Built uplink payload with 11 bytes
[10.204440] RLB_PRO: Uplink MAC payload:
[10.208116] RLB_PRO: 00000000: 0b 01                                            ..                
[10.250161] RLB_PRO: Uplink (FCntUp = 0) decoded:
[10.250627] RLB_PRO: 00000000: dc 38 fb 3f dc 38 fb 3f 4e 57 d5 2e 42 89 45 bb  .8.?.8.?NW..B.E.
[10.252486] RLB_PRO: 00000010: 40 20 9d 0d 26 82 00 00 a7 a8 01 a6 68 96 c1 07  @ ..&.......h...
[10.261016] RLB_PRO: 00000020: 87 71 06 cb 28 7d e8 06 34 65                    .q..(}..4e        
[10.275829] RLB_PRO: 
[10.275998] RLB_PRO: PHY:  Frequency = 917.000 MHz, TX = 30 dBm
[10.279954] RLB_PRO: LoRa: SF = 10, BW = 125.0 kHz, CR = 4/5, IQ: U
[10.698651] RLB_PRO: Uplink sent <-- Rx Delay start
[10.699529] RLB_PRO: 
[10.699655] RLB_PRO: PHY:  Frequency = 923.900 MHz, TX = 30 dBm
[10.702271] RLB_PRO: LoRa: SF = 10, BW = 500.0 kHz, CR = 4/5, IQ: D
E (11009) gpio: gpio_install_isr_service(502): GPIO isr service already installed
[15.679792] RLB_PRO: Opened Rx1 window (64 ms timeout)... <-- Rx Delay end 
[15.739486] RLB_PRO: Closing Rx1 window
[15.784928] RLB_PRO: Downlink (NFCntDown = 0) encoded:
[15.785475] RLB_PRO: 00000000: 49 00 00 00 00 01 20 9d 0d 26 00 00 00 00 00 0f  I..... ..&......
[15.787695] RLB_PRO: 00000010: 60 20 9d 0d 26 87 00 00 eb d3 77 47 98 08 06 83  ` ..&.....wG....
[15.796151] RLB_PRO: 00000020: af 8d f5                                         ...               
[15.805762] RLB_PRO: [MAC] 0x0b
[15.807858] RLB_PRO: 00000000: 01                                               .                 
[15.816618] RLB_PRO: RekeyConf: server version = 1.1
[15.821469] RLB_PRO: [MAC] 0x03
[15.824483] RLB_PRO: 00000000: 51 00 ff 00 00 00 00 00 00 02 00 00 00 01        Q.............    
[15.833099] RLB_PRO: LinkAdrReq: dataRate = 5, txSteps = 1, nbTrans = 1
[15.839687] RLB_PRO: UL:   8 1 916.800 (0 - 5) | DL:   0 0   0.000 (0 - 0)
[15.846204] RLB_PRO: UL:   9 1 917.000 (0 - 5) | DL:   0 0   0.000 (0 - 0)
[15.852889] RLB_PRO: UL:  10 1 917.200 (0 - 5) | DL:   0 0   0.000 (0 - 0)
[15.859573] RLB_PRO: UL:  11 1 917.400 (0 - 5) | DL:   0 0   0.000 (0 - 0)
[15.866257] RLB_PRO: UL:  12 1 917.600 (0 - 5) | DL:   0 0   0.000 (0 - 0)
[15.872941] RLB_PRO: UL:  13 1 917.800 (0 - 5) | DL:   0 0   0.000 (0 - 0)
[15.879624] RLB_PRO: UL:  14 1 918.000 (0 - 5) | DL:   0 0   0.000 (0 - 0)
[15.886309] RLB_PRO: UL:  15 1 918.200 (0 - 5) | DL:   0 0   0.000 (0 - 0)
[15.892992] RLB_PRO: UL:  65 1 917.500 (6 - 6) | DL:   0 0   0.000 (0 - 0)
[15.899970] RLB_PRO: LinkAdrAns: 07
[15.903731] RLB_PRO: 
[15.905055] RLB_PRO: PHY:  Frequency = 917.000 MHz, TX = 28 dBm
[15.913150] RLB_PRO: LoRa: SF = 7, BW = 125.0 kHz, CR = 4/5, IQ: U
I (16219) main: Radiolib code: 1, FCntUp now 0

Here is the radiolib debug output of an uplink that is not received:

I (738) main: Built uplink payload with 11 bytes
[0.440476] RLB_PRO: Uplink MAC payload:
[0.444037] RLB_PRO: 00000000: 03 07                                            ..                
[0.530262] RLB_PRO: Uplink (FCntUp = 1) decoded:
[0.530718] RLB_PRO: 00000000: dc 38 fb 3f dc 38 fb 3f 8c a1 7f 39 5b 32 0d a5  .8.?.8.?...9[2..
[0.532387] RLB_PRO: 00000010: 40 20 9d 0d 26 82 01 00 e2 56 01 fd cf d1 32 d8  @ ..&....V....2.
[0.540830] RLB_PRO: 00000020: d6 92 b5 72 ba 24 07 23 20 65                    ...r.$.# e        
[0.555282] RLB_PRO: 
[0.555461] RLB_PRO: PHY:  Frequency = 917.200 MHz, TX = 28 dBm
[0.559654] RLB_PRO: LoRa: SF = 7, BW = 125.0 kHz, CR = 4/5, IQ: U
[0.628211] RLB_PRO: Uplink sent <-- Rx Delay start
[0.629076] RLB_PRO: 
[0.629206] RLB_PRO: PHY:  Frequency = 924.500 MHz, TX = 28 dBm
[0.631718] RLB_PRO: LoRa: SF = 7, BW = 500.0 kHz, CR = 4/5, IQ: D
[5.609897] RLB_PRO: Opened Rx1 window (19 ms timeout)... <-- Rx Delay end 
[5.619595] RLB_PRO: Closing Rx1 window
[5.637707] RLB_PRO: 
[5.637851] RLB_PRO: PHY:  Frequency = 923.300 MHz, TX = 28 dBm
[5.640571] RLB_PRO: LoRa: SF = 12, BW = 500.0 kHz, CR = 4/5, IQ: D
E (5948) gpio: gpio_install_isr_service(502): GPIO isr service already installed
[6.609901] RLB_PRO: Opened Rx2 window (178 ms timeout)... <-- Rx Delay end 
[6.779591] RLB_PRO: Closing Rx2 window
I (7098) main: Radiolib code: 0, FCntUp now 1

Here is the gateway logs of a successful join:

Aug 13 12:17:00 artichoketech-noarlunga-01 station[656]: 2025-08-13 02:47:00.600 [SYN:INFO] MCU/SX130X drift stats: min: +0.0ppm  q50: +1.4ppm  q80: +1.9ppm  max: -6.1ppm - threshold q90: +3.3ppm
Aug 13 12:17:00 artichoketech-noarlunga-01 station[656]: 2025-08-13 02:47:00.600 [SYN:INFO] Mean MCU drift vs SX130X#0: 0.3ppm
Aug 13 12:17:03 artichoketech-noarlunga-01 station[656]: 2025-08-13 02:47:03.477 [S2E:VERB] RX 918.0MHz DR2 SF10/BW125 snr=13.0 rssi=-69 xtime=0xD3001BD38DBC66 - jreq MHdr=00 JoinEui=::0 DevEui=70b3:d57e:d006:9153 DevNonce=66 MIC=1072215618
Aug 13 12:17:05 artichoketech-noarlunga-01 station[656]: 2025-08-13 02:47:05.312 [S2E:DEBU] ::1 diid=75 [ant#0] - next TX start ahead by 3s158ms (02:47:08.470972)
Aug 13 12:17:06 artichoketech-noarlunga-01 station[656]: 2025-08-13 02:47:06.650 [SYN:VERB] Time sync rejected: quality=428 threshold=239
Aug 13 12:17:08 artichoketech-noarlunga-01 station[656]: 2025-08-13 02:47:08.451 [S2E:VERB] ::1 diid=75 [ant#0] - starting TX in 19ms891us: 926.9MHz 30.0dBm ant#0(0) DR10 SF10/BW500 frame=204998874C9A85DFA7C5099E..FF1D07D4 (33 bytes)
Aug 13 12:17:08 artichoketech-noarlunga-01 station[656]: 2025-08-13 02:47:08.476 [S2E:INFO] TX ::1 diid=75 [ant#0] - dntxed: 926.9MHz 30.0dBm ant#0(0) DR10 SF10/BW500 frame=204998874C9A85DFA7C5099E..FF1D07D4 (33 bytes)
Aug 13 12:17:08 artichoketech-noarlunga-01 station[656]: 2025-08-13 02:47:08.584 [S2E:DEBU] Tx done diid=75
Aug 13 12:17:14 artichoketech-noarlunga-01 station[656]: 2025-08-13 02:47:14.600 [SYN:INFO] PPS/SX130X drift stats: min: -0.3ppm  q50: -0.5ppm  q80: -0.7ppm  max: -0.7ppm - threshold q80: -0.7ppm

And a successful uplink:

Aug 13 12:18:59 artichoketech-noarlunga-01 station[656]: 2025-08-13 02:48:59.376 [S2E:VERB] RX 917.4MHz DR3 SF9/BW125 snr=9.8 rssi=-96 xtime=0xD3001BDA761A66 - propdf E0FB9B8FAD0B7A5E98348F8A12246023..0665773286F772246322873613C01449
Aug 13 12:19:05 artichoketech-noarlunga-01 station[656]: 2025-08-13 02:49:05.146 [S2E:VERB] RX 918.2MHz DR2 SF10/BW125 snr=13.5 rssi=-70 xtime=0xD3001BDACE2A29 - updf mhdr=40 DevAddr=260D92DD FCtrl=82 FCnt=3 FOpts=[39A5] 015AC460..D8CA mic=-2025612717 (26 bytes)
Aug 13 12:19:05 artichoketech-noarlunga-01 station[656]: 2025-08-13 02:49:05.400 [SYN:INFO] Time sync qualities: min=201 q90=254 max=530 (previous q90=412)
Aug 13 12:19:05 artichoketech-noarlunga-01 station[656]: 2025-08-13 02:49:05.584 [S2E:DEBU] ::1 diid=76 [ant#0] - next TX start ahead by 4s549ms (02:49:10.133945)
Aug 13 12:19:09 artichoketech-noarlunga-01 station[656]: 2025-08-13 02:49:09.600 [SYN:INFO] PPS/SX130X drift stats: min: -0.3ppm  q50: -0.5ppm  q80: -0.6ppm  max: -0.7ppm - threshold q80: -0.6ppm
Aug 13 12:19:10 artichoketech-noarlunga-01 station[656]: 2025-08-13 02:49:10.114 [S2E:VERB] ::1 diid=76 [ant#0] - starting TX in 19ms889us: 927.5MHz 30.0dBm ant#0(0) DR10 SF10/BW500 frame=60DD920D26870000E9F7E242..370A3E20 (19 bytes)
Aug 13 12:19:10 artichoketech-noarlunga-01 station[656]: 2025-08-13 02:49:10.139 [S2E:INFO] TX ::1 diid=76 [ant#0] - dntxed: 927.5MHz 30.0dBm ant#0(0) DR10 SF10/BW500 frame=60DD920D26870000E9F7E242..370A3E20 (19 bytes)
Aug 13 12:19:10 artichoketech-noarlunga-01 station[656]: 2025-08-13 02:49:10.216 [S2E:DEBU] Tx done diid=76
Aug 13 12:19:26 artichoketech-noarlunga-01 station[656]: 2025-08-13 02:49:26.400 [SYN:INFO] MCU/SX130X drift stats: min: +0.0ppm  q50: +1.0ppm  q80: +3.9ppm  max: +8.9ppm - threshold q90: +6.0ppm
Aug 13 12:19:26 artichoketech-noarlunga-01 station[656]: 2025-08-13 02:49:26.400 [SYN:INFO] Mean MCU drift vs SX130X#0: 1.1ppm

There are no logs from the gateway during an unsuccessful uplink.

I do, however, see frequent “time sync rejected” logs, but the drift stats look pretty good, so I’m hoping this is just normal behaviour.

Aug 13 12:20:24 artichoketech-noarlunga-01 station[656]: 2025-08-13 02:50:24.400 [SYN:VERB] Time sync rejected: quality=251 threshold=217
Aug 13 12:20:26 artichoketech-noarlunga-01 station[656]: 2025-08-13 02:50:26.500 [SYN:VERB] Time sync rejected: quality=225 threshold=217
Aug 13 12:20:30 artichoketech-noarlunga-01 station[656]: 2025-08-13 02:50:30.600 [SYN:VERB] Time sync rejected: quality=229 threshold=217
Aug 13 12:20:52 artichoketech-noarlunga-01 station[656]: 2025-08-13 02:50:52.600 [SYN:VERB] Time sync rejected: quality=785 threshold=217
Aug 13 12:20:59 artichoketech-noarlunga-01 station[656]: 2025-08-13 02:50:59.600 [SYN:VERB] Time sync rejected: quality=226 threshold=217
Aug 13 12:21:01 artichoketech-noarlunga-01 station[656]: 2025-08-13 02:51:01.700 [SYN:INFO] PPS/SX130X drift stats: min: -0.3ppm  q50: -0.5ppm  q80: -0.5ppm  max: -0.7ppm - threshold q80: -0.5ppm
Aug 13 12:21:13 artichoketech-noarlunga-01 station[656]: 2025-08-13 02:51:13.400 [SYN:INFO] MCU/SX130X drift stats: min: +2.2ppm  q50: +4.4ppm  q80: +5.3ppm  max: +6.2ppm - threshold q90: +6.1ppm

I connected the modules together on a custom PCB. I’m using just the standalone ESP-WROOM-32UE module.

LORAWAN_SAVE_BOOTCOUNT is just left over from some old session restore logic where I would save the nonces every 10 boots. I realised this is not ideal, so I used the radiolib-persistence example instead where the nonces are saved to flash after every fresh join.
You can find the full code in the github repo.

The board is powered by a STLQ020 200mA 3.3v regulator. I suppose overcurrent could be an issue it the LoRa module is transmitting at full power, but the ESP doesn’t have any radios turned on. I will test this.

I will also make a second board and report back. I don’t have a heltec module though.

Missing info:

Which LoRa module?

Plus:

There’s not much overhead on a 200mA LDO and the fading away of uplinks is characteristic of a hardware issue - things get warm, particularly in a box, over time and then odd things happen. So I figure the next questions are:

What is the device enclosed in?
If it is enclosed, can you run it out the box?
Can you run it on USB / 500mA supply?

The standard blue SX1276 module that is the first thing that comes up when you google “SX1276”.

It’s in the open air sitting on my desk.
It’s running off USB already, just using the regulator for 3.3v. I’ll try with some external regulator though.

You’re kidding right? Google tailors the search experience and there is no ‘standard blue module’ as there is no standard for the modules.

Here’s what I see:

This thread will be closed very quickly if this is the sort of response that you are going to provide the volunteers taking time out of their day to answer you.

Sorry my bad. Here is a link to the one that I mean (not actually where I bought it from).
https://www.aliexpress.com/item/1005005453557786.html

I couldn’t find any apparent model number and just assumed it was pretty ubiquitous.

My browser is not configured to save cookies. Clearly our search results are very different! :sweat_smile:

2 posts were split to a new topic: Tests for LW 1.1

I have made some new discoveries.

I’m pretty sure deep sleep is not the problem. The issue still seems to persist without it. Sometimes the very first uplink goes missing as well, before any deep sleep even occurs.

I also caught the ESP waking from a brownout on one attempt, but I have not been able to replicate it again. So I think the LDO dipping could be a possibility, but probably a separate problem because:

  • The LDO is in the open air and does not get noticeably hot.
  • I tested the current draw with a multimeter, and it never exceeded ~150mA. Although this probably isn’t very conclusive, as it isn’t exactly capturing every millisecond of the signal, and uplinks are very short.
  • I tried setting the tx power to the lowest (14dB) and the issue still seems to persist.

After some more observations I noticed it’s not so much that uplinks drop after a few packets, but rather they randomly drop around 50% of the time, leading me to further rule out the power supply problem.

I assembled a second board with almost identical components/firmware except that I used an RFM95 module instead of an SX1276. The problem still persisted.

To find out whether this was an issue specific to the node at all, I tested another gateway not owned by me on TTN. In the time that I tested it, the node worked flawlessly! No uplinks were dropped.

So the issue is likely with my gateway, not the node.

To rule out antenna issues, I tried using a small stubby antenna on my gateway instead of the big outdoor one I usually use, and still had the same problem. So the antenna is probably not the issue, but I have a couple more antenna/cable combinations which I will try just to make sure.

Not sure if I should split this off into a new thread since it’s likely a gateway problem? Or if I should just post more information about the gateway here.

Well done narrowing down which bit is the problem - not easy to do with so many moving parts.

Carry on here with your gateway info - make, model, firmware version, how it’s connected to the internet and how it’s powered.

At shorter ranges the antenna is unlikely to be the issue UNLESS you are on top of the gateway with the device - that can overload input stages and cause CRC errors.

So another important question is what is the RSSI & SNR reported when the gateway does hear an uplink and what SF is the device using?

My gateway is a Dragino PG1302 with a Raspberry Pi 4. It’s connected to the internet via Ethernet and powered by a Meanwell 12V power supply with a LM2596 buck/boost.
I’m using basicstation v2.0.6.

I’m getting an SNR of around 12 and RSSI of -81.

My station.conf is as follows:

{
/\* If slave-X.conf present this acts as default settings */
“radio_conf”: {                 /* Actual channel plan is controlled by server */
“device”: “/dev/spidev0.0”,
“pps”: true,
“lorawan_public”: true,      /* is default */
“clksrc”: 0,                 /* radio_0 provides clock to concentrator */
“full_duplex”: false,
“radio_0”: {
/* freq/enable provided by LNS - only HW specific settings listed here */
“type”: “SX1250”,
“rssi_offset”: -215.4,
“rssi_tcomp”: {“coeff_a”: 0, “coeff_b”: 0, “coeff_c”: 20.41, “coeff_d”: 2162.56, “coeff_e”: 0},
“tx_enable”: true,
“antenna_gain”: 10,           /* antenna gain, in dBi */
“tx_gain_lut”:\[
{“rf_power”: 12, “pa_gain”: 0, “pwr_idx”: 15},
{“rf_power”: 13, “pa_gain”: 0, “pwr_idx”: 16},
{“rf_power”: 14, “pa_gain”: 0, “pwr_idx”: 17},
{“rf_power”: 15, “pa_gain”: 0, “pwr_idx”: 19},
{“rf_power”: 16, “pa_gain”: 0, “pwr_idx”: 20},
{“rf_power”: 17, “pa_gain”: 0, “pwr_idx”: 22},
{“rf_power”: 18, “pa_gain”: 1, “pwr_idx”: 1},
{“rf_power”: 19, “pa_gain”: 1, “pwr_idx”: 2},
{“rf_power”: 20, “pa_gain”: 1, “pwr_idx”: 3},
{“rf_power”: 21, “pa_gain”: 1, “pwr_idx”: 4},
{“rf_power”: 22, “pa_gain”: 1, “pwr_idx”: 5},
{“rf_power”: 23, “pa_gain”: 1, “pwr_idx”: 6},
{“rf_power”: 24, “pa_gain”: 1, “pwr_idx”: 7},
{“rf_power”: 25, “pa_gain”: 1, “pwr_idx”: 9},
{“rf_power”: 26, “pa_gain”: 1, “pwr_idx”: 11},
{“rf_power”: 27, “pa_gain”: 1, “pwr_idx”: 14}
\]
},
“radio_1”: {
“type”: “SX1250”,
“rssi_offset”: -215.4,
“rssi_tcomp”: {“coeff_a”: 0, “coeff_b”: 0, “coeff_c”: 20.41, “coeff_d”: 2162.56, “coeff_e”: 0},
“tx_enable”: false
}
/* chan_multiSF_X, chan_Lora_std, chan_FSK provided by LNS */
},
“station_conf”: {
“gps_tty_path”: “/dev/ttyS0”,
“gps”: “/dev/ttyS0”,
“fake_gps”: false,
“pps”: “gps”,
“radio_init”: “rinit.sh”,
“RADIO_INIT_WAIT”: “5s”,
“RX_POLL_INTV”: “10ms”,
“TC_TIMEOUT”: “360s”,
“log_file”:  “stderr”,   /* “station.log” */
“log_level”: “DEBUG”,  /* XDEBUG,DEBUG,VERBOSE,INFO,NOTICE,WARNING,ERROR,CRITICAL \*/
“log_size”:  10000000,
“log_rotate”:  3
}
}