First af all, thanks to all Chirpstack Application Server authors and contributors for their great work ).
I have a question regarding to multiple network servers and single application server setup. I searched forum and found some topics about such configuration but unfourtunately everything not works as I expected. I see interference (in how end node served by application server via 2 network servers) when both gateways turned on and connected to chirpstack during working with single end-node.
So I installed all Chirpstack components to Ubuntu18.04 server (all prerequisites were installed of most recent versions of course) from repository. All versions of Chirpstack components are on picture. I disabled default gateway bridge and netwok server systemd services and then created instead 2 instances of systemd services for each with manually specified config file path.
Networking server config for _Generic is default EU868 config + additional 867.xMHz frequencies. On the other side _UA config is based on 3 default EU868 frequencies and have specific frequencies set for DR2, forced RX1 window only and so on - local RF regulations specific.
Path of RF frame arrival to Application server is separated (as far as I can see) - it goes via separate GW bridge each running at own port, specifically prefixed MQTT broker topic and then goes to its networking server.
In Application server WEB API I added 2 Networking servers which also separated by port.
Then I created 2 service profiles and 2 device profiles, each is same but binded to _UA or _Generic Networking server.
Then I created application binded to _UA service profile and added device binded to _UA Networking server.
As I can see creating any instance of service profile, device profile, gateway and so on is accompanied with selecting Networking server. So my thought was that if end-node in the end is binded to _UA networking server via all those profiles then it should be served only by _UA network server and Microtik gateway in my case.
However it seems it is not.
At first stage if I turn off Mikrotik gateway and leave only Kona Micro and device sends Join requests - they are refused by _Generic Networking server (level=error msg=“uplink: processing uplink frame error” ctx_id=064823fd-ec84-493c-9745-23f75bd3b1a2 error=“get device error: object does not exist”
). _EU networking server receives nothing in logs. When I turn on Mikrotik - device authorizes, but then device does not served properly. Various frustrating behaviour may occur. For example gateways does not send ACK for confirmed uplinks (seen in radio spectrum and from gateways live frames) or both these Networking servers with different configuration try to operate. If only KonaMicro left turned on _Generic Networking server adds additional frequencies (867.xMHz) which are set in its configuration but should not be applied to device in application binded to _UA Networking server!. If only Mikrotik will be left - _UA Networking server will set default channels mask 0x07. In general normal device operation is seen when only one gateway turned on and seems like then each gateway operated by corresponding Network server with its specific configuration.
This question risen primarily from misunderstanding how Application server works with multiple Networking servers after setting up and experimenting with such dual Networking server setup. We need to set up multiple Networking server instances for our needs in future but after testing setup I cant understand the logic behind multiple Networkink servers operating with single Application server. This setup was intentionally made such that regional standard is same but specific configurations vary. However it possible if both gateways operated near but in different countries, where overall regional standard is same but each country/region has it’s own region specifics.
So, plese, can anybody explain or point me to answers for following questions:
- why do I see such behaviour?
- how does Application server differentiates between Networking servers?
- what is the reasoning for binding service/device profiles to specific Networking server and what was the initial aim of such binding?
- what may be wrong in my setup?
P.S. I will also attach configuration files for Chirpstack components.