Connecting Lorix One Gateway to Chirpstack Gateway Bridge

Hi everyone,

I was trying to connect a Lorix one gateway to the chirpstack gateway server with Basic station. The reason why I use basic station instead of the chripstack packet forward is described in this topic: in this topic.

So I configured my chirpstack server and my gateway and I am able to connect but the gw disconnect straight afterwards:

|station|2020-10-28 17:45:44.736 [TCE:INFO] Connecting to INFOS: ws://mychirpstackserver:3001|
|station|2020-10-28 17:45:44.738 [TCE:INFO] Infos: xxxx xxx ws://mychirpstackserver:3001/gateway/xxxxxxxxxxxxxxxxx|
|station|2020-10-28 17:45:44.742 [TCE:VERB] Connecting to MUXS...|
|station|2020-10-28 17:45:44.743 [TCE:VERB] Connected to MUXS.|
|station|2020-10-28 17:45:44.744 [RAL:ERRO] Unsupported hwspec=sx1301/0|
|station|2020-10-28 17:45:44.744 [any:ERRO] Closing connection to muxs - error in s2e_onMsg|

So according to the error message it looks like chirpstack/basic-station does not support the lorix one gateway: Unsupported hwspec=sx1301/0

Is this correct ? Or did any of you manage to make it working ?

Thanks.

Christoph

The post to which you are linking is related to a RAK 7246G, not LORIX One gateway…

The ChirpStack Gateway Brige does support the Semtech Basic Station forwarder, and which that it should indirectly support the LORIX One gateway…

Unsupported hwspec=sx1301/0

Did you configure the ChirpStack Gateway Bridge propperly with the channel-plan to be used by the Basic Station?

Note that you must uncomment and configure this section:

  # Concentrator configuration.
  #
  # This section contains the configuration for the SX1301 concentrator chips.
  # Example:
  # [[backend.basic_station.concentrators]]
  #
  #   # Multi-SF channel configuration.
  #   [backend.basic_station.concentrators.multi_sf]
  #
  #   # Frequencies (Hz).
  #   frequencies=[
  #     868100000,
  #     868300000,
  #     868500000,
  #     867100000,
  #     867300000,
  #     867500000,
  #     867700000,
  #     867900000,
  #   ]
  #
  #   # LoRa STD channel.
  #   [backend.basic_station.concentrators.lora_std]
  #
  #   # Frequency (Hz).
  #   frequency=868300000
  #
  #   # Bandwidth (Hz).
  #   bandwidth=250000
  #
  #   # Spreading factor.
  #   spreading_factor=7
  #
  #   # FSK channel.
  #   [backend.basic_station.concentrators.fsk]
  #
  #   # Frequency (Hz).
  #   frequency=868800000

Hi @brocaar ,

Thanks for you answers. I am aware that the thread that I posted is related to a different gateway but apparently it is the same issue and it was solved by changing the packet forwarder. What is happening is:

  1. My devices sends the join request
  2. The join request reach the network server
  3. The network server sends an join ack
  4. The device get the ack
  5. Instead of starting to send data the device re-joins

The weird thing is that the device will join at some point. Also, I noticed this behavior on different devices (of different types) meaning that it does not happen all the time. Furthermore, I was investigating what is going on with a Adeunis FTD and a HackerRF device and I could see the following:

On the picture below I used a RAK gateway (I was switching to a different gateway to see if the problem was related to Lorix) with the built-in Network server. So no Chirpstack was used here. The orange packets are uplink’s send by the FTD and the red ones are downlinks. Here everything worked fine.

The picture below shows what happen when I use a RAK gateway (or an Lorix it happens on both) in combination with Chirpstack. In this picture the lower one is the device and the upper one is the ack. What is weird is this big blue box that is send every time when a downlink is send (no matter if Join ACK or ACK).

When looking at this in the logs of the RAK gateway I can see this

The raw json of the messages are:

17:31:18869.525--27CRCLORA4/5SF12BW12539910155C45C-0-{
    "freq": 869525000,
    "mode": "timerstamped",
    "tmst": 144200732,
    "rfch": 0,
    "powe": 27,
    "prea": 8,
    "ncrc": false,
    "modu": "LORA",
    "datr": "SF12BW125",
    "codr": "4/5",
    "ipol": true,
    "size": 12,
    "data": "YFzEVQGgAwC9ENmf"
}{
    "MHDR": {
        "MType": "Unconfirmed Data Down",
        "RFU": 0,
        "Major": 0
    },
    "MACPayload": {
        "FHDR": {
            "DevAddr": "0155C45C",
            "FCtrl": {
                "ADR": true,
                "RFU": 0,
                "FPending": false,
                "ACK": true,
                "FOptsLen": 0
            },
            "FCnt": 3
        }
    },
    "MIC": "BD10D99F"
}17:31:18868.3--14CRCLORA4/5SF8BW1253720155C45C-0-RADIO BUSY{
    "freq": 868300000,
    "mode": "timerstamped",
    "tmst": 143200732,
    "rfch": 0,
    "powe": 14,
    "prea": 8,
    "ncrc": false,
    "modu": "LORA",
    "datr": "SF8BW125",
    "codr": "4/5",
    "ipol": true,
    "size": 12,
    "data": "YFzEVQGgAwC9ENmf"
}{
    "MHDR": {
        "MType": "Unconfirmed Data Down",
        "RFU": 0,
        "Major": 0
    },
    "MACPayload": {
        "FHDR": {
            "DevAddr": "0155C45C",
            "FCtrl": {
                "ADR": true,
                "RFU": 0,
                "FPending": false,
                "ACK": true,
                "FOptsLen": 0
            },
            "FCnt": 3
        }
    },
    "MIC": "BD10D99F"
}17:31:18868.3--14CRCLORA4/5SF8BW1253720155C45C-0-{
    "freq": 868300000,
    "mode": "timerstamped",
    "tmst": 143200732,
    "rfch": 0,
    "powe": 14,
    "prea": 8,
    "ncrc": false,
    "modu": "LORA",
    "datr": "SF8BW125",
    "codr": "4/5",
    "ipol": true,
    "size": 12,
    "data": "YFzEVQGgAwC9ENmf"
}{
    "MHDR": {
        "MType": "Unconfirmed Data Down",
        "RFU": 0,
        "Major": 0
    },
    "MACPayload": {
        "FHDR": {
            "DevAddr": "0155C45C",
            "FCtrl": {
                "ADR": true,
                "RFU": 0,
                "FPending": false,
                "ACK": true,
                "FOptsLen": 0
            },
            "FCnt": 3
        }
    },
    "MIC": "BD10D99F"
}17:31:18868.3-3111.3-CRC_OKLORA4/5SF8BW1254930155C45C18-{
    "freq": 868300000,
    "chan": 6,
    "tmst": 142200732,
    "utmms": 1603292341477,
    "rfch": 1,
    "stat": 1,
    "rssi": -31,
    "size": 21,
    "modu": "LORA",
    "datr": "SF8BW125",
    "codr": "4/5",
    "lsnr": 11.3,
    "data": "gFzEVQEABAABinfQyRNrIp5DlpNN"
}{
    "MHDR": {
        "MType": "Confirmed Data Up",
        "RFU": 0,
        "Major": 0
    },
    "MACPayload": {
        "FHDR": {
            "DevAddr": "0155C45C",
            "FCtrl": {
                "ADR": false,
                "ADRACKReq": false,
                "ClassB": false,
                "ACK": false,
                "FOptsLen": 0
            },
            "FCnt": 4
        },
        "FPort": 1,
        "FRMPayload": "01 8A 77 D0 C9 13 6B 22 "
    },
    "MIC": "4396934D"
}

The interesting part is that Chirpstacks sends to messages on Rx1 on the exact same time (143200732) and since the gaetway then see that this is already busy it retires on Rx2 a second later. So it looks like this big blue box is Rx2. The question is why is the Ack send twice on Rx1

