Repurposing Helium Miner V2

Hello,

I have a Helium miner V2 (RAK7248) which is base model with the Raspberry Pi 4 (RPi 4) and the RAK2287 PiHAT.
I am trying to repurpose this powerful device to use it as a private gateway as I don’t use it for Helium mining. I’m trying to find a firmware for this purpose but can’t find any file as I’m new to RAK poroducts. Can I use WisGate OS 2 on this device? What are my options?
Anyone has done this before? I believe the answer is no, but I wonder can I by any chance use this device as a Meshtastic gateway? Any idea for repurposing this device is greatly appreciated.
Thanks

I have the same question.
I have a RAK v2 Helium device and I’m interested in converting it into a standard LoRa gateway to use with ChirpStack. Is the RAK2287 on Helium completey same as sold on RAK store ?

@blociot you can try to install developer firmware on
GitHub - RAKWireless/rak_common_for_gateway to Raspbian image.

1 Like

Hi @blociot @vbulbul

  1. You have two options: installing rak_common_for_gateway on a stock Raspberry Pi OS image like @vbulbul suggests, but this project is not being developed any further
  2. Using RAKPIoS and rakpios-cli tool that comes with it to deploy the required packet forwarder service (other services are also available via that tool).

Resources:

Note, if you find issues using rakpios-cli try upfating it first: rakpios-cli -u. Also, you can install rakpios-cli on a Raspberry Pi OS too as long as you also install docker (rakpios-cli deploys the services as docker containers).

1 Like

@xoseperez Thank you very much for the information. Also thanks to @vbulbul for the hint.
I’m an IoT professional and relatively new to LoRa world. I’ve used LoRa modules to send data from one node to another peer-to-peer. I know what a gateway does, but I am not clear how to use the gateway after it’s setup with the RAKPoS (option 2). Is there any application example or more detailed documentation? For example, here what I’m trying to achieve:
A number of sensors with LoRa modules (let’s say some WisBlock nodes) send the data to the gateway. My gateway should forward the received data to an MQTT broker. So things I need to figure out:

  1. How do I define what sensors are connected to my gateway? Does the LoRa gateway has an address like any other gateway such as a Modbus to MQTT gateway?
  2. Can I customize the MQTT topics on my gateway so my sensors data will be published to the topics that I want?
  3. Is there any other use case for my gateway after collecting my sensors data? I see Node-Red on the documentation. But It’s not clear how to connect a sensor to the gateway. For example, if I have an SHT3 sensor as a LoRa node, how do I connect it to the gateway and how to find its address to be used on Node-Red?

Overall, any link or detailed technical application example is greatly appreciated.
Many thanks.

Well, LoRaWAN is not hard but it does take some reading before you got everything right.

This schema is simple enough to get an idea of the different components and the usual communication protocols between them:

In a normal LoRaWAN gateway (a commercial one) you usually have the first two (the physical concentrator like the RAK2287 you have plus the packet forwarder (PF for short) that forwards LoRa packets to a remote LoRaWAN Network Server (or LNS for short). But you can also have the whole set of components in the same gateway if you want and the hardware supports it (a Raspberry Pi is perfect for that).

As for your questions:

  1. A LoRaWAN gateway is an IP device and has to be connected to the same network as the LNS to send it the data, or have access to it somehow (via Internet, for instance). Sensors are provisioned on the LNS (not on the gateways, the PF is dumb, only forwards packets up and down). One gateway has one LNS, one LNS might have multiple gateways. The way a gateway talks to the LNS depends on the PF you use, the Legacy UDP Packet Forwarder uses, well, UDP. BasicStation Packet Forwarder uses HTTPS for configuration and WSS for the data link.

  2. Data is published to MQTT by the LNS. Some LNS let you slightly configure the format of the topics but you will probably end up mapping them at your application level.

  3. In a gateway based on a Raspberry PI you can deploy many different services aside from the packet forwarder service and the LNS service (optional). InfluxDB, NodeRED, Grafana, ThingsBoard,… Those other services will receive data from the sensors via the LNS (using MQTT or HTTP push), they do not talk to the gateway software directly (to the PF). All communication goes via the LNS. The LNS can be remote (The Things Network, Helium, Actility,…) or local (you can deploy TTS or ChirpStack on the same Raspberry Pi).

1 Like

Thanks again. Very helpful info.
I just found this tutorial on RAK YouTube:
A Step-by-Step on How to Build A Developer Gateway

It is a great tutorial and I’m going to try it out. Next, I have to figure out what is the best LNS that I can Install locally on my RPIOS. I would appreciate it if you could let me know in case there is a similar video or document for setting up the LNS locally.
Cheers.

You have two options. In the video tutorial you have them both in case you want to use them: The Things Stack (same backend TTN uses) and ChirpStack. Both are really good options.

1 Like

Just installed the RAKPIOS and following the video. The passwords for the AP after boot seems to be rakwireless based on the tutorial, but it doesn’t work for me. It says enter 8 digits ID which I can’t see on my device. I’m using this image: 20240826-rakpios-0.9.0-arm64-lite.zip
Any hint?
Thank you.
image

image

1 Like

This is Windows making things up. The default password for the access point in “rakwireless”.

1 Like

@xoseperez @vbulbul thanks again for the help.
I’ve installed the UDP packet forwarder and chirpstack v4 via rakpios-cli. I’m trying to add the gateway to my chirpstack via web management console but the chirpstack doesn’t find any gateway (last seen: never).
Also a few more questions:

  1. How do I make sure my UDP PF is configured and running with no error? Is there any debugging tool? I can see the service status is running on rakpios-cli.
  2. For my case, I’m using the rakpios and rakpios-cli. Do I need to change any configuration file or do I need to deal with docker manually? Should I see the installed services in Portainer?
  3. How do I access the configuration file for UDP PF and other services installed? I can’t find them in cli anymore.
  4. I assume chirpstack is not a RAK project and I need to access the documentation on their website?
  5. This command doesn’t find any concentrator. Is this normal?
    docker run --privileged --rm rakwireless/udp-packet-forwarder find_concentrator

Thanks

Hi @blociot

rakpios-cli is a wrapper around docker to ease things to start with the different services you can deploy, but in order to have full control over them you better learn a bit of docker.

For instance, rakpios-cli deploys the UDP PF docker image that we maintain and you can check here: GitHub - RAKWireless/udp-packet-forwarder: UDP Packet Forwarder for Docker . In that repo you have all the different settings it allows and you can also use the docker-compose.yml file there that will provide you more control on bringing it up and down with the settings you desire.

To check the logs for each service there is an option in rakpios-cli that basically calls docker logs -f on the container.

No, ChirpStack is not RAK. We do work together on different projects but the ChirpStack project has it’s own documentation site (https://www.chirpstack.io/).

That command you post should find a RAK2287 concentrator, but only if it’s not blocked by another service, so you have to run it with the UDP PF shut down.

If your gateway does not show up on ChirpStack it can due to different reasons:

  • For ChirpStack to “understand” the UDP Packet Forwarder you have to deploy the chirpstack-gateway-bridge service too
  • Make sure you get the right Gateway EUI, you can ask the running instance what EUI it’s using with docker exec -it udp-packet-forwarder gateway_eui.
  • Make sure your UDP PF is pointing to the interface where the chirpstack-gateway-bridge is listening to. If the UDP PF is running in network host mode that’s usually “localhost:1700”.

Thanks @xoseperez.
It seems the missing piece is the chirpstack-gateway-bridge. I can’t see this service on cli, so I assume I should install it based on this link?
Raspberry Pi - ChirpStack open-source LoRaWAN® Network Server documentation

Also, I’m trying to find the configuration file for UDP packet forwarder that I installed from cli. It is installed and running but I can’t find its directory where the local config file is located. Seems it should be on /etc/opt/udp-packet-forwarder but can’t find it. Any hint?

The chirpstack-gateway-bridge component should be deployed by rakpios-cli (if deplotying ChirpStack4 stack). The configuration files (global and local ones) for the UDP is created by the container on the fly and should be under /app folder inside the container.

The problem is, I cannot see chirpstack-gateway-bridge name on the cli services to be installed! Does it have a different name?

The rakpios-cli installs stacks. Each stack might have one or more services. The ChirpStack4 stack deploys different services. You can check them using docker:

docker ps -a

It will show all the services, including chirpstack (LNS) and chirpstack-gateway-bridge. Mind rakpios-cli is a wrap around docker to ease things but using docker itself will greatly increase your control over the system.

1 Like

I think I’m going to give up on this project as I’m stil l not able to add my gateway to Chirpstack and I can’t figure out how to debug things. This is the list of containers I have. I’m not sure why there are two chirpstack gateway bridges install. I simply installed the stack from the cli.

I’m coming from IIoT background and having worked on extremely complex project, I should say mu experience with LoRa hasn’t been very impressive. Too complicated for a simple task and it doesn’t seem there is enough debugging tools to find out what is working and what is not.
Thanks again for the help.

I am sorry to hear that. It’s true that getting started might be complex but once you get the architecture is much simpler than other technologies. The fact that ChirpStack is a modular solution has its pros and cons: ore flexible but also more pieces that have to work together.

There is a whole forum, quite active about ChirpStack specifically (https://forum.chirpstack.io/). Also the schematic below might help you understand how all these components are coupled together.

In blue the ChirpStack components, in purple other components you use to see on a LoRaWAN deployment. You don’t want to deploy all these components, depending on your solution you will chose one path. In your case it was:

physical concentrator -> udp-packet-forwarder -> chirpstack-gateway-bridge -> mqtt-broker -> chirpstack v2 (LNS)