Data-only Hotspot with SX1302 868M LoRaWAN Gateway using Balena

Hello,
Thanks for your detailed guideline about helium-data-hotspot in https://hub.balena.io/marc6/helium-data-hotspot. It’s very helpful
Currently, I have the Pi4 and SX1302 868M LoRaWAN Gateway from this vendor https://www.waveshare.com/wiki/SX1302_868M_LoRaWAN_Gateway
After following your guideline, my device can be up and join the helium blockchain

But when I check the log on Balenacloud → packet-forwarder seems there are still some problems and it always starts with SX1301, I have tried with MODEL=SX1302 but it doesn’t work

helium-data-hotspot_blue-frog-03.10.21_18_24_49_(+0700).txt (80.1 KB)

Here is my configuration for Variables:

  • REGION_OVERRIDE: AS923_2
  • MODEL: SX1302
  • Variants: DIY-PISLGH

Could you please help me check? In case if there are any configurations that should be added, please let me know.

One more question:

  • How can I know the data-only hotspot actually works? Where I can see the log with the package in/out?

Many thanks,

Hello @rikimaru welcome to the balena community!

I have some questions, why did you introduce the VARIANT DIY-PISLGH instead of the DIY-RAK2287? Are you doing this for the reset pin? Did you try to use the 2nd one?

BTW is your LoRa concentrator compatible with AS923 region?

And final question, did you register your Data Only hotspot into the Helium blockchain?

Hi @mpous, thanks for your support

BTW is your LoRa concentrator compatible with the AS923 region?

Yes, it’s compatible.

After trying with

  • REGION_OVERRIDE: AS923_2
  • Variants: DIY-RAK2287

Seems the default Packet Forwarder on Balena just run with SX1301, I still have an error and cannot connect.

So I tried another way → GitHub - RAKWireless/rak_common_for_gateway.

And it works for the moment (SX1302)

That’s weird! i will try to replicate this week @rikimaru and i will keep you updated!

BTW i will try to see if it gets updated automatically to the latest gateway-rs version or not!

@rikimaru how are you? Last weekend i updated the data-only-hostpot repository. Feel free to update your fleet and let me know if that works!

Let’s stay connected

hi @mpous , thanks for your update

After updating to the latest version, the connection with helium network work well

 helium-miner   INFO starting server, key: XXXXXX, version: 1.0.0-alpha.19
 helium-miner   INFO starting, module: gateway
 helium-miner   INFO starting, module: dispatcher
 helium-miner   INFO default router, uri: http://54.176.88.149:8080/, pubkey: 1124CJ9yJaHq4D6ugyPCDnSBzQik61C1BqD9VMh1vsUmjwt16HNB, module: dispatcher
 helium-miner   INFO using gateway, uri: http://3.38.70.101:8080/, pubkey: 11yJXQPG9deHqvw2ac6VWtNP7gZj8X3t3Qb3Gqm9j729p4AsdaA, module: dispatcher
 helium-miner   INFO starting, module: updater
 helium-miner   INFO starting, oui: 14, uri: http://195.201.227.27:8080/, pubkey: 112htAZ4pzbqgsRcVFRN2tVd7dEn1BGpSGpBkRhHrReMDhKJchLe, module: router
 helium-miner   INFO starting, oui: 13, uri: http://46.246.38.248:8080/, pubkey: 115ZS5of9wsV3M5sH3mePp9NVnKayUXG7qT2W7Sn4KJLMzd3eMr, module: router
 helium-miner   INFO starting, oui: 12, uri: http://54.219.236.122:8080/, pubkey: 112ewJNEUfSg3Jvo276tMjzFC2JzmmZcJJ32CWz2fzYqbyCMMTe1, module: router
 helium-miner   INFO starting, oui: 9, uri: http://13.37.13.24:8080/, pubkey: 11afuQSrmk52mgxLu91AdtDXbJ9wmqWBUxC3hvjejoXkxEZfPvY, module: router
 helium-miner   INFO starting, oui: 9, uri: http://44.238.156.97:8080/, pubkey: 11w77YQLhgUt8HUJrMtntGGr97RyXmot1ofs5Ct2ELTmbFoYsQa, module: router
 helium-miner   INFO starting, oui: 6, uri: http://185.34.141.6:8080/, pubkey: 11awcuSbVURPkXX3FbKC7KF6bgEPRZqqPzv1FTEYABMLttUr13E, module: router
 helium-miner   INFO starting, oui: 4, uri: http://54.193.165.228:8080/, pubkey: 11263KvqW3GZPAvag5sQYtBJSjb25azSTSwoi5Tza9kboaLRxcsv, module: router
 helium-miner   INFO starting, oui: 2, uri: http://54.176.88.149:8080/, pubkey: 1124CJ9yJaHq4D6ugyPCDnSBzQik61C1BqD9VMh1vsUmjwt16HNB, module: router
 helium-miner   INFO updated routing to height 1059708, module: dispatcher
 helium-miner   INFO starting, oui: 1, uri: http://52.8.80.146:8080/, pubkey: 112qB3YaH5bZkCnKA5uRH7tBtGNv2Y5B4smv1jsmvGUzgKT71QpE, module: router
 helium-miner   INFO no update found, module: updater

