Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Original thread:
Post 7 made on Thursday December 17, 2009 at 11:21
Sogliphy
Long Time Member
Joined:
Posts:
July 2007
186
On December 16, 2009 at 17:01, Prontosw said...
Installed the new firmware & PEP today and tried to get the script above to use the WOL function but no luck... does the script needs to be changed to get it working poperly ?

It likely has to be changed yes, since opening a TCP connection to a broadcast address will probably not work (TCP is a point-to-point protocol; there is no TCP server listening on the broadcast address to accept the connection), so you'll never get an 'onConnect'.


Try something like:




function sendWOL(aMacAddress) {
   var s, i, packet;

   // Constuct payload: 6 0xFF bytes..
   packet = "\xFF\xFF\xFF\xFF\xFF\xFF";
   // ..followed by 16 repetitions of the MAC address
   for (i = 0; i < 16; i += 1) {
       packet += aMacAddress;
   }

   s = new UDPSocket();
   // Now, send that packet 40 times, in UDP packets,
   // to the "all multicast hosts" address.
   for (i = 0; i < 40; i += 1) {
       s.send(packet, "224.0.0.1", 7);
   }
   s.close();
}
// Send WOL to 00:17:55:BE:00:F0
sendWOL("\x00\x17\x55\xBE\x00\xF0");





(Note: I haven't tested this code)


Hosting Services by ipHouse