GoProStream icon indicating copy to clipboard operation
GoProStream copied to clipboard

GoPro goes to sleep?

Open Data-drone opened this issue 9 years ago • 6 comments

I am using GoPro Hero5 Black

After about 3-5 minutes it seems that the connection from the go pro side drops?

Any ideas?

Data-drone avatar Mar 12 '17 16:03 Data-drone

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.

KonradIT avatar Mar 12 '17 16:03 KonradIT

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)

error trying to wake up

any help? I've to use an exe to wake up... very bored not include e py script in the main script GoProStream.py

5perseo avatar Aug 10 '17 22:08 5perseo

add a tab in that line. research before posting!

KonradIT avatar Aug 10 '17 23:08 KonradIT

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...

5perseo avatar Aug 12 '17 15:08 5perseo

`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.

podfish avatar Nov 20 '18 21:11 podfish

Please do, thanks!

KonradIT avatar Nov 20 '18 21:11 KonradIT