helium / gateway-rs

The Helium Gateway
Apache License 2.0
270 stars 109 forks source link

Dragino LPS8 connection issue #472

Open robansaldo opened 8 months ago

robansaldo commented 8 months ago

I'm trying to set up gateway-rs (helium-gateway-1.3.0-mips-unknown-linux-musl.tar.gz) with a Dragino LPS8 (firmware=lgw-5.4.1689641188). I've got the binary installed, an init script and the gateway_key.bin and settings.toml files in /etc/helium_gateway but I can't seem to connect properly. The logs show an error:

Sun Nov 5 13:36:48 2023 daemon.info helium_gateway[14659]: 2023-11-05T18:36:48.439724Z WARN run: gateway_rs::region_watcher: failed to get region_params pubkey=137oJzq1qZpSbzHawaysTGGsRCYTXG1MiTMQNxYSsQJp4YMDdN8 uri=http://mainnet-config.helium.io:6080/ default_region=US915 err=service error: rpc status: Internal, message: "h2 protocol error: http2 error: connection error received: unspecific protocol error detected", details: [], metadata: MetadataMap { headers: {} }

The same device functions fine as a gateway for the TTN, which is configured as the secondary LoRaWAN Server, so it reaches the internet correctly.

Is this a bug in gateway-rs or the Dragino firmware or have I misconfigured something? I was not able to find any troubleshooting info for this error.

madninja commented 7 months ago

@robansaldo thanks for reporting! I'm not sure what the best way is to troubleshoot this error.. Does your Dragino have outbound firewall rules that limit connections for all or certain outbound ports?

robansaldo commented 7 months ago

@madninja it does not have any outbound rules. In fact I can see the outgoing packets if I tcpdump port 6080 on my internet router outside interface. I did try running the gateway-rs on a linux box on my network and directing the UDP packets from the Dragino to that and it is working fine, so I do have a workaround.

madninja commented 7 months ago

@robansaldo are you able to try out a dependency update build? https://github.com/helium/gateway-rs/actions/runs/6801773202?pr=473

It may well be that the linux version used on that mipsel device isn't behaving the way the code is expecting it to when it comes to networking, but that's a real long shot in the dark

robansaldo commented 7 months ago

@madninja Thanks Marc... I downloaded that and tested it out, but unfortunately received the same error:

2023-11-09T03:25:22.839277Z  WARN run: gateway_rs::beaconer: failed to reconnect err=service error: rpc status: Internal, message: "h2 protocol error: http2 error: connection error received: unspecific protocol error detected", details: [], metadata: MetadataMap { headers: {} }
2023-11-09T03:25:22.852101Z  WARN run:run: gateway_rs::packet_router: failed to reconnect err=service error: rpc status: Unknown, message: "transport error", details: [], metadata: MetadataMap { headers: {} }
2023-11-09T03:25:29.496703Z  WARN run: gateway_rs::region_watcher: failed to get region_params pubkey=137oJzq1qZpSbzHawaysTGGsRCYTXG1MiTMQNxYSsQJp4YMDdN8 uri=http://mainnet-config.helium.io:6080/ default_region=US915 err=service error: rpc status: Internal, message: "h2 protocol error: http2 error: connection error received: unspecific protocol error detected", details: [], metadata: MetadataMap { headers: {} }
2023-11-09T03:25:31.862221Z  WARN run:run: gateway_rs::packet_router: failed to reconnect err=service error: rpc status: Unknown, message: "transport error", details: [], metadata: MetadataMap { headers: {} }
Biciocoin commented 7 months ago

I also have the same problem as you: this is my case: I have a Dragino LPS8 which before switching to Solana always worked as a data gateway. Today I updated its firmware, from its internal menu I installed the latest version of gateway-rs 1.3.0, I uploaded my "gateway_key.bin" file with my wallet and location data and it tells me that the status of the gateway-rs is Disconnected. I checked if the LPS8 information is correct by running the command "helium_gateway key info" and the response is as follows: "2023-11-10T18:03:26.091577Z ERROR helium_gateway: service error: rpc status: Internal, message: " h2 protocol error: http2 error: connection error received: non-specific protocol error detected", details: [], metadata: MetadataMap { headers: {} }". I accept advice, thanks

robansaldo commented 7 months ago

I had also contacted Dragino support regarding this and they let me know that they also see this issue, but that version 1.2.1 of gateway_rs code does work properly. I've downloaded version 1.2.1 and can confirm that version does work properly.

madninja commented 7 months ago

