Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

McGroupBitMask not set #11

Open
darkfader opened this issue May 12, 2022 · 0 comments
Open

McGroupBitMask not set #11

darkfader opened this issue May 12, 2022 · 0 comments

Comments

@darkfader
Copy link

In stack code: (STM32Cube_FW_WL_V1.2.0 based on LoRaMac-node)

                if (mcpsIndication->Multicast == 1) {
                    // Message received on a multicast address
                    // Check McGroupBitMask
                    uint8_t groupId = LoRaMacMcChannelGetGroupId(mcpsIndication->DevAddress);
                    if ((groupId == 0xFF) ||
                        ((FragSessionData[fragIndex].FragGroupData.FragSession.Fields.McGroupBitMask & (1 << groupId)) == 0)) {
                        // Ignore message
                        cmdIndex = mcpsIndication->BufferSize;
                        break;
                    }
                }

My groupId was 0 but apparently required a bit to be set in McGroupBitMask. To make it work for my case, I added McGroupBitMask to the fragmentation session setup in fuota.go.

					FragSession: fragmentation.FragSessionSetupReqPayloadFragSession{
						FragIndex: d.opts.FragmentationSessionIndex,
						McGroupBitMask: [4]bool{true, false, false, false},   // assume groupId to be 0 :)
					},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant