How to import external modules to Decoder

Hello.
In my Decoder function I need to use external library aesjs-js.
I can not see node or yarn running in my Centos server, but Chirpstack web is working and decoder is working.

  1. How it works without any node instances/engines running? All is working base on binary code in Go?
  2. How can I import additional librarys which are not avaiable current on Chirpstack?
    I tried to copy library to the path and use:
    import AES from (’/usr/lib/chirpstack-application-server/aesjs-js.js);
    var AES = require(’[…]’);

and I get issues.

you can’t do this, Use own external decoder on application side.

AES CTR is difficult to decode… write without any prepared library…
I could not find on the internet which should works properly without external modules like CryptoJS

if you do that on app side (not on the app server), you can use any external modules on different program languages as you wish.

so you mean that in “CODEC” sheet in window “Custom JavaScript codec functions” I can use different than JavaScript languages?

are you sure that I am not able to import external modules in JS?

OMG. Application server != application
I mean decode your payload at application side, not at chirpstack.

there is no possible to decode in “application” side… what application?
I need to decode payload and parse all data - byte by byte. One by one…
I am using pure LoRaWAN topology.

payloads are encrypted with AES because vendor of device configured it in that way…

Device -> Gateway -> MQTT -> RabbitMQ and Chirpstack.
This is production env and I am only to change somethink on Chirpstack decoder site.

the application with which you have configured integration

datas from Chirpstack are sending directly to Elasticsearch where it is not possible to decode it in that solution
It need to be done on Chirpstack side and sent to Elk

don’t you confuse anything? what are these devices?

no, I got documentation and by default it is encrypted by AES CTR 128 bit
also I got keys and IV and all necessary info from vendor.

can you show it or it’s top secret?

unfortunately top secret

payload bytes->AES->base64->AES->LoRaWAN
if this is really so and you do not confuse anything
then on chirpstack side you can’t do this. write middleware between chirpstack and Elastic and use it as integration. that’s all

1 Like

exactly,

payload is encrypted by LoRa by base64, but also by the vendor by AES CTR with some additional keys assigned to device and DevEUI

I think this is now your third(?) thread asking the same question, and you keep getting the same answers. You will need to write code (outside ChirpStack) to do what you want.

a very stubborn person believes that this will defeat reality :smile:

I had to create new topic because in previous you did not have sure that it is not possible and you provided link with libraries so base on your comments I could think that you do not know how it works. :stuck_out_tongue:

Because I do not know word that something is not possible :stuck_out_tongue:

And I am wondering how it is possible that this editor in Chirpstack is so simple without any possibilities

show another lora server where it is
This is open source project, dude.
Build your own, you are free in your desires