@robansaldo I think we've narrowed it down to a rust toolchain issue. Can you try the mipsel build listed here? https://github.com/helium/gateway-rs/actions/runs/6836222985 ?

robansaldo commented 7 months ago

@madninja that did the trick. Works like a charm. Thanks!

Biciocoin commented 7 months ago

Hi everyone, I also confirm that version 1.2.1 works correctly

madninja commented 7 months ago

Hi everyone, I also confirm that version 1.2.1 works correctly

if you downloaded it from https://github.com/helium/gateway-rs/actions/runs/6836222985 that would be version 1.3.0. Please confirm that that one works

Biciocoin commented 7 months ago

I downloaded the file from here: "https://www.dragino.com/downloads/downloads/LoRa_Gateway/3rd-software/helium/gateway-rs/data-only/helium-gateway-v1.2.1-dragino.ipk " Version 1.3.0 is also in this directory. Your file contains the settings.toml and the helium_gateway. If I leave the settings.toml file from the previous version and overwrite the helium_gateway file, is it correct?

madninja commented 7 months ago

I downloaded the file from here: "https://www.dragino.com/downloads/downloads/LoRa_Gateway/3rd-software/helium/gateway-rs/data-only/helium-gateway-v1.2.1-dragino.ipk " Version 1.3.0 is also in this directory. Your file contains the settings.toml and the helium_gateway. If I leave the settings.toml file from the previous version and overwrite the helium_gateway file, is it correct?

yes.. just overwrite helium_gateway

Biciocoin commented 7 months ago

ok, I'll proceed now, let's hope for the best

madninja commented 7 months ago

ok, I'll proceed now, let's hope for the best

it's confirmed to work, so I'm confident you'll figure out the install steps

Biciocoin commented 7 months ago

Everything fixed, everything works. Good job. Thanks again.

Biciocoin commented 7 months ago

Small problem. Since yesterday evening, after installing the latest release 1.3.0. and made it work on my Dragino LPS8, during the night it performed 4 activities, two Witnesses and 2 Beaconers and all the activities were invalidated with this reason: Reason: Invalid capability. What can it be? Is it related to the update? Thank you

madninja commented 7 months ago

Small problem. Since yesterday evening, after installing the latest release 1.3.0. and made it work on my Dragino LPS8, during the night it performed 4 activities, two Witnesses and 2 Beaconers and all the activities were invalidated with this reason: Reason: Invalid capability. What can it be? Is it related to the update? Thank you

that's unrelated to the update.. your Dragino is apparently a "dataonly" hotspot, i.e. it was not produced by a maker and can only earn for data traffic, not for beacon/witness activity. This has always been the case for dataonly hotspots

Biciocoin commented 7 months ago

You're right, it's just that in previous versions you didn't see these messages. I still take advantage of it, is it normal that in explore my dataonly hotspots don't appear online?

madninja commented 7 months ago

You're right, it's just that in previous versions you didn't see these messages. I still take advantage of it, is it normal that in explore my dataonly hotspots don't appear online?

this is not quite true.. beacons and witnesses were always declared invalid for dataonly hotspots after the solana switch. And in explorer, I think your hotspot will appear if it has an asserted location

NTech242 commented 6 months ago

Hi, we need assistance with applying this fix. Can you give me the step by step cmds for this please.

Also, how long before this will be added to the current release if it is still stable?

madninja commented 6 months ago

Hi, we need assistance with applying this fix. Can you give me the step by step cmds for this please.

Also, how long before this will be added to the current release if it is still stable?

build as described in the README.. a new release of gateway-rs will be out early January with other features/fixes which will generate a release binary on the releases page

NTech242 commented 5 months ago

Hi following up on this, when will the update be released?

Seruschl commented 4 months ago

Hi all. I hope someone can halp me.

I've set up my Dragino LPS8 and i've installed the gateway-rs through the webinterface and it showed me that the v1.2.1 was properly installed and running. I knew that 1.3.0 was the latest version so i installed it like it was mentioned in this manual https://docs.helium.com/iot/data-only/dragino-data-only-hotspot/ and now it won't work anymore. Bild_2024-02-08_153030789

Also replacing the settings.toml or helium_gateway file from this location https://github.com/helium/gateway-rs/actions/runs/6836222985 hasn't helped.

The system won't let me downgrade to v1.2.1 so what can i do now to see if it working again??

edit:

so i guess it is working again see on the attached picture Bild_2024-02-08_160701850

Is it necessary to update to 1.3.0? For me it wasn't working to exchange the helium_gateway file, like it was mentioned before.