But the package forwarder still have an error

packet-forwarder  INFO: upstream PUSH_DATA time-out is configured to 100 ms
 packet-forwarder  INFO: packets received with a valid CRC will be forwarded
 packet-forwarder  INFO: packets received with a CRC error will NOT be forwarded
 packet-forwarder  INFO: packets received with no CRC will NOT be forwarded
 packet-forwarder  INFO: Reference latitude is configured to 0.000000 deg
 packet-forwarder  INFO: Reference longitude is configured to 0.000000 deg
 packet-forwarder  INFO: Reference altitude is configured to 0 meters
 packet-forwarder  INFO: fake GPS is enabled
 packet-forwarder  ERROR: [main] failed to start the concentrator
 packet-forwarder  Software crashed, restarting
 packet-forwarder  Starting
 packet-forwarder  SX1301
 packet-forwarder  Frequency US915
 packet-forwarder  *** Beacon Packet Forwarder for Lora Gateway ***
 packet-forwarder  Version: 4.0.1
 packet-forwarder  *** Lora concentrator HAL library version info ***
 packet-forwarder  Version: 5.0.1;
 packet-forwarder  ***
 packet-forwarder  INFO: Little endian host
 packet-forwarder  INFO: found global configuration file /opt/iotloragateway/packet_forwarder/sx1301/global_conf.json, parsing it
 packet-forwarder  INFO: /opt/iotloragateway/packet_forwarder/sx1301/global_conf.json does contain a JSON object named SX1301_conf, parsing SX1301 parameters
 packet-forwarder  INFO: lorawan_public 1, clksrc 1
 packet-forwarder  INFO: no configuration for LBT
 packet-forwarder  INFO: antenna_gain 0 dBi
 packet-forwarder  INFO: Configuring TX LUT with 16 indexes
 packet-forwarder  INFO: radio 0 enabled (type SX1257), center frequency 904300000, RSSI offset -159.000000, tx enabled 1, tx_notch_freq 0
 packet-forwarder  INFO: radio 1 enabled (type SX1257), center frequency 905000000, RSSI offset -159.000000, tx enabled 0, tx_notch_freq 0
 packet-forwarder  INFO: Lora multi-SF channel 0>  radio 0, IF -400000 Hz, 125 kHz bw, SF 7 to 12
 packet-forwarder  INFO: Lora multi-SF channel 1>  radio 0, IF -200000 Hz, 125 kHz bw, SF 7 to 12
 packet-forwarder  INFO: Lora multi-SF channel 2>  radio 0, IF 0 Hz, 125 kHz bw, SF 7 to 12
 packet-forwarder  INFO: Lora multi-SF channel 3>  radio 0, IF 200000 Hz, 125 kHz bw, SF 7 to 12
 packet-forwarder  INFO: Lora multi-SF channel 4>  radio 1, IF -300000 Hz, 125 kHz bw, SF 7 to 12
 packet-forwarder  INFO: Lora multi-SF channel 5>  radio 1, IF -100000 Hz, 125 kHz bw, SF 7 to 12
 packet-forwarder  INFO: Lora multi-SF channel 6>  radio 1, IF 100000 Hz, 125 kHz bw, SF 7 to 12
 packet-forwarder  INFO: Lora multi-SF channel 7>  radio 1, IF 300000 Hz, 125 kHz bw, SF 7 to 12
 packet-forwarder  INFO: Lora std channel> radio 0, IF 300000 Hz, 500000 Hz bw, SF 8
 packet-forwarder  INFO: FSK channel 8 disabled
 packet-forwarder  INFO: /opt/iotloragateway/packet_forwarder/sx1301/global_conf.json does contain a JSON object named gateway_conf, parsing gateway parameters
 packet-forwarder  INFO: server hostname or IP address is configured to "helium-miner"
 packet-forwarder  INFO: upstream port is configured to "1680"
 packet-forwarder  INFO: downstream port is configured to "1680"
 packet-forwarder  INFO: downstream keep-alive interval is configured to 10 seconds
 packet-forwarder  INFO: statistics display interval is configured to 30 seconds
 packet-forwarder  INFO: upstream PUSH_DATA time-out is configured to 100 ms
 packet-forwarder  INFO: packets received with a valid CRC will be forwarded
 packet-forwarder  INFO: packets received with a CRC error will NOT be forwarded
 packet-forwarder  INFO: packets received with no CRC will NOT be forwarded
 packet-forwarder  INFO: Reference latitude is configured to 0.000000 deg
 packet-forwarder  INFO: Reference longitude is configured to 0.000000 deg
 packet-forwarder  INFO: Reference altitude is configured to 0 meters
 packet-forwarder  INFO: fake GPS is enabled
 packet-forwarder  INFO: found local configuration file /opt/iotloragateway/packet_forwarder/sx1301/local_conf.json, parsing it
 packet-forwarder  INFO: redefined parameters will overwrite global parameters
 packet-forwarder  INFO: /opt/iotloragateway/packet_forwarder/sx1301/local_conf.json does not contain a JSON object named SX1301_conf
 packet-forwarder  INFO: /opt/iotloragateway/packet_forwarder/sx1301/local_conf.json does contain a JSON object named gateway_conf, parsing gateway parameters
 packet-forwarder  INFO: server hostname or IP address is configured to "helium-miner"
 packet-forwarder  INFO: upstream port is configured to "1680"
 packet-forwarder  INFO: downstream port is configured to "1680"
 packet-forwarder  INFO: downstream keep-alive interval is configured to 10 seconds
 packet-forwarder  INFO: statistics display interval is configured to 30 seconds
 packet-forwarder  INFO: upstream PUSH_DATA time-out is configured to 100 ms
 packet-forwarder  INFO: packets received with a valid CRC will be forwarded
 packet-forwarder  INFO: packets received with a CRC error will NOT be forwarded
 packet-forwarder  INFO: packets received with no CRC will NOT be forwarded
 packet-forwarder  INFO: Reference latitude is configured to 0.000000 deg
 packet-forwarder  INFO: Reference longitude is configured to 0.000000 deg
 packet-forwarder  INFO: Reference altitude is configured to 0 meters
 packet-forwarder  INFO: fake GPS is enabled
 packet-forwarder  ERROR: [main] failed to start the concentrator
 packet-forwarder  Software crashed, restarting

