Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LNS only supports Amqp_Tcp_Only in Cloud-based mode #2126

Open
Metal-Mighty opened this issue May 7, 2024 · 0 comments
Open

LNS only supports Amqp_Tcp_Only in Cloud-based mode #2126

Metal-Mighty opened this issue May 7, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Metal-Mighty
Copy link

Metal-Mighty commented May 7, 2024

Expected Behavior

I would like to be able to choose the communication protocol with the IoT Hub (e.g. Amqp_Tcp_Only, Amqp_Websocket_Only, Mqtt, etc.) in Cloud-Based mode, which was possible when using the Edge Hub.

Current Behavior

The LNS currently only support Amqp_Tcp_Only (see LoRaDeviceFactory.cs#L155), which prevents us from using the same protocol as when using the Edge Hub. Amqp_Tcp_Only uses port 5671 (and 8883 ?) which is not allowed in our firewall.

Our current implementation uses Amqp_Websocket_Only (port 443), and due to strict firewall policies we can't use this mode in our infrastructure. It should be possible to choose the protocol of our choice, as supported in the Edge Hub module with the UpstreamProtocol environment variable.

Steps to Reproduce

  1. Close outbound ports 5671 and 8883 in firewall
  2. Deploy LNS
  3. Connect a gateway to the LNS

-> Connection will get stuck when trying to update the Device Twin

Context (Environment)

Device (Host) Operating System

Ubuntu 20.04

Architecture

amd64

Container Operating System

Linux containers

LoRaWAN Module Version

v2.2.2

Docker

26.1.1-1

Logs

Additional Information

When ports are blocked, the communication gets stuck indefinitely in LoRaDeviceClient.cs#L106.

I forked the project and tried adding Amqp_Websocket_Only as a second protocol in transportSettings (LoRaDeviceFactory.cs#L155 but it won't connect. It only works when only Amqp_Websocket_Only is present. But I may be missing something :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant