Hello,
I got this error when I am assigning MAC commands to the field commands
“Assignment not allowed to repeated field “commands” in protocol message object”
This is my code.
import grpc
from chirpstack_api.ns import NetworkServerServiceStub
from chirpstack_api.ns.ns_pb2 import CreateMACCommandQueueItemRequest
host = "localhost:8000"
channel = grpc.insecure_channel(host)
ns = NetworkServerServiceStub(channel)
macCmd = CreateMACCommandQueueItemRequest()
devStatusReq = bytes.fromhex("06")
linkAdrReq = bytes.fromhex("0357FF0001")
devEUI = "deadbeefdead0001"
# cList = [devStatusReq, linkAdrReq, devStatusReq]
cList = [linkAdrReq]
macCmd.dev_eui = bytes.fromhex(devEUI)
macCmd.cid = 3
macCmd.commands = cList
print(macCmd.dev_eui)
ns.CreateMACCommandQueueItem(macCmd)
@brocaar help