Latest IOS 9.3.1 update has broken WOL
#1
Noticed it first on my iPad (air 2).did the update on my Gf's air 2 and all of a sudden her WOL stopped working as well. I tested hers minutes before doing the IOS 9.3.1 update and WOL was indeed working.

Anyone else noticed this?

Edit, just did the same update on my iPhone 6 and surprise the WOL Is Still working. Why would it only affects the iPads? Weird...
Reply
#2
I have the same problem.
Reply
#3
Dont work on my Iphone 6 either.
Reply
#4
http://forum.kodi.tv/showthread.php?tid=266328
Reply
#5
This is the snippet that does the WOL
https://github.com/joethefox/Unofficial-...4249-L4298

it never changed from the first implementation and is working as expected here. if someone wants to dirty his hands and wants to improve this code, it's all well and good.
Reply
#6
I personally think, that the code is fine, but maybe Apple changed anything in iOS which has to be selected or deselected in options. I have a iPad Air 2. iOS 9.3 changed something, I think. I beg for help what I can do.

computer:
Windows 10 Pro 1511
Intel driver installed
fast boot disabled
-> Kore does work and also my FRITZ!Box 7490 has a button in WebInterface which also works.
Reply
#7
You closed my thread as duplicate, but mine is older Wink
http://forum.kodi.tv/showthread.php?tid=266328
Reply
#8
WOL worked in the past with that iPad before iOS 9.3.

And every other feature is working very nice, but WOL doesn't work.
Reply
#9
@Klaus1189, my bad, I didn't notice that!
I really don't know what to do: I'm using iOS 9.3.2 (ipad2 and iphone5s) and WOL is working as always. I found the linked snippet and it worked, my network skills stop here. Some skilled coder should help me in this path, otherwise I don't know what to change.
Reply
#10
Good to read that. As you may already know, I have an iPad Air 2 and the changes were introduced in iOS 9.3. Are there any other things you need to know, maybe a log file or similar?
Reply
#11
I need a new piece of code Smile or someone that tells me what's wrong with the code I've linked
Reply
#12
Hi,
for me WOL is not working since Remote Version 1.5.4.

http://forum.kodi.tv/showthread.php?tid=258697

I tried a few things and found out that the magic packet is malformed.
Then I wrote a little c-application with just that WOL snippet that joethefox linked. It worked without problems.

Perhaps someone can check the generated magic packet - but I think it doesn't really help since joethefox cannot repeat on his hardware

Sad
Reply
#13
(2016-06-13, 16:04)joethefox Wrote: I need a new piece of code Smile or someone that tells me what's wrong with the code I've linked

This piece of code I am using in my app. So far I haven't heard from anyone it isn't working:

Code:
+ (void)sendWOL:(NSString *)MAC withPort:(NSInteger)WOLport
{
    CFSocketRef     WOLsocket;
    
    NSLog(@"MAC = %@", MAC);
    
    WOLsocket = CFSocketCreate(kCFAllocatorDefault, PF_INET, SOCK_DGRAM, IPPROTO_UDP, 0, NULL, NULL);
    
    if (!WOLsocket) {
        NSLog(@"CFSocketCreate failed!!!");
    } else {
        NSLog(@"Socket created.");
        
        int desc = -1;
        desc = CFSocketGetNative(WOLsocket);
        int yes = -1;
        
        if (setsockopt (desc, SOL_SOCKET, SO_BROADCAST, (char *)&yes, sizeof (yes)) < 0) {
            NSLog(@"Set Socket options failed");
        }
        
        unsigned char ether_addr[6];
        
        int idx;
        
        for (idx = 0; idx + 2 <= [MAC length]; idx += 3)
        {
            NSRange     range = NSMakeRange(idx,2);
            NSString    *hexStr = [MAC substringWithRange:range];
          
            NSScanner   *scanner = [NSScanner scannerWithString:hexStr];
            unsigned int intValue;
            [scanner scanHexInt:&intValue];
            
            ether_addr[idx/3] = intValue;
        }
        
        /* Build the message to send - 6 x 0xff then 16 x MAC address */
        
        unsigned char message [102];
        unsigned char *message_ptr = message;
        
        memset(message_ptr, 0xFF, 6);
        message_ptr += 6;
        for (int i = 0; i < 16; ++i) {
            memcpy(message_ptr, ether_addr, 6);
            message_ptr += 6;
        }
        
        struct sockaddr_in addr;
        
        memset(&addr, 0, sizeof(addr));
        addr.sin_len = sizeof(addr);
        addr.sin_family = AF_INET;
        addr.sin_addr.s_addr = 0xffffffff;
        addr.sin_port = htons(WOLport);
                
        CFDataRef message_data = CFDataCreate(NULL, (unsigned char*)&message, sizeof(message));
        CFDataRef destinationAddressData = CFDataCreate(NULL, (const UInt8 *)&addr, sizeof(addr));
        
        CFSocketError CFSocketSendData_error = CFSocketSendData(WOLsocket, destinationAddressData, message_data, 30);
        
        if (CFSocketSendData_error) {
            NSLog(@"CFSocketSendData error: %li", CFSocketSendData_error);
        } else {
            NSLog(@"Message sent");
        }
    }  
}

headers:

#include <sys/socket.h>
#include <netinet/in.h>

and headers like route.h, if_types.h, if_ether.h, if_arp.h (which I think are already included in your project)
Proud owner of comics42.shop 
Reply
#14
@rschiks, that's a nice gift! thank you! (among other things few days ago was my birthday Big Grin). I will try and include this piece of code for sure.
Reply
#15
(2016-06-15, 17:12)joethefox Wrote: @rschiks, that's a nice gift! thank you! (among other things few days ago was my birthday Big Grin). I will try and include this piece of code for sure.

Well, you don't have to thank me! I think it's the other way around. When I started two years ago I have learned a lot from your code. Big Grin
Just try it....

I can imagine it's difficult to troubleshoot since you can't reproduce the problem yourself. Maybe a completely different piece of code helps.

BTW: I call the method like this: [WOL sendWOL:@"00-1F-D0-5A-1C-E3" withPort:9];

And happy birthday!!! RoflRofl
Proud owner of comics42.shop 
Reply

Logout Mark Read Team Forum Stats Members Help
Latest IOS 9.3.1 update has broken WOL0