RAK2287 Problems receiving some devices like Cubecells

I’ve been chasing this for months and going back and forth trying to figure out the issue. Basically this Spring I replaced my gateway with a RAK2287 using the Pi Hat running Ubuntu and I used the RAK scripts to set it up. The gateway appears to work normally, except some devices like Cubecells very rarely work with it (occasionally I see a join, but not often). I had thought it was a Cubecell issue until this week I picked up a TTIG, and even at several hundred feet away, sitting on the floor in a bad spot, it’s the only gateway seeing the Cubecells (and they work 100% of the time with the TTIG). I have some Dragino sensors/devices, and some Heltec ESP32 based ones with SX1276 working fine with the RAK2287 based gateway. I also am in a rural area, so the only gateways remotely close to me are these only two I have.

  • Both Gateways set to US915 TTN
  • Cubecells set to US915 board_build.arduino.lorawan.region = US915 and a userChannelsMask[6]={ 0xFF00, 0x0000,0x0000,0x0000,0x0000,0x0000 };
  • Moving around the Cubecell from close to 100s of feet away makes no difference for RAK2287 reception
  • Watching the log output on the Cubcell, it’s transmit to join frequencies appear to be the correct channels when it can’t connect

I feel like I may have a configuration issues on the RAK2287 or TTN registration side as the TTIG works fine, but stumped at what it is. Would appreciate any feedback/suggestions, thank you!

global_conf.json

