Closed debugholic closed 5 years ago
@DebugHolic certainly living up to your name!
Thank you very much for such a detailed issue. I will definitely look into this tomorrow. I hadn't even considered someone may want to use this on a hotspot :+1:
Any other issues let me know.
Hi @DebugHolic
I had a look into this today, unfortunately I couldn't get it to work correctly. I added the two changes in, setup a hotspot on an iPhone 6S (iOS 10.1.1), then ran the Example app. No connected devices would show up for me.
Hi @squarefrog
Thank you for your consideration.
I'm so sorry. I've been too busy to see your comment. I MISSED two important corrections. You should also modify GCDWebServerFunctions in GCDWebServer and GCDAsyncUdpSocket in CocoaAsyncSocket.
The corrections are as following.
GCDWebServerFunctions - GCDWebServerGetPrimaryIPAddress
// const char* primaryInterface = "en0"; // WiFi interface on iOS
// if (strcmp(ifap->ifa_name, primaryInterface))
if (strncmp(ifap->ifa_name, "en", 2) && strncmp(ifap->ifa_name, "bridge", 6))
It helps you to receive events from DLNA device.
GCDWebServer - performMulticastRequest: forGroup: onInterface: error
if ((socket4FD != SOCKET_NULL) && groupAddr4 && interfaceAddr4) {
......
ADD following codes
status = setsockopt(socket4FD, IPPROTO_IP, IP_MULTICAST_IF, &nativeIface->sin_addr, sizeof(nativeIface->sin_addr));
if (status != 0) {
err = [self errnoErrorWithReason:@"Error in setsockopt() function"];
return_from_block;
}
// Using IPv4 only
[self closeSocket6];
result = YES;
}
OK, it's over. It works for me.
I'm developing an APP using your library and unfortunately I found another issue.
I want to get volume range from UPnP Renderer Device and it is in RenderingControlService description. But, CocoaUPnP doesn't parse the service description, so I am adding the codes to my project.
I ask for you to look this issue. :-)
Thank you @DebugHolic,
You've saved my day!
Hello.
I found this issue to previous release but it is still remained so I thought to need to notify it.
Before reading, I'm not good at English. Therefore, although my wording is some strange, please understand.
The issue is occurred as following situation :
I think it is because of the problem that interface name of personal hotspot is bridge, not en.
Original Code
So, I ask to modify the method availableNetworkInterfaces of SSDPServiceBrowser for all network environment. For example :
Modified Code
cf) The method GCDWebServerGetPrimaryIPAddress in GCDWebServerFunctions of GCDWebServer has to be modified to subscribe event.
Also, there is another issue only in iOS 10. It is phone and devices are not in same network(only bridge).
I don't know why it is occurred only in iOS 10, but anyway it seems phone and device get different addresses in bridge network.
This issue was solved by modifying setupMulticastSocket.
Original Code
Modified Code
Oh, Sorry it was too long to read. :-)
I always appreciate and respect your effort. Thank you.