Referring to the LoRaWan specification, proprietary MAC command can be created (CID from 0x80 0xFF), I am trying to implement a new one.
I have changed my device lora stack to implement this command and I was wondering how to do it on the loraserver. According to LoRaWan specification classification, the request will be transmitted by the GW and the device will answer
I have checked the source files and I guess I have to:
add in internal/maccommand a new file to describe how to handle the request and the answer,
add my new command information in lorawan/master/mac_commands.go
message CreateMACCommandQueueItemRequest {
// DevEUI EUI (8 bytes).
bytes dev_eui = 1;
// Command identifier (specified by the LoRaWAN specs).
uint32 cid = 4;
// MAC-command(s). In case multiple payloads are defined, then they
// are always sent within a single frame.
repeated bytes commands = 5;
}
we have implemented network-controller API for Custom Mac command
message CreateMACCommandQueueItemRequest {
// DevEUI EUI (8 bytes).
bytes dev_eui = 1;
// Command identifier (specified by the LoRaWAN specs).
uint32 cid = 4;
// MAC-command(s). In case multiple payloads are defined, then they
// are always sent within a single frame.
repeated bytes commands = 5;
}