Skip to main content
Associate III
April 1, 2025
Question

LoRaWAN Class B – Beacons Not Reaching My End Device

  • April 1, 2025
  • 1 reply
  • 682 views

Hello everyone,

I’m working with I-CUBE-LRWAN on an STM32 B-L072Z-LRWAN1 and trying to configure my end device to operate in Class B mode. However, my device never receives any beacons from the gateway.

Here’s what I have configured so far:
1.In lora_app.h, I set: 

#define LORAWAN_DEFAULT_CLASS CLASS_B
#define LORAWAN_DEFAULT_PING_SLOT_PERIODICITY 3
2. In lorawan_conf.h, I enabled Class B support:
#define LORAMAC_CLASSB_ENABLED 1
I am using EU868 as my active region:
#define REGION_EU868

Despite these configurations, my end device does not receive any beacon frames, and it never switches to Class B.

###### ========== MCPS-Confirm =============
1743497599s993:RX_BC on freq 869525000 Hz at DR 3
1743497600s050:MAC rxTimeOut
1743497600s057:temp= 43

1743497606s056:temp= 43

1743497606s057:VDDA= 254
1743497606s061:TX on freq 867100000 Hz at DR 3
1743497606s078:SEND REQUEST
1743497606s304:MAC txDone
1743497607s294:RX_1 on freq 867100000 Hz at DR 3
1743497607s496:MAC rxDone

I would appreciate any insights on what I might be missing or if there is a known bug in the I-CUBE-LRWAN implementation for Class B.

Has anyone successfully enabled Class B with this setup? Are there any additional steps required beyond these configurations?

Thanks in advance!



1 reply

Andrew Neil
Super User
April 1, 2025

@Mariiian09 wrote:

my device never receives any beacons from the gateway.


Are you certain that the Gateway is actually sending beacons?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Associate III
April 1, 2025

Yes.

Here is the log and the global_conf.json:
Apr 01 09:11:03 Lorank8 lorank8v1[1339]: ### [DOWNSTREAM] ###
Apr 01 09:11:03 Lorank8 lorank8v1[1339]: # PULL_DATA sent: 3 (100.00% acknowledged)
Apr 01 09:11:03 Lorank8 lorank8v1[1339]: # PULL_RESP(onse) datagrams received: 0 (0 bytes)
Apr 01 09:11:03 Lorank8 lorank8v1[1339]: # RF packets sent to concentrator: 0 (0 bytes)
Apr 01 09:11:03 Lorank8 lorank8v1[1339]: # TX errors: 0
Apr 01 09:11:03 Lorank8 lorank8v1[1339]: # BEACON queued: 11
Apr 01 09:11:03 Lorank8 lorank8v1[1339]: # BEACON sent so far: 8
Apr 01 09:11:03 Lorank8 lorank8v1[1339]: # BEACON rejected: 0
Apr 01 09:11:03 Lorank8 lorank8v1[1339]: ### [JIT] ###
Apr 01 09:11:03 Lorank8 lorank8v1[1339]: # SX1301 time (PPS): 1142455798
Apr 01 09:11:03 Lorank8 lorank8v1[1339]: src/jitqueue.c:461:jit_print_queue(): INFO: [jit] queue contains 3 packets:
Apr 01 09:11:03 Lorank8 lorank8v1[1339]: src/jitqueue.c:462:jit_print_queue(): INFO: [jit] queue contains 3 beacons:
Apr 01 09:11:03 Lorank8 lorank8v1[1339]: src/jitqueue.c:465:jit_print_queue(): - node[0]: count_us=1213446926 - type=3
Apr 01 09:11:03 Lorank8 lorank8v1[1339]: src/jitqueue.c:465:jit_print_queue(): - node[1]: count_us=1319446753 - type=3
Apr 01 09:11:03 Lorank8 lorank8v1[1339]: src/jitqueue.c:465:jit_print_queue(): - node[2]: count_us=1499454376 - type=3
Apr 01 09:11:03 Lorank8 lorank8v1[1339]: ### [GPS] ###
Apr 01 09:11:03 Lorank8 lorank8v1[1339]: # Valid time reference (age: 0 sec)
Apr 01 09:11:03 Lorank8 lorank8v1[1339]: # GPS coordinates: latitude 38.97762, longitude -1.85699, altitude 722 m
Apr 01 09:11:03 Lorank8 lorank8v1[1339]: ##### END #####

