PiSupply / iot-lora-image

RPi SD Card Image for IoT LoRa Range
11 stars 6 forks source link

not compatibile with the TTN v3 #77

Open fiergna opened 3 years ago

fiergna commented 3 years ago

Is there an update planned so that the Gateway HAT is compatible with the new TTN v3?

https://www.thethingsnetwork.org/forum/t/the-things-network-upgrade-to-v3/43256

markus1203 commented 3 years ago

also for the Node pHAT?

TheNetStriker commented 3 years ago

I'm also trying to get the gateway into the new v3 console. I tried to configure the device in legacy semtech mode with the new ttn server, but the device does not show up as connected in the v3 console. (I also setup an API key)

Did anyone found a solution for this yet?

dml96 commented 3 years ago

I have tried a couple of things. What I find interesting when compared to other systems (balena for ex.) is we are not allowed to import an API key less then 101 characters. TTN v3 API key is 98 characters long. Not sure this is necessarily the fix, but with an updated device ID, updated API key, and server. I don't see why it wouldn't work

R-Marshall commented 3 years ago

Any success on registering the gateway on V3? or other solutions? I have seen this post too late it seems...

I have tried a couple of things. What I find interesting when compared to other systems (balena for ex.) is we are not allowed to import an API key less then 101 characters. TTN v3 API key is 98 characters long. Not sure this is necessarily the fix, but with an updated device ID, updated API key, and server. I don't see why it wouldn't work

jakobfriis commented 3 years ago

I have tried a couple of things. What I find interesting when compared to other systems (balena for ex.) is we are not allowed to import an API key less then 101 characters. TTN v3 API key is 98 characters long. Not sure this is necessarily the fix, but with an updated device ID, updated API key, and server. I don't see why it wouldn't work

Same problem here.

m0lmk commented 3 years ago

I've also got 4 of these that I would like to get working with V3. Any chance we can get un updated and compatible image?

aallan commented 3 years ago

Same.

m0lmk commented 3 years ago

There seems to be a simple hack to get this working using legacy semtech mode. This is how I did it using the Chrome browser.

  1. Create an API key for the device
  2. Enable legacy semtech mode
  3. Scroll down to the Gateway Key field, right click on the field and select "inspect"
  4. In the inspector window, change minlength="101" to minlength="98"
  5. Fill in the details and paste the API key into the Gateway Key field
  6. Save settings

It seems like there's no back end error checking so changing the minlength value in the browser seems to work. I have one of mine running fine using that quick hack!

Edit....

Although doing this seems to get the gateway working and accepting uplink messages, it fails to transmit downlink messages. Not sure if that's an issue with TTN V3 or the iot-lora-image.

dml96 commented 3 years ago

There seems to be a simple hack to get this working using legacy semtech mode. This is how I did it using the Chrome browser.

1. Create an API key for the device

2. Enable legacy semtech mode

3. Scroll down to the Gateway Key field, right click on the field and select "inspect"

4. In the inspector window, change minlength="101" to minlength="98"

5. Fill in the details and paste the API key into the Gateway Key field

6. Save settings

It seems like there's no back end error checking so changing the minlength value in the browser seems to work. I have one of mine running fine using that quick hack!

Edit....

Although doing this seems to get the gateway working and accepting uplink messages, it fails to transmit downlink messages. Not sure if that's an issue with TTN V3 or the iot-lora-image.

As far as I understand, the API-key is needed for verification in both uplink and downlink process -- so for one to work and not the other? Interesting. Just based of experience with other gateways migrated to TTN V3 where there were no problems. I guess the problem is deeper in the code of iot-lora-image.

R-Marshall commented 3 years ago

There seems to be a simple hack to get this working using legacy semtech mode. This is how I did it using the Chrome browser.

1. Create an API key for the device

2. Enable legacy semtech mode

3. Scroll down to the Gateway Key field, right click on the field and select "inspect"

4. In the inspector window, change minlength="101" to minlength="98"

5. Fill in the details and paste the API key into the Gateway Key field

6. Save settings

It seems like there's no back end error checking so changing the minlength value in the browser seems to work. I have one of mine running fine using that quick hack!

Edit....

Although doing this seems to get the gateway working and accepting uplink messages, it fails to transmit downlink messages. Not sure if that's an issue with TTN V3 or the iot-lora-image.

