Closed HernandoSergio closed 5 months ago
Hi @HernandoSergio,
This is an expected behavior: An internal package cannot take the decision to stop the unicast session of class C or class B at the end of a multicast session as the user may has started it at any time.
To inform the upper layer, the modem will generate 2 dedicated events SMTC_MODEM_EVENT_NO_MORE_MULTICAST_SESSION_CLASS_C
and SMTC_MODEM_EVENT_NO_MORE_MULTICAST_SESSION_CLASS_B
so that the modem user can decide whether or not return to class A by calling smtc_modem_set_class
with SMTC_MODEM_CLASS_A
Yes, I understand what you say, but the Class C unicast was not active before the multicast session, the device was in Class A.
After the end of a Class C multicast session, the device seems to keep the reception active, as the log shows receptions
Making some tests I can see that when the multicast class C session ends, it enables the unicast class C instead of just reverting to Class A (configuration prior to multicast session). Problem is in "lrlmac_class_c_multicast_stop_session", that enables the unicast class C session but "class_c_obj->started" is kept as true:
https://github.com/Lora-net/SWL2001/blob/45e19e5bf783bf874b8c9825b76c4c5befa8bcba/smtc_modem_core/lr1mac/src/lr1mac_class_c/lr1mac_class_c.c#L513-L520