Restart ttn-pkt-forwarder reset my config

Hi,

(multitech condit AEP)

I need to add another server to the servers list. But after edit my global_conf.json (/var/config/lora/) I restart the “ttn-pkt-forwarder” (etc/init.d/) and this process reset my config file to default settings…

why ?

This is the correct way to add multiple servers ?

Because that is not the file you should edit. Modify local_conf.json to make changes.

like this ?

{
/* Settings defined in global_conf will be overwritten by those in local_conf /
“gateway_conf”: {
/
gateway_ID is based on unique hardware ID, do not edit /
“gateway_ID”: “00800000AXXXXXX”,
/
Email of gateway operator, max 40 chars*/
“contact_email”: “XXXXXXXXX”,
/* Public description of this device, max 64 chars */
“description”: “XXXXXXXX”,
“gps”: true,
“fake_gps”: false,
“servers”: [
{
“serv_type”: “ttn”,
“server_address”: “bridge.eu.thethings.network”,
“serv_gw_id”: “eui-00800000a00038f4”,
“serv_gw_key”: “ttn-account-v2.Mi9Qzxd7ueQ8oSzR9nyWT0PeHuCBVXw_rvpMYrZuT_Q8iXZOIFsJc3hjo87UV8Ilx17_7hrsHwNX52ao003Qsw”,
“serv_enabled”: true
},
{
“server_address”: “SERVER-HERE”,
“serv_port_up”: XXXXX,
“serv_port_down”: XXXXX,
“serv_enabled”: true
}
]
}
}

And the other multitech settings, here (local_) or in the global ?

Thanks.

Yes. like that. However your gateway seems to be registered wrong @ TTN, for the protocol used the serv_gw_id should not contain eui-…

What other settings?

But it works… its possible to see the values in the console of ttn … but my second server have some problems with downlinks

You should not use two back-ends that schedule downlinks. That is asking for issues as the back-end calculates the duty cycle and schedules packets to gateways with available airtime. Also, when two back-ends schedule for the same time slot downlink data will not be transmitted.

1 Like

Maybe you can help me with my problem.

I’m trying to use your “packet forwarder” because I have a lorawan network with a packet forwarder (default multitech) for my server (https://github.com/gotthardp/lorawan-server)
but now I need to integrate a “lighting control system” (intellilight / flashnet.ro) that requires a dedicated packet forwarder.

I did not want to send the readings of all my sensors to the flashnet just because I want to use their devices.

I thought your “packet forwarder multi” would be the most appropriate method.

How can I configure to integrate the two systems (my current sensors / gatways and server and send part of data to flashnet ) ?

It seems this refers to https://intelilight.eu/ (as referred to from https://www.flashnet.ro/project/intelilight/). And it seems you’d not only need to send sensor data to them, but they also need your gateway(s) to transmit downlinks to control the (street)lights?

If yes: you can’t.

If no downlinks are needed, or if you can handle those yourself rather than them having to control your gateway(s), then you need to set up an application outside of TTN, which gets its data using the TTN MQTT Data API or one of the integrations, and which then forwards the data to that third party.

Beware of Fair Use Policy explained.

Geheimtipp: don’t expect people to investigate for you if you need help. Also, this is getting quite off-topic for your initial question.

My question is if it’s possible to use “ttn-pkt-forwarder” with multiple servers to send and receive (uplink/downlink) packets from my sensors. In this case, with
my own server (up/down) and with intelilight server.

Does their back-end use the Semtech UDP based protocol? If not you can’t connect to them using mp_pkt_fwd or poly_pkt_fwd.

If they use Semtech and your own back-end does as well both forwarders should allow you to configure them to do what you want. However as you will be using two back-ends sending downlink packets I can not assist you with the configuration because you will likely violate the regulatory airtime with two back-ends and one gateway.

With a setup using two back-ends you will be sending all data to both back-ends. The packet forwarder does not filter any packets and does not know which packets to send to which destination.

BTW. this forum is for TTN, your proposed setup uses two back-ends, neither of them TTN.

1 Like

I don’t understand.

Imagine that the gateway is a telephone, I must have a telephone for every person I want to call?

My all list of sensors (100±) use lorawan type A and my multitech send info to my own lorawan server.

Now, I use TTN to check on the console the packets(up,down,join) more easily… It’s interesting and in the future my ideia is to use the TTN “application” but I need time to migrate all devices and check the support and other things.

intelilight received this (with kersing packet-forwarder):

0x0000: 4500 00cd b110 4000 4011 1635 ac1f 1d58 [E.....@.@..5...X](mailto:E.....@.@..5...X)
0x0010: 57c4 519f c3ca 7931 00b9 73a5 02ea 4303 W.Q...y1..s...C.
0x0020: 7b22 7478 706b 223a 7b22 696d 6d65 223a {"txpk":{"imme":
0x0030: 7472 7565 2c22 6672 6571 223a 3836 392e true,"freq":869.
0x0040: 3532 3530 3030 2c22 6e63 7263 223a 7472 525000,"ncrc":tr
0x0050: 7565 2c22 7266 6368 223a 302c 2270 6f77 ue,"rfch":0,"pow
0x0060: 6522 3a32 372c 226d 6f64 7522 3a22 4c4f e":27,"modu":"LO
0x0070: 5241 222c 2264 6174 7222 3a22 5346 3132 RA","datr":"SF12
0x0080: 4257 3132 3522 2c22 636f 6472 223a 2234 BW125","codr":"4
0x0090: 2f35 222c 2269 706f 6c22 3a74 7275 652c /5","ipol":true,
0x00a0: 2273 697a 6522 3a31 362c 2264 6174 6122 "size":16,"data"
0x00b0: 3a22 5949 4930 4142 4342 4351 4147 4164 :"YII0ABCBCQAGAd
0x00c0: 6d4a 6e43 6578 6a41 3d3d 227d 7d mJnCexjA=="}}

It is not a telephone. More like a telephone providers base station. Base stations (and gateways) are part of one network, not multiple networks. So if your use case requires multiple networks you need multiple base stations (gateways).

2 Likes

…but, for application data, TTN Console will only show data for a DevAddr that belongs to TTN. Are you only looking at the gateway’s Traffic in TTN Console, or are you using TTN’s addresses? See https://www.thethingsnetwork.org/docs/lorawan/address-space.html#prefix-assignments and:

Ok. But based on this:

What is the possibility to integrate the intelilight systems (Light Control Type C) that requires a packet forwarder directly for “serv_port_down”: 50122, “serv_port_up”: 50122,“server_address”: “fc1.intelilight.eu” in my current settings that send this for my own server ? ?

For example… In the future, imagine that I use TTN and send the information with ttn-packet-forwarder for ttn server. How I can integrate the intelilight systems with my other devices. Because I need to set the server for fc1.intelilight.eu

Two servers supplying downlinks will lickely result in the gateway exceeding legal limits and as such is not a supported configuration. (I feel like a broken record by now)
If you want to do this against all advice: all the information you need is mentioned in this thread…

This is my last message regarding this subject.

2 Likes