Multicast Downlinks Queued but Not Reaching End Devices

Hi everyone,

I’m experiencing an issue with multicast group communication in my LoRaWAN setup. I have created a multicast group and am attempting to send downlinks to my end devices (STM32 B-L072Z-LRWAN1). The downlinks are getting queued and sent to the gateway, but they never seem to reach the end devices.

Here is the part of my code responsible for sending the multicast downlinks:

def send_downlink():
    now = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
    print(f"[{now}] Sending downlink to multicast group (Port: {FPORT}, Payload: {PAYLOAD_HEX})...")

    try:
        channel = grpc.insecure_channel(GRPC_SERVER)
        client = api.MulticastGroupServiceStub(channel)
        auth_token = [("authorization", f"Bearer {API_TOKEN}")]
        payload_bytes = bytes.fromhex(PAYLOAD_HEX)

        req = api.EnqueueMulticastGroupQueueItemRequest()
        req.queue_item.f_port = FPORT
        req.queue_item.data = payload_bytes
        req.queue_item.multicast_group_id = MULTICAST_GROUP_ID

        # Send request
        start_time = time.time()
        resp = client.Enqueue(req, metadata=auth_token)

        # Check for valid response
        if resp.f_cnt > 0:
            print(f"Downlink queued successfully! Frame Counter: {resp.f_cnt}")
            return True
        else:
            print("Downlink queued but with no valid frame counter")
            return False

    except grpc.RpcError as e:
        status_code = e.code()
        details = e.details()
        print(f"gRPC Error ({status_code.name}): {details}")

        if status_code == grpc.StatusCode.UNAUTHENTICATED:
            print("ERROR: Invalid or expired API token")
        elif status_code == grpc.StatusCode.NOT_FOUND:
            print("ERROR: Multicast group not found")
        return False

    except Exception as e:
        print(f"General error: {str(e)}")
        return False

I have configured the multicast group keys on the end devices as follows:

#if (LORAMAC_MAX_MC_CTX == 1)
#define SESSION_MC_KEYS_LIST \
        { \
            .KeyID    = MC_KEY_0, \
            .KeyValue = { 0x8d, 0x29, 0xc7, 0x0c, 0xd7, 0x10, 0x42, 0xca, 0xa9, 0xd2, 0x79, 0xe0, 0x8d, 0xb3, 0x94, 0xe2 }, \
        }, \
        { \
            .KeyID    = MC_APP_S_KEY_0, \
            .KeyValue = { 0x5d, 0xda, 0x93, 0xc3, 0xbf, 0x26, 0xc8, 0x2b, 0xe4, 0x6e, 0xbc, 0x54, 0xe6, 0x87, 0xd3, 0x0d }, \
        }, \
        { \
            .KeyID    = MC_NWK_S_KEY_0, \
            .KeyValue = { 0xfc, 0xc2, 0x36, 0x34, 0xb1, 0xa3, 0xc7, 0x50, 0xd3, 0xde, 0x68, 0xc1, 0xb8, 0xe9, 0x9a, 0xb4 }, \
        },
#else /* LORAMAC_MAX_MC_CTX > 1 */
#define SESSION_MC_KEYS_LIST \
        { \
            .KeyID    = MC_KEY_0, \
            .KeyValue = { 0x8d, 0x29, 0xc7, 0x0c, 0xd7, 0x10, 0x42, 0xca, 0xa9, 0xd2, 0x79, 0xe0, 0x8d, 0xb3, 0x94, 0xe2 }, \
        }, \
        { \
            .KeyID    = MC_APP_S_KEY_0, \
            .KeyValue = { 0x5d, 0xda, 0x93, 0xc3, 0xbf, 0x26, 0xc8, 0x2b, 0xe4, 0x6e, 0xbc, 0x54, 0xe6, 0x87, 0xd3, 0x0d }, \
        }, \
        { \
            .KeyID    = MC_NWK_S_KEY_0, \
            .KeyValue = { 0xfc, 0xc2, 0x36, 0x34, 0xb1, 0xa3, 0xc7, 0x50, 0xd3, 0xde, 0x68, 0xc1, 0xb8, 0xe9, 0x9a, 0xb4 }, \
        },
#endif /* LORAMAC_MAX_MC_CTX */

Despite the downlinks being queued and sent to the gateway, they are not reaching the end devices. Has anyone encountered a similar issue or have any suggestions on what might be going wrong?

Thanks in advance for your help!