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

How to setup multicast transmission with Chirpstack #24

Closed
be-mar opened this issue Nov 11, 2024 · 20 comments
Closed

How to setup multicast transmission with Chirpstack #24

be-mar opened this issue Nov 11, 2024 · 20 comments
Assignees
Labels
LoRaWan-E5-Node Label for LoRaWan-E5-Node UAY Unassigned yet

Comments

@be-mar
Copy link

be-mar commented Nov 11, 2024

Hi all,
I want to establish multicast communication between chirpstack server and WIO-e5 mini modules.

Currently as a test base I'm using Lorawan-end-node. Unicast communication in class C works perfectly but seems like multicast messagess doesn't reach my debug module.

I've debugger connected to WIO-e5 development kit. Each time I try to send message from chirpstack using swagger API debugger doesn'y stop in defined breakpoint. I assume there is a problem with keys.

Could someone give me a guidence how to setup proper multicast communication?
Thanks

@mingzhangqun
Copy link
Member

mingzhangqun commented Nov 13, 2024

Hello, I would like to confirm with you whether it is one node transmission to multiple chirpstacks? Did you correctly add nodes to each chirpstack? Can you provide your detailed configuration?

@be-mar
Copy link
Author

be-mar commented Nov 14, 2024

Sorry for late reply.
One chirpstack server - to two C class devices.

Not sure what you are asking about but here:

Gateway works as a packet forwarder:
image

Gateway is defined in chirpstack:
image

Unicast frames are visible here:
image
Thing is that when I use api to post a multicast message the message itself is not visible in that log...

Device profile defined here:
image

Class C support enabled
image

Devices attached to application:
image

Mulitcast group with defined devices:
image

And gateway:
image

Config of multicast group:
image

Unicast messages from end device:
image
image

@mingzhangqun
Copy link
Member

@be-mar
Copy link
Author

be-mar commented Nov 15, 2024

I tried to use this function for stock chip by typing at commands. Nothing happened. Then I decided to build lora-end-node project and manually define keys in se-identity.h but same. I can set breakpoints and see only unicast messages

@be-mar
Copy link
Author

be-mar commented Nov 16, 2024

BTW. I use OTAA activation. Does it matter?

@mingzhangqun
Copy link
Member

mingzhangqun commented Nov 18, 2024

I tried to use this function for stock chip by typing at commands. Nothing happened. Then I decided to build lora-end-node project and manually define keys in se-identity.h but same. I can set breakpoints and see only unicast messages

Can you tell me all your detailed commands?

@be-mar
Copy link
Author

be-mar commented Nov 19, 2024

  1. AT
  2. AT+ ID= DevEui, read and set in chiprstack server
  3. AT+KEY=APPKEY, generated from chirpstack server
  4. AT+ CLASS= C
  5. AT+LW=MC,"ON", "00075126", "5c476f6789fb4e1f27e7af998f628d82","e64507a08270a7110343b8eeb69f4c6e" //values from screenshots
  6. AT+ MODE= LWOTAA
  7. AT+ JOIN

image

And later I can send unicast messages in both directions
image

@mingzhangqun
Copy link
Member

Ok, thank you for your reply. I will analyze this problem next week.

@be-mar
Copy link
Author

be-mar commented Nov 27, 2024

Have you had an opportunity to check this issue?

@Lesords Lesords added UAY Unassigned yet LoRaWan-E5-Node Label for LoRaWan-E5-Node labels Nov 28, 2024
@mingzhangqun
Copy link
Member

mingzhangqun commented Dec 3, 2024

AT+ CLASS=C must run after AT+join. Can you give it a try and let me know?
Thank you.

btw, which version of chirpstack do you use?

@mingzhangqun
Copy link
Member

I've tried on two devices E5 nodes COM77 and COM78.
COM77
» AT+ID
« +ID: DevAddr, 01:56:81:C9
+ID: DevEui, 2C:F7:F1:20:24:40:00:EA
+ID: AppEui, 80:00:00:00:00:00:00:06
AT+MODE=LWOTAA
AT+DR=EU868
AT+ID=DevAddr,"015681c9"
AT+KEY=APPKEY,"a98dd0ae84f9778f7720ca844785b04e"
AT+KEY=NWKSKEY,"650b74915ead6846345de75508fb5b50"
AT+KEY=APPSKEY,"7bb1d5c7fc950a66c3c8576129ddef12"
AT+LW=MC,ON,"019510a0","850f4525bb585e6ed9afa2fa72dc63d0","e28737a5ac72d22dce22c0b299db2073",0
AT+JOIN
AT+CLASS=C

COM78
» AT+ID
« +ID: DevAddr, 01:1E:96:A0
+ID: DevEui, 2C:F7:F1:20:32:30:C4:9B
+ID: AppEui, 80:00:00:00:00:00:00:06
AT+MODE=LWOTAA
AT+DR=EU868
AT+ID=DevAddr,"011e96a0"
AT+KEY=APPKEY,"2b691f7af4c6f332c98e144085f8607d"
AT+KEY=NWKSKEY,"64726033f21b8369b4fc3508ca9b2b40"
AT+KEY=APPSKEY,"3f330c7777a917f26e6bee74f8a20a2a"
AT+LW=MC,ON,"019510a0","850f4525bb585e6ed9afa2fa72dc63d0","e28737a5ac72d22dce22c0b299db2073",0
AT+JOIN
AT+CLASS=C

Image
Image

Image
Image
Image

@be-mar
Copy link
Author

be-mar commented Dec 4, 2024

AD 2513928451
I tested it previously on Chirpstack v3 and v4 with the same results. I'll try that order of commands.

Where can I find these values?
AT+KEY=APPKEY,"a98dd0ae84f9778f7720ca844785b04e"
AT+KEY=NWKSKEY,"650b74915ead6846345de75508fb5b50"
AT+KEY=APPSKEY,"7bb1d5c7fc950a66c3c8576129ddef12"

@be-mar
Copy link
Author

be-mar commented Dec 4, 2024

Update. Tested with AT commands and works! But as you can see I didn't specify AT+KEY=APPKEY, AT+KEY=NWKSKEY, AT+KEY=APPSKEY.
image

Have to verify if will that work with lora-end-node project. Could you give me some tips what needs to be modified there to enable multicast messages?

@mingzhangqun
Copy link
Member

mingzhangqun commented Dec 5, 2024

It's great.
These keys are randomly generated.

Currently the lora-end-node project is not verified with multicast.
You can reference this repo:
https://github.com/SylvainMontagny/STM32WL

Thank you.

@be-mar
Copy link
Author

be-mar commented Dec 5, 2024

These keys are randomly generated. So should I skip this step or generate this keys and somhow store them in server. Sorry, I don't get it 🤔

@mingzhangqun
Copy link
Member

Save both in server and e5-node.

@be-mar
Copy link
Author

be-mar commented Dec 12, 2024

I'm closing this issue as it is working with at commands. Thanks

@be-mar
Copy link
Author

be-mar commented Feb 12, 2025

@mingzhangqun one side question. How did you set chirpstack to see that Queue tab in MC group?

It's apparently missing from my server..

Image

@be-mar be-mar reopened this Feb 12, 2025
@mingzhangqun
Copy link
Member

@be-mar There may be differences between versions, please try v4.10.1.
Thank you.

@be-mar
Copy link
Author

be-mar commented Feb 17, 2025

Yep, I had v4.9. After upgrade to 4.11 I can see this tab. Thx

@be-mar be-mar closed this as completed Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LoRaWan-E5-Node Label for LoRaWan-E5-Node UAY Unassigned yet
Projects
Status: Done
Development

No branches or pull requests

3 participants