Answer the question
In order to leave comments, you need to log in
Wake on wi-fi lan, how to set it up?
hello. there is a 55pus6503 TV, it has a wowlan function (wake on wi-fi lan), I wanted the TV to turn on after turning on the computer (instead of the monitor), but something doesn’t work.
in a network a computer on a cable, phone and the TV set on air.
the phone has a philips tv remote program, it can turn off the TV when you press the power button, but not turn it on at all. when the TV is off, it turns on only the backlight of the screen, the screen itself remains black. But if you then press the home button, the TV turns on completely. other programs, both from the phone and from the computer, can only turn on the backlight. it is clear that the programs send wol packets, but it's not clear what the home button sends. wireshark shows wol packets when power button is pressed, but not when home button is pressed. httpcanary on the phone seems to show something when you press home, but maybe these are other packages.
#!/usr/bin/env python3
import struct
import re
import socket
import sys
MAC = '1c:5a:6b:b8:93:c0'
def wake_on_lan(mac):
if len(mac) == 12:
pass
elif len(mac) == 12 + 5:
mac = mac.replace(mac[2], '')
else:
raise ValueError('Incorrect MAC address format')
data = ''.join(['FFFFFFFFFFFF', mac * 16])
# Split up the hex values and pack.
send_data = b''
for i in range(0, len(data), 2):
send_data = b''.join([send_data, struct.pack('B', int(data[i: i + 2], 16))])
# Broadcast it to the LAN.
for _ in range(15):
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
sock.sendto(send_data, ('172.16.15.255', 9))
if __name__ == '__main__':
# mac = get_mac_address(sys.argv[1])
# print(mac)
wake_on_lan(MAC)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question