Update README.md
This commit is contained in:
parent
e318ff451f
commit
e8b4297c49
|
@ -7,6 +7,7 @@ The below sample codecs are from external repositores and required to be fixed b
|
||||||
- From Dragino: https://www.dropbox.com/sh/sa4uitwn6xdku9u/AACUA890oj5dl8rETYO2icdBa?dl=0
|
- From Dragino: https://www.dropbox.com/sh/sa4uitwn6xdku9u/AACUA890oj5dl8rETYO2icdBa?dl=0
|
||||||
- From RAK Wireless: https://github.com/RAKWireless/RAKwireless_Standardized_Payload
|
- From RAK Wireless: https://github.com/RAKWireless/RAKwireless_Standardized_Payload
|
||||||
|
|
||||||
|
### Codec Format
|
||||||
A valid codec for Easy LoRaWAN Cloud is below:
|
A valid codec for Easy LoRaWAN Cloud is below:
|
||||||
```
|
```
|
||||||
// Decode uplink function.
|
// Decode uplink function.
|
||||||
|
@ -42,3 +43,22 @@ function encodeDownlink(input) {
|
||||||
return {bytes: []};
|
return {bytes: []};
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Conversion of Codec Formats
|
||||||
|
If you have a codec for ChirpStack v3, you need to put the below wrapper function to convert a codec to ChirpStack v4.
|
||||||
|
Easy LoRaWAN uses ChirpStack v4
|
||||||
|
|
||||||
|
```
|
||||||
|
// V3
|
||||||
|
function Decode(fPort, bytes, variables) {
|
||||||
|
...
|
||||||
|
}
|
||||||
|
|
||||||
|
// V3 to V4 converter
|
||||||
|
function decodeUplink(input) {
|
||||||
|
// Wrapper function for ChirpStack v4
|
||||||
|
return {
|
||||||
|
data: Decode(input.fPort, input.bytes, input.variables)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in New Issue