{
    "SX130x_conf": {
        "com_type": "SPI",
        "com_path": "/dev/spidev0.0",
        "lorawan_public": true,
        "clksrc": 0,
        "antenna_gain": 0, /* antenna gain, in dBi */
        "full_duplex": false,
        "fine_timestamp": {
            "enable":false,
            "mode": "all_sf" /* high_capacity or all_sf */
        },
        "radio_0": {
            "enable": true,
            "type": "SX1250",
            "freq": 904300000,
            "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,
            "tx_freq_min": 923000000,
            "tx_freq_max": 928000000,
            "tx_gain_lut":[
                {"rf_power": 12, "pa_gain": 1, "pwr_idx": 6},
                {"rf_power": 13, "pa_gain": 1, "pwr_idx": 7},
                {"rf_power": 14, "pa_gain": 1, "pwr_idx": 8},
                {"rf_power": 15, "pa_gain": 1, "pwr_idx": 9},
                {"rf_power": 16, "pa_gain": 1, "pwr_idx": 10},
                {"rf_power": 17, "pa_gain": 1, "pwr_idx": 11},
                {"rf_power": 18, "pa_gain": 1, "pwr_idx": 12},
                {"rf_power": 19, "pa_gain": 1, "pwr_idx": 13},
                {"rf_power": 20, "pa_gain": 1, "pwr_idx": 14},
                {"rf_power": 21, "pa_gain": 1, "pwr_idx": 15},
                {"rf_power": 22, "pa_gain": 1, "pwr_idx": 16},
                {"rf_power": 23, "pa_gain": 1, "pwr_idx": 17},
                {"rf_power": 24, "pa_gain": 1, "pwr_idx": 18},
                {"rf_power": 25, "pa_gain": 1, "pwr_idx": 19},
                {"rf_power": 26, "pa_gain": 1, "pwr_idx": 21},
                {"rf_power": 27, "pa_gain": 1, "pwr_idx": 22}
            ]
        },
        "radio_1": {
            "enable": true,
            "type": "SX1250",
            "freq": 905000000,
            "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_All": {"spreading_factor_enable": [ 5, 6, 7, 8, 9, 10, 11, 12 ]},
        "chan_multiSF_0": {"enable": true, "radio": 0, "if": -400000},  /* Freq : 903.9 MHz*/
        "chan_multiSF_1": {"enable": true, "radio": 0, "if": -200000},  /* Freq : 904.1 MHz*/
        "chan_multiSF_2": {"enable": true, "radio": 0, "if":  0},       /* Freq : 904.3 MHz*/
        "chan_multiSF_3": {"enable": true, "radio": 0, "if":  200000},  /* Freq : 904.5 MHz*/
        "chan_multiSF_4": {"enable": true, "radio": 1, "if": -300000},  /* Freq : 904.7 MHz*/
        "chan_multiSF_5": {"enable": true, "radio": 1, "if": -100000},  /* Freq : 904.9 MHz*/
        "chan_multiSF_6": {"enable": true, "radio": 1, "if":  100000},  /* Freq : 905.1 MHz*/
        "chan_multiSF_7": {"enable": true, "radio": 1, "if":  300000},  /* Freq : 905.3 MHz*/
        "chan_Lora_std":  {"enable": true, "radio": 0, "if":  300000, "bandwidth": 500000, "spread_factor": 8,						/* Freq : 904.6 MHz*/
                           "implicit_hdr": false, "implicit_payload_length": 17, "implicit_crc_en": false, "implicit_coderate": 1},
        "chan_FSK":       {"enable": false, "radio": 1, "if":  300000, "bandwidth": 125000, "datarate": 50000}						/* Freq : 868.8 MHz*/
    },

    "gateway_conf": {
	"gateway_ID": "REMOVED",
 	"server_address": "nam1.cloud.thethings.network",
        "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/ttyS0",
        /* GPS reference coordinates */
        "ref_latitude": 0.0,
        "ref_longitude": 0.0,
        "ref_altitude": 0,
        /* Beaconing parameters */
        "beacon_period": 0,	/* disable class B beacon, set to 128 enable beacon */
        "beacon_freq_hz": 923300000, 
        "beacon_freq_nb": 8, 
        "beacon_freq_step": 600000, 
        "beacon_datarate": 12, 
        "beacon_bw_hz": 500000, 
        "beacon_power": 27
    },

    "debug_conf": {
        "ref_payload":[
            {"id": "0xCAFE1234"},
            {"id": "0xCAFE2345"}
        ],
        "log_file": "loragw_hal.log"
    }
}

Gateway log:

*** Packet Forwarder ***
Version: 2.0.1
*** SX1302 HAL library version info ***
Version: 2.0.1;
***
INFO: Little endian host
INFO: found configuration file global_conf.json, parsing it
INFO: global_conf.json does contain a JSON object named SX130x_conf, parsing SX1302 parameters
INFO: com_type SPI, com_path /dev/spidev0.0, lorawan_public 1, clksrc 0, full_duplex 0
INFO: antenna_gain 0 dBi
INFO: Configuring legacy timestamp
INFO: no configuration for SX1261
INFO: Configuring Tx Gain LUT for rf_chain 0 with 16 indexes for sx1250
INFO: radio 0 enabled (type SX1250), center frequency 904300000, RSSI offset -215.399994, tx enabled 1, single input mode 0
INFO: radio 1 enabled (type SX1250), center frequency 905000000, RSSI offset -215.399994, tx enabled 0, single input mode 0
INFO: Lora multi-SF channel 0>  radio 0, IF -400000 Hz, 125 kHz bw, SF 5 to 12
INFO: Lora multi-SF channel 1>  radio 0, IF -200000 Hz, 125 kHz bw, SF 5 to 12
INFO: Lora multi-SF channel 2>  radio 0, IF 0 Hz, 125 kHz bw, SF 5 to 12
INFO: Lora multi-SF channel 3>  radio 0, IF 200000 Hz, 125 kHz bw, SF 5 to 12
INFO: Lora multi-SF channel 4>  radio 1, IF -300000 Hz, 125 kHz bw, SF 5 to 12
INFO: Lora multi-SF channel 5>  radio 1, IF -100000 Hz, 125 kHz bw, SF 5 to 12
INFO: Lora multi-SF channel 6>  radio 1, IF 100000 Hz, 125 kHz bw, SF 5 to 12
INFO: Lora multi-SF channel 7>  radio 1, IF 300000 Hz, 125 kHz bw, SF 5 to 12
INFO: Lora std channel> radio 0, IF 300000 Hz, 500000 Hz bw, SF 8, Explicit header
INFO: FSK channel 8 disabled
INFO: global_conf.json does contain a JSON object named gateway_conf, parsing gateway parameters
INFO: gateway MAC address is configured to REMOVED
INFO: server hostname or IP address is configured to "nam1.cloud.thethings.network"
INFO: upstream port is configured to "1700"
INFO: downstream port is configured to "1700"
INFO: downstream keep-alive interval is configured to 10 seconds
INFO: statistics display interval is configured to 30 seconds
INFO: upstream PUSH_DATA time-out is configured to 100 ms
INFO: packets received with a valid CRC will be forwarded
INFO: packets received with a CRC error will NOT be forwarded
INFO: packets received with no CRC will NOT be forwarded
INFO: GPS serial port path is configured to "/dev/ttyS0"
INFO: Reference latitude is configured to 0.000000 deg
INFO: Reference longitude is configured to 0.000000 deg
INFO: Reference altitude is configured to 0 meters
INFO: Beaconing period is configured to 0 seconds
INFO: Beaconing signal will be emitted at 923300000 Hz
INFO: Beaconing channel number is set to 8
INFO: Beaconing channel frequency step is set to 600000Hz
INFO: Beaconing datarate is set to SF12
INFO: Beaconing modulation bandwidth is set to 500000Hz
INFO: Beaconing TX power is set to 27dBm
INFO: global_conf.json does contain a JSON object named debug_conf, parsing debug parameters
INFO: got 2 debug reference payload
INFO: reference payload ID 0 is 0xCAFE1234
INFO: reference payload ID 1 is 0xCAFE2345
INFO: setting debug log file name to loragw_hal.log
INFO: found configuration file local_conf.json, parsing it
INFO: local_conf.json does contain a JSON object named gateway_conf, parsing gateway parameters
INFO: gateway MAC address is configured to REMOVED
INFO: server hostname or IP address is configured to "nam1.cloud.thethings.network"
INFO: packets received with a valid CRC will be forwarded
INFO: packets received with a CRC error will be forwarded
INFO: packets received with no CRC will be forwarded
INFO: GPS serial port path is configured to "/dev/ttyS0"
This is uart for GPS.
INFO: [main] TTY port /dev/ttyS0 open for GPS synchronization
CoreCell reset through GPIO17...
Opening SPI communication interface
Note: chip version is 0x10 (v1.0)
INFO: using legacy timestamp
INFO: LoRa Service modem: configuring preamble size to 8 symbols
ARB: dual demodulation disabled for all SF
INFO: found temperature sensor on port 0x39
INFO: [main] concentrator started, packet can now be received
INFO: concentrator EUI: REMOVED
WARNING: [gps] GPS out of sync, keeping previous time reference
WARNING: [gps] GPS out of sync, keeping previous time reference
INFO: [down] PULL_ACK received in 70 ms
INFO: [modify_os_time] local_time=1635103486, gps_time=1635103482
INFO: [modify_os_time] The difference between the system time(1635103486) and the GPS time(1635103482) is less than 10 seconds. Use the system time.
INFO: [down] PULL_ACK received in 71 ms
WARNING: [gps] GPS out of sync, keeping previous time reference

What I see on Heltec Cubecell’s with the TTIG shut off:

Copyright @ 2019 Heltec Automation.All rights reserved.
Interrupts attached

AT Rev 1.3
+AutoLPM=1

+LORAWAN=1

+KeepNet=0
+OTAA=1
+Class=A
+ADR=0
+IsTxConfirmed=1
+AppPort=2
+DutyCycle=1200000
+ConfirmedNbTrials=4
+ChMask=00000000000000000000FF00
(Device info removed)

LoRaWAN US915 Class A start!

joining...TX on freq 904700000 Hz at DR 3 power 20 dBm
TX on freq 904700000 Hz at DR 3 power 20 dBm
Event : Tx Done
RX on freq 925700000 Hz at DR 13
Event : Rx Timeout
RX on freq 923300000 Hz at DR 8
Event : Rx Timeout
TX on freq 904500000 Hz at DR 0 power 20 dBm
TX on freq 904500000 Hz at DR 0 power 20 dBm
Event : Tx Done
RX on freq 925100000 Hz at DR 10
Event : Rx Timeout
RX on freq 923300000 Hz at DR 8
Event : Rx Timeout
TX on freq 904900000 Hz at DR 3 power 20 dBm
TX on freq 904900000 Hz at DR 3 power 20 dBm
Event : Tx Done

You should watch the gateway logs while the nodes are operating

Thanks for the reply! That’s the thing… I often don’t ever see it showing up in the gateway log. I’ll let it run for awhile (seems like 1 out of 40 or 50 attempts hits the gateway) and see if I can grab that.

Is the antenna lead connected to the card?

Any chance the LoRa antenna is connected to the on-board GPS receiver’s antenna connector rather than the LoRa one?

If you do get a packet showing up, looking at its RSSI would be good.

You show it set to the public preamble, which would be the other big suspect.

Antenna connections look correct, (I tried changing out the omni antenna for a cheap one to see, and could see RSSI change as I expected.) The RSSI for one of the Dragino sensors a few moments ago was -78, which is about 100 feet away or so.

However the public preamble I may be missing, where do you see that’s not set and what should it be? Thank you!

You config file shows that it is set to the public preamble (for a public network)

I apologize for asking as confused. If I wanted to make the LoRa gateway public for others, isn’t that what I would want? Also is that that that lorawan_public setting in the json? Thank you!