root@Lorank8:~/lorank8v1# cat global_conf.json
{
"SX1301_conf": {
"lorawan_public": true,
"clksrc": 1, /* radio_1 provides clock to concentrator */
"antenna_gain": 0, /* antenna gain, in dBi */
"radio_0": {
"enable": true,
"type": "SX1257",
"freq": 867500000,
"rssi_offset": -166.0,
"tx_enable": true,
"tx_freq_min": 863000000,
"tx_freq_max": 870000000
},
"radio_1": {
"enable": true,
"type": "SX1257",
"freq": 868500000,
"rssi_offset": -166.0,
"tx_enable": false
},
"chan_multiSF_0": {
/* Lora MAC channel, 125kHz, all SF, 868.1 MHz */
"enable": true,
"radio": 1,
"if": -400000
},
"chan_multiSF_1": {
/* Lora MAC channel, 125kHz, all SF, 868.3 MHz */
"enable": true,
"radio": 1,
"if": -200000
},
"chan_multiSF_2": {
/* Lora MAC channel, 125kHz, all SF, 868.5 MHz */
"enable": true,
"radio": 1,
"if": 0
},
"chan_multiSF_3": {
/* Lora MAC channel, 125kHz, all SF, 867.1 MHz */
"enable": true,
"radio": 0,
"if": -400000
},
"chan_multiSF_4": {
/* Lora MAC channel, 125kHz, all SF, 867.3 MHz */
"enable": true,
"radio": 0,
"if": -200000
},
"chan_multiSF_5": {
/* Lora MAC channel, 125kHz, all SF, 867.5 MHz */
"enable": true,
"radio": 0,
"if": 0
},
"chan_multiSF_6": {
/* Lora MAC channel, 125kHz, all SF, 867.7 MHz */
"enable": true,
"radio": 0,
"if": 200000
},
"chan_multiSF_7": {
/* Lora MAC channel, 125kHz, all SF, 867.9 MHz */
"enable": true,
"radio": 0,
"if": 400000
},
"chan_Lora_std": {
/* Lora MAC channel, 250kHz, SF7, 868.3 MHz */
"enable": true,
"radio": 1,
"if": -200000,
"bandwidth": 250000,
"spread_factor": 7
},
"chan_FSK": {
/* FSK 50kbps channel, 868.8 MHz */
"enable": true,
"radio": 1,
"if": 300000,
"bandwidth": 125000,
"datarate": 50000
},
"tx_lut_0": {
/* TX gain table, index 0 */
"pa_gain": 0,
"mix_gain": 8,
"rf_power": -6,
"dig_gain": 0
},
"tx_lut_1": {
/* TX gain table, index 1 */
"pa_gain": 0,
"mix_gain": 10,
"rf_power": -3,
"dig_gain": 0
},
"tx_lut_2": {
/* TX gain table, index 2 */
"pa_gain": 0,
"mix_gain": 12,
"rf_power": 0,
"dig_gain": 0
},
"tx_lut_3": {
/* TX gain table, index 3 */
"pa_gain": 1,
"mix_gain": 8,
"rf_power": 3,
"dig_gain": 0
},
"tx_lut_4": {
/* TX gain table, index 4 */
"pa_gain": 1,
"mix_gain": 10,
"rf_power": 6,
"dig_gain": 0
},
"tx_lut_5": {
/* TX gain table, index 5 */
"pa_gain": 1,
"mix_gain": 12,
"rf_power": 10,
"dig_gain": 0
},
"tx_lut_6": {
/* TX gain table, index 6 */
"pa_gain": 1,
"mix_gain": 13,
"rf_power": 11,
"dig_gain": 0
},
"tx_lut_7": {
/* TX gain table, index 7 */
"pa_gain": 2,
"mix_gain": 9,
"rf_power": 12,
"dig_gain": 0
},
"tx_lut_8": {
/* TX gain table, index 8 */
"pa_gain": 1,
"mix_gain": 15,
"rf_power": 13,
"dig_gain": 0
},
"tx_lut_9": {
/* TX gain table, index 9 */
"pa_gain": 2,
"mix_gain": 10,
"rf_power": 14,
"dig_gain": 0
},
"tx_lut_10": {
/* TX gain table, index 10 */
"pa_gain": 2,
"mix_gain": 11,
"rf_power": 16,
"dig_gain": 0
},
"tx_lut_11": {
/* TX gain table, index 11 */
"pa_gain": 3,
"mix_gain": 9,
"rf_power": 20,
"dig_gain": 0
}
},

 


"gateway_conf": {
"gateway_ID": "",
/* change with default server address/ports, or overwrite in local_conf.json */
"server_address": "",
"serv_port_up": 1700,
"serv_port_down": 1700,
/* adjust the following parameters for your network */
"keepalive_interval": 10,
"stat_interval": 30,
"push_timeout_ms": 100,
/* forward only valid packets */
"forward_crc_valid": true,
"forward_crc_error": false,
"forward_crc_disabled": false,
/* GPS configuration */
"gps_tty_path": "/dev/ttyS4",
/* GPS reference coordinates */
"ref_latitude": 0.0,
"ref_longitude": 0.0,
"ref_altitude": 0,
/* Beaconing parameters */
"beacon_period": 128,
"beacon_freq_hz": 869525000,
"beacon_datarate": 9,
"beacon_bw_hz": 125000,
"beacon_power": 14,
"beacon_infodesc": 0
}
}


I have a NEO-6M GPS on ttyS4 working correctly, so I'm starting to think the issue might be with the end device. Any ideas are welcome.

Andrew Neil
Super User
April 1, 2025

@Mariiian09 wrote:

I have a NEO-6M GPS on ttyS4 working correctly, 


That's just a GPS module, though - no LoRaWAN.

Do you have any other LoRaWAN device which does see these beacons?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.