I don’t know why it ran the SX1301.

Here are the logs when I ran with RAK-gateway

pi@rak-gateway:~ $ sudo tail -f /var/log/syslog | grep ttn-gateway

Oct 18 14:15:23 rak-gateway ttn-gateway[431]: *** Packet Forwarder ***
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: Version: 2.0.1
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: *** SX1302 HAL library version info ***
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: Version: 2.0.1;
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: ***
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: Little endian host
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: found configuration file global_conf.json, parsing it
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: global_conf.json does contain a JSON object named SX130x_conf, parsing SX1302 parameters
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: com_type SPI, com_path /dev/spidev0.0, lorawan_public 1, clksrc 0, full_duplex 0
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: antenna_gain 2 dBi
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: Configuring legacy timestamp
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: no configuration for SX1261
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: Configuring Tx Gain LUT for rf_chain 0 with 16 indexes for sx1250
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: radio 0 enabled (type SX1250), center frequency 904300000, RSSI offset -215.399994, tx enabled 1, single input mode 0
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: radio 1 enabled (type SX1250), center frequency 905000000, RSSI offset -215.399994, tx enabled 0, single input mode 0
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: Lora multi-SF channel 0>  radio 0, IF -400000 Hz, 125 kHz bw, SF 5 to 12
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: Lora multi-SF channel 1>  radio 0, IF -200000 Hz, 125 kHz bw, SF 5 to 12
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: Lora multi-SF channel 2>  radio 0, IF 0 Hz, 125 kHz bw, SF 5 to 12
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: Lora multi-SF channel 3>  radio 0, IF 200000 Hz, 125 kHz bw, SF 5 to 12
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: Lora multi-SF channel 4>  radio 1, IF -300000 Hz, 125 kHz bw, SF 5 to 12
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: Lora multi-SF channel 5>  radio 1, IF -100000 Hz, 125 kHz bw, SF 5 to 12
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: Lora multi-SF channel 6>  radio 1, IF 100000 Hz, 125 kHz bw, SF 5 to 12
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: Lora multi-SF channel 7>  radio 1, IF 300000 Hz, 125 kHz bw, SF 5 to 12
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: Lora std channel> radio 0, IF 300000 Hz, 500000 Hz bw, SF 8, Explicit header
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: FSK channel 8 disabled
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: global_conf.json does contain a JSON object named gateway_conf, parsing gateway parameters
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: gateway MAC address is configured to AA555A0000000000
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: server hostname or IP address is configured to "127.0.0.1"
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: upstream port is configured to "1680"
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: downstream port is configured to "1680"
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: downstream keep-alive interval is configured to 10 seconds
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: statistics display interval is configured to 30 seconds
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: upstream PUSH_DATA time-out is configured to 100 ms
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: packets received with a valid CRC will be forwarded
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: packets received with a CRC error will NOT be forwarded
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: packets received with no CRC will NOT be forwarded
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: Reference latitude is configured to 0.000000 deg
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: Reference longitude is configured to 0.000000 deg
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: Reference altitude is configured to 0 meters
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: Beaconing period is configured to 0 seconds
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: Beaconing channel number is set to 8
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: Beaconing channel frequency step is set to 600000Hz
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: Beaconing datarate is set to SF12
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: Beaconing modulation bandwidth is set to 500000Hz
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: Beaconing TX power is set to 27dBm
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: global_conf.json does contain a JSON object named debug_conf, parsing debug parameters
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: got 2 debug reference payload
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: reference payload ID 0 is 0xCAFE1234
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: reference payload ID 1 is 0xCAFE2345
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: setting debug log file name to loragw_hal.log
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: found configuration file local_conf.json, parsing it
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: local_conf.json does contain a JSON object named gateway_conf, parsing gateway parameters
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: gateway MAC address is configured to DCA632FFFE3BC0C1
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: packets received with a valid CRC will be forwarded
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: packets received with a CRC error will NOT be forwarded
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: packets received with no CRC will NOT be forwarded
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: Opening SPI communication interface
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: Note: chip version is 0x10 (v1.0)
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: using legacy timestamp
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: LoRa Service modem: configuring preamble size to 8 symbols
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: ARB: dual demodulation disabled for all SF
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: [main] concentrator started, packet can now be received
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: INFO: concentrator EUI: 0x0016c001ff1c7d82
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: ##### 2021-10-18 14:15:23 GMT #####
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: ### [UPSTREAM] ###
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: # RF packets received by concentrator: 0
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: # CRC_OK: 0.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00%
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: # RF packets forwarded: 0 (0 bytes)
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: # PUSH_DATA datagrams sent: 0 (0 bytes)
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: # PUSH_DATA acknowledged: 0.00%
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: ### [DOWNSTREAM] ###
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: # PULL_DATA sent: 3 (0.00% acknowledged)
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: # PULL_RESP(onse) datagrams received: 0 (0 bytes)
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: # RF packets sent to concentrator: 0 (0 bytes)
Oct 18 14:15:23 rak-gateway ttn-gateway[431]: # TX errors: 0

