benjojo / de-ip-hdmi

Convert a IP HDMI converter into a MKV stream

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BroadcastWakeups() might not be assembling packet correctly

Strangework opened this issue · comments

I don't have the necessary device to test this, but it seems like BroadcastWakeups() might not be modifying the magic packet correctly.

Below the declaration of the magic packet byte slice, the MAC address is written to it, though instead of writing to consecutive bytes, the same byte is overwritten by each consecutive byte in the MAC.

Is this (not) an error?

The magic packet is just a magical and mysterious to me, though in that labeled code fragment, each statement is overwriting the same byte. The packet will not contain the MAC address after, it would only contain the tail end of it at index 0.

Assuming we want the MAC address written at the very beginning of the packet, the amended statements would be:

    packet[0] = macbytes[0]
    packet[1] = macbytes[1]
    packet[2] = macbytes[2]
    packet[3] = macbytes[3]
    packet[4] = macbytes[4]
    packet[5] = macbytes[5]

Oh crap! I forgot to increment the numbers, One moment