Thanks for this workaround! it has allowed me to connect to my gateway to the TTN network V3. Haven't tested downlink messages yet.

Hope to see a proper update to this. But i'm worried we won't since PiSupply and Nebra are supporting the Helium network as of Jan 2021... https://learn.pi-supply.com/nebra-pi-supply-launches-two-new-hardware-miners-for-helium-hnt-cryptocurrency/ As an alternative anyone try the Balena route? https://github.com/jpmeijers/ttn-resin-gateway-rpi

bapman commented 2 years ago

Hi All, Working for me now, will document my alternative in case it helps someone. I went down the RAKWireless route (concentrator used by Pi-Supply hat), which have more up-to-date drivers.

Basically you can follow the installation guidelines as per following link: RAK Wireless - RAK Common for Gateway

... with 1 exception

The Pi-Supply hat uses another pin to reset the concentrator, so you'll need to update a configuration file BEFORE you run the install. Details are documented in following resolved issue: Resolved issue - failed to start concentrator pi-supply hat

Cheers, bap.

TheNetStriker commented 2 years ago

@bapman I've just tried your solution. I've changed the reset pin and changed to TTN in the gateway-config, but where do I enter the gateway key? And is there also a webinterface for TTN on this image?

Bovbjergdk commented 2 years ago

Be aware, that the Gateway ID is fixed to the Raspberry MAC adress. So if you have registeret it once in TTN and the for any reason deleted the Gateway again, you can not register the same Gateway ID twice. This is very annoying, and complete unnecessary. I had to buy a new Raspberry. There may be a solution to change the raspberry MAC, but i dont know how.

Bovbjergdk commented 2 years ago

@bapman Are you sure you connect to ttn V3 and not to V2? And if so, where did you put the gateway key as TheNetStriker asks?

bapman commented 2 years ago

Hi both, sorry for the slow response time. I ended up not connecting to TTN, not sure if because of v2 vs. v3 problems, but I couldn't get MQTT connection to work (Lora messages from the node were showing up ok). Instead I ended up going the "chirpstack" route, and deployed it on the raspberry pi with the lora gateway. I don't recall any isses with bound MAC addresses back then. I'll look into TTN in 2-3 weeks with a new raspberry pi and new rakwireless lora gateway units. Will post here if I can get it to work.

m0lmk commented 2 years ago

Jan 2022 and I still have 4 useless gateways, along with many other users, that have seemingly been abandoned by Pi Supply. Has anyone managed to come up with a solution that works fully with TTN V3?

TheNetStriker commented 2 years ago

@m0lmk I'm currently using the RAKWireless image. It is not as easy to configure using a webinterface as with the PiSupply image, but works perfectly for month now.

On this image you have to install the service for the PoE Hat Display and log2ram yourself. After that you can configure the gateway using the config files in the directory /opt/ttn-gateway/packet_forwarder/lora_pkt_fwd.

R-Marshall commented 2 years ago

@m0lmk I was able to use the PiSupply Hat and deploy a working TTN v3 gateway using Balena Cloud and Balena Basic Station Aplication basicstation GitHub](https://github.com/mpous/basicstation) You'll need to configure the reset pin and a few other things specific to the PiSupply Hat. The web interface through Balena Cloud works well and configuration was straight forward.

hardillb commented 2 years ago

@TheNetStriker I think I've got the RAKWireless stuff setup properly, but my devices are not connecting. I'm seeing the JoinEUI messages in the gateway console, but I suspect there should be a downlink response I'm not seeing.

Any ideas?

EDIT Never mind, it's working now (at least for one sensor, got to work out what's up with the other)

fleutot commented 10 months ago

@m0lmk I was able to use the PiSupply Hat and deploy a working TTN v3 gateway using Balena Cloud and Balena Basic Station Aplication basicstation GitHub](https://github.com/mpous/basicstation) You'll need to configure the reset pin and a few other things specific to the PiSupply Hat. The web interface through Balena Cloud works well and configuration was straight forward.

Where to you find the documentation about what to put where? I see for example two variables: GW_RESET_GPIO and GW_RESET_PIN, which one is what? Screenshot_2023-08-10_095055

Edit: I see from the documentation of the RAK2247 that the Reset pin is 11, connected to the Raspberry Pi GPIO17. This is also the default I get when setting up a rPi3 as gateway in BalenaCloud. No manual change required from these default, it seems.