@rikimaru could you please send me a screenshot of your Device Variables? Thanks

here it’s @mpous

TBH i’m a bit lost of what’s happening here with the detection of your LoRa concentrator @rikimaru

Let me ping @pe1mew who probably can bring some light here as he knows very well this project and we were hacking it on Saturday!

One step you can take is by observing gateway-rs container in the log. every uplink that is received by the gateway is send to gateway-rs container and will print a message like this one:

gatewayrs   INFO uplink @1788162052 us, 868.30 MHz, Ok(DataRate(SF9, BW125)), snr: 10.2, len: 22 from MacAddress(AF:5E:EA:06:13:61:95), module: gateway

Secondly you can use a local LoRaWAN node that is registered to Helium console. There you can see the name of your data-only hotspot when data is received by your data-only hotspot and forwarded to your OUI.

What I have learned last Sunday is that the configuration of the networking between both containers in GitHub - mpous/helium-data-hotspot is not working.
We solved the problem by exposing the containers to the host os, which is depreciated, but works:

  # client
  mpfwd:
    build: ./mp-fwd
    privileged: true
    network_mode: host 
    volumes:
      - 'pktfwdr:/var/pktfwd'

  # "server"
  gatewayrs:
    build: ./hm-gatewayrs
    network_mode: host
    expose:
      - "1680"   
    volumes:
      - 'miner-storage:/var/data'
      - 'miner-log:/var/log/miner'
      - 'pktfwdr:/var/pktfwd'

With this setup, I see data received by gateway-rs container.

My preliminary conclusion is that using the default bridge of docker may cause this issue. A custom bridge may overcome the issue but I have not tested that.

My work in progress is here: GitHub - pe1mew/helium-mp-fwd-light: helium-mp-fwd-light

I hope this answers some questions?

1 Like