Helium Data-Only Hotspot project - packet forwarder keeps restarting?


Hi - I thought I’d try out the Helium Hotspot project as detailed in a recent blog post. I followed through all the steps and everything seemed to go fine, my hotspot is showing up in Helium explorer but no data activity is showing up. Looking at the logs on Balena dashboard it seems that the packet-forwarder service isn’t happy and keeps restarting?

The Helium-miner service seems to be running fine.

The hardware I’m using is this:
PiHut SX1302 LoRaWAN gateway

Have attached a screenshot of my variables and what I think are the critical bits of the packet-forwarder service log files. Feel I must be missing something silly here if anybody has any ideas? thanks…

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 2022-06-12 19:52:30,856 - [WARNING] - pktfwd.utils - (utils.py).retry_start_concentrator – /opt/pktfwd/utils.py:(226) - lora_pkt_fwd stopped with code=1.
packet-forwarder 2022-06-12 19:52:30,858 - [WARNING] - pktfwd.pktfwd_app - (pktfwd_app.py).start – /opt/pktfwd/pktfwd_app.py:(59) - Shutting down concentrator.
packet-forwarder 2022-06-12 19:52:30,859 - [DEBUG] - pktfwd.pktfwd_app - (pktfwd_app.py).stop – /opt/pktfwd/pktfwd_app.py:(79) - STOPPING PKTFWD
packet-forwarder 2022-06-12 19:52:30,863 - [INFO] - main - (main.py).start – /opt/pktfwd/main.py:(106) - Stopping and cleaning up pktfwd
packet-forwarder 2022-06-12 19:52:30,864 - [DEBUG] - pktfwd.pktfwd_app - (pktfwd_app.py).stop – /opt/pktfwd/pktfwd_app.py:(79) - STOPPING PKTFWD
packet-forwarder 2022-06-12 19:52:35,319 - [DEBUG] - main - (main.py).validate_env – /opt/pktfwd/main.py:(63) - Starting with the following ENV:
packet-forwarder VARIANT=DIY-RAK2287
packet-forwarder REGION_OVERRIDE=EU868
packet-forwarder REGION_FILEPATH=/var/pktfwd/region
packet-forwarder SX1301_REGION_CONFIGS_DIR=/opt/pktfwd/config/lora_templates_sx1301
packet-forwarder SX1302_REGION_CONFIGS_DIR=/opt/pktfwd/config/lora_templates_sx1302
packet-forwarder SENTRY_KEY=False
packet-forwarder BALENA_ID=2404e35ddf56e9d844556e368792ab67
packet-forwarder BALENA_APP=helium-data-hotspot
packet-forwarder DIAGNOSTICS_FILEPATH=/var/pktfwd/diagnostics
packet-forwarder AWAIT_SYSTEM_SLEEP_SECONDS=5
packet-forwarder RESET_LGW_FILEPATH=/opt/reset_lgw.sh
packet-forwarder UTIL_CHIP_ID_FILEPATH=/opt/sx1302/chip_id
packet-forwarder ROOT_DIR=/opt
packet-forwarder SX1302_LORA_PKT_FWD_FILEPATH=/opt/sx1302/lora_pkt_fwd
packet-forwarder SX1301_LORA_PKT_FWD_DIR=/opt/sx1301
packet-forwarder
packet-forwarder 2022-06-12 19:52:35,321 - [DEBUG] - pktfwd.pktfwd_app - (pktfwd_app.py).set_variant_attributes – /opt/pktfwd/pktfwd_app.py:(91) - Variant DIY-RAK2287 set with reset_pin 17 and spi_bus spidev0.0
packet-forwarder 2022-06-12 19:52:35,321 - [DEBUG] - pktfwd.pktfwd_app - (pktfwd_app.py).start – /opt/pktfwd/pktfwd_app.py:(39) - STARTING PKTFWD
packet-forwarder 2022-06-12 19:52:35,324 - [DEBUG] - hm_pyhelper.miner_param - (miner_param.py).await_spi_available – /opt/pktfwd-dependencies/hm_pyhelper/miner_param.py:(217) - SPI bus spidev0.0 Configured Correctly
packet-forwarder 2022-06-12 19:52:35,325 - [DEBUG] - pktfwd.pktfwd_app - (pktfwd_app.py).prepare_to_start – /opt/pktfwd/pktfwd_app.py:(73) - Region set to EU868
packet-forwarder 2022-06-12 19:52:35,326 - [DEBUG] - pktfwd.utils - (utils.py).await_system_ready – /opt/pktfwd/utils.py:(53) - Waiting 5 seconds for systems to be ready
packet-forwarder 2022-06-12 19:52:40,332 - [DEBUG] - pktfwd.utils - (utils.py).await_system_ready – /opt/pktfwd/utils.py:(55) - System now ready
packet-forwarder 2022-06-12 19:52:40,333 - [DEBUG] - pktfwd.pktfwd_app - (pktfwd_app.py).prepare_to_start – /opt/pktfwd/pktfwd_app.py:(76) - Finished preparing pktfwd
packet-forwarder 2022-06-12 19:52:41,991 - [DEBUG] - pktfwd.utils - (utils.py).is_concentrator_sx1302 – /opt/pktfwd/utils.py:(82) - Command ‘[’/opt/sx1302/chip_id’, ‘-d’, ‘/dev/spidev0.0’]’ returned non-zero exit status 1.
packet-forwarder 2022-06-12 19:52:41,992 - [DEBUG] - pktfwd.utils - (utils.py).replace_sx1301_global_conf_with_regional – /opt/pktfwd/utils.py:(131) - Copying SX1301 global conf from /opt/pktfwd/config/lora_templates_sx1301/EU-global_conf.json to /opt/global_conf.json
packet-forwarder 2022-06-12 19:52:41,997 - [DEBUG] - pktfwd.utils - (utils.py).replace_sx1301_global_conf_with_regional – /opt/pktfwd/utils.py:(134) - Copying SX1301 local conf from /opt/pktfwd/config/lora_templates_sx1301/local_conf.json to /opt/local_conf.json
packet-forwarder CONCENTRATOR_RESET_PIN parameter not passed in, using value from the environment (val=17)
packet-forwarder CoreCell reset through GPIO17…
packet-forwarder CONCENTRATOR_RESET_PIN parameter not passed in, using value from the environment (val=17)
packet-forwarder CoreCell reset through GPIO17…

