GoPro goes to sleep?
I am using GoPro Hero5 Black
After about 3-5 minutes it seems that the connection from the go pro side drops?
Any ideas?
I think is because we cannot make it turn on, try sending WoL commands (ip is 10.5.5.9, port is 9, mac address is here: http://10.5.5.9/gp/gpControl/info) and see if that works.
Find mac address by http://10.5.5.9/gp/gpControl/Info put in script but running by python 3.5 appear this message on session4 (2.00)

any help? I've to use an exe to wake up... very bored not include e py script in the main script GoProStream.py
add a tab in that line. research before posting!
sorry...It Was a copy&paste code... I just add my MAC number... I'm researching since days on the matter to comand gopro directly for livestreaming in order to add wifi repeater and use underwater..., i'm trying to solve a particolar application of session 4 with little steps and many trial.. I'm not a programmer ;) and Python it's completely new to me...i'll try to not bother...
`def wake_on_lan(macaddress): """switches on remote computers using WOL. """
#check macaddress format and try to compensate
if len(macaddress) == 12:
pass
elif len(macaddress) == 12 + 5:
sep = macaddress[2]
macaddress = macaddress.replace(sep, '')
else:
raise ValueError('Incorrect MAC Address Format')
#Pad the sync stream
data = ''.join(['FFFFFFFFFFFF', macaddress * 20])
send_data = bytes.fromhex(data)
# Broadcast to lan
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
sock.sendto(send_data, (GOPRO_IP, 9))`
Modifying @5perseo's codeblock, this seems to work very well on GoPro Hero 4 Session. We can get rid of the struct import and just do a direct bytes.fromhex() decode on the re-constructed string to put together the wol datagram.
FYI this is my first python coding -- thanks for the opportunity! I would bet this doesn't keep the connection alive longer than 3-5 minutes, so might have to send the keepalive regularly during the stream.
forking, if i can get the thing to work consistently i'll pull.
Please do, thanks!