I’ve made an application that joins to a spesific multicast group and visualises the data received. The app works fine in JAVA-mode and also in Android mode.
The problem is, that if the wlan-network is created from the same device in which the receiving client application is running, the data is not received (in practice creating when creating a hotspot). In case there is a separate device (eg. another phone/hotspot or router) providing the network, there are no problems.
I’ve understood that it is a question of somehow binding the client’s multicast group to a specific adapter. A term “multicast lock” might be related to this topic. I’ve not been able to find a solution.
I’m completely unfamiliar with java, having a c+±backgound.
« Allows an application to receive Wifi Multicast packets. Normally the Wifi stack filters out packets not explicitly addressed to this device. Acqiring a MulticastLock will cause the stack to receive packets addressed to multicast addresses. Processing these extra packets can cause a noticeable battery drain and should be disabled when not needed »
Thank you. I tested that, without success. My app is capable of receiving multicast as long as the network is not created by the phone where the app is running. So maybe it is not about the lock?
Br.
Aaro
@Aaro ===
sorry: you have asked for multicastLock and i have answered for that; if it does not help i have to get some simple code from your app in order to test and see: of course multicastlock is not the unique possible guilty…