Maybe these are the critical bits:

(miner_param.py).await_spi_available – /opt/pktfwd-dependencies/hm_pyhelper/miner_param.py:(217) - SPI bus spidev0.0 Configured Correctly

(utils.py).is_concentrator_sx1302 – /opt/pktfwd/utils.py:(82) - Command ‘[’/opt/sx1302/chip_id’, ‘-d’, ‘/dev/spidev0.0’]’ returned non-zero exit status 1.

I wonder if there’s a problem with the SX1302 hardware I’m using.

Hey @markysparks - this is looking good to me, but maybe adding the RUST_BACKTRACE = full variable will even output more infos (however, I think this will only be valid for the helium services).

It looks like the pinout does not match your used hat.
Looking at the original WM1302 Pi Hat: https://files.seeedstudio.com/products/113100022/5371617183671_.pic_hd.jpg
And at your Hat:
https://cdn.shopify.com/s/files/1/0176/3274/files/SX1302-LoRaWAN-Gateway-HAT-details-inter.jpg
Next to the config data of the DIY-RAK2287:
hm-pyhelper/hardware_definitions.py at f8b2d8ceb90cfcd1da658a73e3741cc6de2ff1ff · NebraLtd/hm-pyhelper · GitHub

We can see that the reset pin is wrong:

# Nebra Indoor Hotspot
'DIY-RAK2287': {
    'RESET': 17,  -> GPIO17, PIN11 (on WM1302) -> GPIO23, PIN16 (your board)
    'STATUS': 20, -> GPIO20, PIN38 (on WM1302 it is NC/not connected) -> NC on your board
    'BUTTON': 21, -> GPIO21, PIN40 (on WM1302 it is NC) -> NC on your board
    }

So basically you would need to change the RESET variable to 23 and then it should work.

But maybe @mpous wants to add something to that?

1 Like

Thanks @nmaas87

@markysparks please test what Nico mentioned. On the other hand, i saw now that the current gatewayrs version is the 27 and the project is using the 21. I will try to upgrade it!

Let’s stay connected

Marc

2 Likes

Hi Marc,

Is there an easy way for me to change the RESET variable to 23? I tried adding a Balena Device variable of RESET to 23 which didn’t work, also tried adding CONCENTRATOR_RESET_PIN as a variable set to 23 after looking at the reset_lgw.sh file.

I set the project up using the ‘deploy with Balena’, maybe I’ll have to clone the project from GitHub and use the Balena CLI.

Mark.

Hello @markysparks apologizes for the delay answering this!

Due the changes on the Light Hotspots, I will need to update the gatewayrs version. I created a github issue on the repo → Update miner version · Issue #11 · mpous/helium-data-hotspot · GitHub

I will try to work on this next week and keep you updated! Feel free to try to PR as well if you feel comfortable :slight_smile:

1 Like

@markysparks could you please try to re-deploy with the latest version from here? GitHub - mpous/helium-data-hotspot

I also updated the balenaHub project → balenaHub: an easier way to find and publish fleets, projects, and blocks for edge devices

I tested myself and it worked well on my side the new update! Let me know if it works for you :slight_smile:

Hi Marc,

Thanks for that - I re-deployed to my device which all went OK but unfortunately the packet forwarder still keeps restarting. On startup I can see that its still using a RESET GPIO 17 when it should be 23 according to @nmaas87 - I have two variables RESET and CONCENTRATOR_PIN_RESET set to 23 but that doesn’t make any difference. Anything else I can try?

Thanks
Mark.

packet-forwarder CONCENTRATOR_RESET_PIN parameter not passed in, using value from the environment (val=17)
packet-forwarder CoreCell reset through GPIO17…
packet-forwarder CONCENTRATOR_RESET_PIN parameter not passed in, using value from the environment (val=17)
packet-forwarder CoreCell reset through GPIO17…
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 global_conf.json, parsin

@markysparks what VARIANT variable are you using?

DIY-RAK2287

1 Like

@markysparks could you please try to define the RESET PIN on the 17?

@mpous sorry did you mean set the variable RESET to 17, not quite sure if that’s what you mean or something else… (doing that or RESET_PIN 17 doesn’t work)