What I actually want to achieve is to get rid of this weird join/loop behavior. Since I had the issues with the chirpstack packet forwarder I was thinking that the issue was relate to that which is why I wanted to switch to Basic Station.

In fact I did not. I applied this changes but unfortunately I still cannot connect to Chirpstack via basic station.

Here the log of my Lorix One Gateway (with OS 1.2.0):

|station|2020-11-06 15:44:33.321 [SYS:INFO] Logging : stderr (maxsize=10485760, rotate=3)|
|---|---|
|station|2020-11-06 15:44:33.326 [SYS:INFO] Station Ver : 2.0.5(lorix/std) 2020-10-30 10:25:04|
|station|2020-11-06 15:44:33.329 [SYS:INFO] Package Ver : (null)|
|station|2020-11-06 15:44:33.341 [SYS:INFO] proto EUI : 0:fcc2:3d0f:3a2f (/sys/class/net/eth0/address)|
|station|2020-11-06 15:44:33.344 [SYS:INFO] prefix EUI : ::1 (builtin)|
|station|2020-11-06 15:44:33.346 [SYS:INFO] Station EUI : fcc2:3dff:fe0f:3a2f|
|station|2020-11-06 15:44:33.347 [SYS:INFO] Station home: ./ (builtin)|
|station|2020-11-06 15:44:33.350 [SYS:INFO] Station temp: /var/tmp/ (builtin)|
|station|2020-11-06 15:44:33.351 [SYS:WARN] Station in NO-CUPS mode|
|station|2020-11-06 15:44:33.559 [TCE:INFO] Starting TC engine|
|station|2020-11-06 15:44:33.570 [TCE:INFO] Connecting to INFOS: ws://chirpstack:3001|
|station|2020-11-06 15:44:33.573 [TCE:INFO] Infos: fcc2:3dff:fe0f:3a2f fcc2:3dff:fe0f:3a2f ws://chirpstack:3001/gateway/fcc...2f|
|station|2020-11-06 15:44:33.578 [TCE:VERB] Connecting to MUXS...|
|station|2020-11-06 15:44:33.578 [TCE:VERB] Connected to MUXS.|
|station|2020-11-06 15:44:33.581 [RAL:INFO] Lora gateway library version: Version: 5.0.1;|
|station|2020-11-06 15:44:33.599 [RAL:VERB] Connecting to device: /dev/spidev0.0|
|station|2020-11-06 15:44:33.599 [RAL:VERB] SX1301 txlut 0: dig_gain=1 pa_gain=0 dac_gain=3 mix_gain=9 rf_power=-6|
|station|2020-11-06 15:44:33.599 [RAL:VERB] SX1301 txlut 1: dig_gain=0 pa_gain=0 dac_gain=3 mix_gain=10 rf_power=-3|
|station|2020-11-06 15:44:33.599 [RAL:VERB] SX1301 txlut 2: dig_gain=2 pa_gain=1 dac_gain=3 mix_gain=8 rf_power=0|
|station|2020-11-06 15:44:33.599 [RAL:VERB] SX1301 txlut 3: dig_gain=3 pa_gain=1 dac_gain=3 mix_gain=11 rf_power=3|
|station|2020-11-06 15:44:33.600 [RAL:VERB] SX1301 txlut 4: dig_gain=3 pa_gain=1 dac_gain=3 mix_gain=13 rf_power=6|
|station|2020-11-06 15:44:33.600 [RAL:VERB] SX1301 txlut 5: dig_gain=0 pa_gain=1 dac_gain=3 mix_gain=13 rf_power=10|
|station|2020-11-06 15:44:33.600 [RAL:VERB] SX1301 txlut 6: dig_gain=1 pa_gain=1 dac_gain=3 mix_gain=15 rf_power=11|
|station|2020-11-06 15:44:33.600 [RAL:VERB] SX1301 txlut 7: dig_gain=2 pa_gain=2 dac_gain=3 mix_gain=10 rf_power=12|
|station|2020-11-06 15:44:33.600 [RAL:VERB] SX1301 txlut 8: dig_gain=1 pa_gain=2 dac_gain=3 mix_gain=10 rf_power=13|
|station|2020-11-06 15:44:33.600 [RAL:VERB] SX1301 txlut 9: dig_gain=2 pa_gain=2 dac_gain=3 mix_gain=11 rf_power=14|
|station|2020-11-06 15:44:33.600 [RAL:VERB] SX1301 txlut 10: dig_gain=0 pa_gain=2 dac_gain=3 mix_gain=11 rf_power=16|
|station|2020-11-06 15:44:33.600 [RAL:VERB] SX1301 txlut 11: dig_gain=2 pa_gain=2 dac_gain=3 mix_gain=15 rf_power=20|
|station|2020-11-06 15:44:33.600 [RAL:VERB] SX1301 txlut 12: dig_gain=1 pa_gain=3 dac_gain=3 mix_gain=10 rf_power=23|
|station|2020-11-06 15:44:33.600 [RAL:VERB] SX1301 txlut 13: dig_gain=1 pa_gain=3 dac_gain=3 mix_gain=11 rf_power=25|
|station|2020-11-06 15:44:33.600 [RAL:VERB] SX1301 txlut 14: dig_gain=0 pa_gain=3 dac_gain=3 mix_gain=11 rf_power=26|
|station|2020-11-06 15:44:33.600 [RAL:VERB] SX1301 txlut 15: dig_gain=3 pa_gain=3 dac_gain=3 mix_gain=15 rf_power=27|
|station|2020-11-06 15:44:33.600 [RAL:VERB] SX1301 rxrfchain 0: enable=1 freq=867.5MHz rssi_offset=-164.000000 type=2 tx_enable=1 tx_notch_freq=0|
|station|2020-11-06 15:44:33.600 [RAL:VERB] SX1301 rxrfchain 1: enable=1 freq=868.5MHz rssi_offset=-164.000000 type=2 tx_enable=0 tx_notch_freq=0|
|station|2020-11-06 15:44:33.600 [RAL:VERB] SX1301 ifchain 0: enable=1 rf_chain=0 freq=-400000 bandwidth=0 datarate=0 sync_word=0/0|
|station|2020-11-06 15:44:33.600 [RAL:VERB] SX1301 ifchain 1: enable=1 rf_chain=0 freq=-200000 bandwidth=0 datarate=0 sync_word=0/0|
|station|2020-11-06 15:44:33.600 [RAL:VERB] SX1301 ifchain 2: enable=1 rf_chain=0 freq=0 bandwidth=0 datarate=0 sync_word=0/0|
|station|2020-11-06 15:44:33.600 [RAL:VERB] SX1301 ifchain 3: enable=1 rf_chain=0 freq=200000 bandwidth=0 datarate=0 sync_word=0/0|
|station|2020-11-06 15:44:33.601 [RAL:VERB] SX1301 ifchain 4: enable=1 rf_chain=0 freq=400000 bandwidth=0 datarate=0 sync_word=0/0|
|station|2020-11-06 15:44:33.601 [RAL:VERB] SX1301 ifchain 5: enable=1 rf_chain=1 freq=-400000 bandwidth=0 datarate=0 sync_word=0/0|
|station|2020-11-06 15:44:33.601 [RAL:VERB] SX1301 ifchain 6: enable=1 rf_chain=1 freq=-200000 bandwidth=0 datarate=0 sync_word=0/0|
|station|2020-11-06 15:44:33.601 [RAL:VERB] SX1301 ifchain 7: enable=1 rf_chain=1 freq=0 bandwidth=0 datarate=0 sync_word=0/0|
|station|2020-11-06 15:44:33.601 [RAL:VERB] SX1301 ifchain 8: enable=1 rf_chain=1 freq=-200000 bandwidth=2 datarate=2 sync_word=0/0|
|station|2020-11-06 15:44:33.601 [RAL:VERB] SX1301 ifchain 9: enable=1 rf_chain=0 freq=0 bandwidth=0 datarate=0 sync_word=0/0|
|station|2020-11-06 15:44:33.601 [RAL:VERB] SX130x LBT not enabled|
|station|2020-11-06 15:44:33.601 [RAL:VERB] Station device: /dev/spidev0.0 (PPS capture disabled)|
|station|2020-11-06 15:44:36.554 [RAL:VERB] Concentrator started (2s947ms)|
|station|2020-11-06 15:44:36.554 [S2E:INFO] Configuring for region: EU863 -- 863.0MHz..870.0MHz|
|station|2020-11-06 15:44:36.555 [S2E:VERB] DR0 SF12/BW125|
|station|2020-11-06 15:44:36.555 [S2E:VERB] DR1 SF11/BW125|
|station|2020-11-06 15:44:36.555 [S2E:VERB] DR2 SF10/BW125|
|station|2020-11-06 15:44:36.555 [S2E:VERB] DR3 SF9/BW125|
|station|2020-11-06 15:44:36.555 [S2E:VERB] DR4 SF8/BW125|
|station|2020-11-06 15:44:36.555 [S2E:VERB] DR5 SF7/BW125|
|station|2020-11-06 15:44:36.555 [S2E:VERB] DR6 SF7/BW250|
|station|2020-11-06 15:44:36.555 [S2E:VERB] DR7 FSK|
|station|2020-11-06 15:44:36.555 [S2E:VERB] DR8 undefined|
|station|2020-11-06 15:44:36.555 [S2E:VERB] DR9 undefined|
|station|2020-11-06 15:44:36.555 [S2E:VERB] DR10 undefined|
|station|2020-11-06 15:44:36.555 [S2E:VERB] DR11 undefined|
|station|2020-11-06 15:44:36.555 [S2E:VERB] DR12 undefined|
|station|2020-11-06 15:44:36.555 [S2E:VERB] DR13 undefined|
|station|2020-11-06 15:44:36.555 [S2E:VERB] DR14 undefined|
|station|2020-11-06 15:44:36.555 [S2E:VERB] DR15 undefined|
|station|2020-11-06 15:44:36.555 [S2E:VERB] TX power: 16.0 dBm EIRP|
|station|2020-11-06 15:44:36.555 [S2E:VERB] 27.0 dBm EIRP for 869.4MHz..869.65MHz|
|station|2020-11-06 15:44:36.555 [S2E:VERB] JoinEui list: 0 entries|
|station|2020-11-06 15:44:36.555 [S2E:VERB] NetID filter: FFFFFFFF-FFFFFFFF-FFFFFFFF-FFFFFFFF|
|station|2020-11-06 15:44:36.555 [S2E:VERB] Dev/test settings: nocca=0 nodc=0 nodwell=0|

Below the configuration of my gateway-bridge (everything is running in one single docker):

[backend]
  type="basic_station"
  [backend.basic_station]
    bind=":3001"
    stats_interval="30s"
    ping_interval="1m0s"
    read_timeout="1m5s"
    write_timeout="1s"
    region="EU868"
    frequency_min=863000000
    frequency_max=870000000

   [[backend.basic_station.concentrators]]
     [backend.basic_station.concentrators.multi_sf]
     frequencies=[
       868100000,
       868300000,
       868500000,
       867100000,
       867300000,
       867500000,
       867700000,
       867900000,
     ]
    [backend.basic_station.concentrators.lora_std]
     frequency=868300000
     bandwidth=250000
     spreading_factor=7
     [backend.basic_station.concentrators.fsk]
     frequency=868800000


[integration.mqtt.auth.generic]
  servers=["tcp://mosquitto:1883"]
  username=""
  password=""

Apparently this only happens on the join ACK and not on a regular down-link (tested with confirmed data up).