Hello, I have a RAK2287 which is supplied with chirpstack on board.
I have found, when viewing incoming messages on the chirpstack gui, that there are a number of fields listed there which do not appear in the MQTT packets sent out on the application/myapplicationID/device/mydeveui/rx topic.
These include (but are not limited to): txinfo->loRaModulationInfo->bandwidth txinfo->loRaModulationInfo->spreadingFactor txinfo->loRaModulationInfo->codeRate
Please could someone point me to the code that decides what is included in the MQTT packet, so I can edit it on my RAK2287 to include some of the “missing” fields.
Thank you for your response. I’m a bit new to all this. I’m going to write down what I’ve understood and perhaps you’d be good enough to tell me whether I’m correct and then answer my questions?
My understanding:
The file integration.proto lives on the pi of my RAK2287 and defines which fields will be sent out over MQTT when certain events happen (eg an uplink event). If I want to change what fields are in the MQTT data for an event, I need to change the relevant part of the integration.proto file.
My questions:
Where is the integration.proto file stored on the Pi?
Where is the list of available fields? (In other words, adr, dr, f_cnt, f_port etc are listed in the integration.proto file, but what is the equivalent text for one that’s not listed, eg coding rate)?
Could you give me an example of how I could add, for example, coding rate to the MQTT output for an uplink event?
Those proto files describe the content of different objects used in integrations (in this case). They are also used to generate bindings for different languages to interact with the payloads.
The default marshaler for MQTT integrations is still JSON, so you should be able to just print out the entire payload and look up each fields’ meaning in the proto files.
I do apologise if I’ve missed your point but some of the fields I’m interested in, such as the ones I listed (bandwidth, spreading factor and coding) are not present in the MQTT data I’m getting. But they are present on the DEVICE DATA screen in Chirpstack.
Screen snippet of DEVICE DATA page on Chirpstack, showing bandwidth, spreading rate and coding rate:
Screen snippet of MQTT data. Bandwidth, spreading rate and coding rate not present.