如何避免与GoPro相机的超时连接(How to avoid timed out connection to GoPro camera)

编程入门 行业动态 更新时间:2024-10-28 00:18:00
如何避免与GoPro相机的超时连接(How to avoid timed out connection to GoPro camera)

我在Windows Vista PC上使用批处理文件来控制和下载GoPro Hero 3+ Black相机中的媒体。 感谢https://github.com/KonradIT/goprowifihack的WiFi黑客攻击,你可以curl网址告诉相机开始和停止录制,更改模式等。然后我可以使用wget从相机下载文件到我的硬盘。

我的问题是,在我的循环大约9次运行后(它变化)我失去了联系:

curl: (7) failed to connect to 10.5.5.9 port 80: Timed out

我正在做的事情会使连接超载吗?

这里只是我认为与我的问题相关的代码:

echo off setlocal enabledelayedexpansion REM turn on the camera curl http://10.5.5.9/bacpac/PW?t=password^&p=%%01 timeout 10 /nobreak REM delete all previous files curl http://10.5.5.9/camera/DA?t=password timeout 10 /nobreak REM begin recording video curl http://10.5.5.9/bacpac/SH?t=password^&p=%%01 timeout 60 /nobreak REM stop recording curl http://10.5.5.9/bacpac/SH?t=password^&p=%%00 for /l %%a in (1,1,1000) do ( REM download video files wget -b -r -A .MP4 -nH --cut-dirs=3 http://10.5.5.9:8080/videos/DCIM/100GOPRO/ timeout 10 /nobreak REM change to timelapse mode curl http://10.5.5.9/camera/CM?t=password^&p=%%03 timeout 5 /nobreak REM begin timelapse curl http://10.5.5.9/bacpac/SH?t=password^&p=%%01 timeout 200 /nobreak REM end timelapse curl http://10.5.5.9/bacpac/SH?t=password^&p=%%00 REM download JPEGs wget -b -r -A .JPG -nH --cut-dirs=3 http://10.5.5.9:8080/videos/DCIM/100GOPRO/ timeout 10 /nobreak REM change to video mode curl http://10.5.5.9/camera/CM?t=password^&p=%%00 REM wait for awhile until the next measurement timeout 200 /nobreak REM delete all files (since enough time has elapsed for them to be downloaded) curl http://10.5.5.9/camera/DA?t=password timeout 10 /nobreak REM begin recording video curl http://10.5.5.9/bacpac/SH?t=password^&p=%%01 timeout 60 /nobreak REM end recording video curl http://10.5.5.9/bacpac/SH?t=password^&p=%%00 ) endlocal

I'm using a batch file on a Windows Vista PC to control and download media from a GoPro Hero 3+ Black camera. Thanks to the WiFi hacking ingenuity of https://github.com/KonradIT/goprowifihack, you can curl URLs to tell the camera to start and stop recording, change modes, etc. Then I can use wget to download the files from the camera to my hard drive.

My issue is that after about 9 runs through my loop or so (it varies) I lose connection:

curl: (7) failed to connect to 10.5.5.9 port 80: Timed out

Is there something I'm doing that overloads the connection?

Here's just the code that I think is relevant for my issue:

echo off setlocal enabledelayedexpansion REM turn on the camera curl http://10.5.5.9/bacpac/PW?t=password^&p=%%01 timeout 10 /nobreak REM delete all previous files curl http://10.5.5.9/camera/DA?t=password timeout 10 /nobreak REM begin recording video curl http://10.5.5.9/bacpac/SH?t=password^&p=%%01 timeout 60 /nobreak REM stop recording curl http://10.5.5.9/bacpac/SH?t=password^&p=%%00 for /l %%a in (1,1,1000) do ( REM download video files wget -b -r -A .MP4 -nH --cut-dirs=3 http://10.5.5.9:8080/videos/DCIM/100GOPRO/ timeout 10 /nobreak REM change to timelapse mode curl http://10.5.5.9/camera/CM?t=password^&p=%%03 timeout 5 /nobreak REM begin timelapse curl http://10.5.5.9/bacpac/SH?t=password^&p=%%01 timeout 200 /nobreak REM end timelapse curl http://10.5.5.9/bacpac/SH?t=password^&p=%%00 REM download JPEGs wget -b -r -A .JPG -nH --cut-dirs=3 http://10.5.5.9:8080/videos/DCIM/100GOPRO/ timeout 10 /nobreak REM change to video mode curl http://10.5.5.9/camera/CM?t=password^&p=%%00 REM wait for awhile until the next measurement timeout 200 /nobreak REM delete all files (since enough time has elapsed for them to be downloaded) curl http://10.5.5.9/camera/DA?t=password timeout 10 /nobreak REM begin recording video curl http://10.5.5.9/bacpac/SH?t=password^&p=%%01 timeout 60 /nobreak REM end recording video curl http://10.5.5.9/bacpac/SH?t=password^&p=%%00 ) endlocal

最满意答案

问题似乎是在后台运行wget同时还记录了更多媒体使摄像机超载并导致它关闭Wifi。

从wget删除-b参数以避免wget在后台运行可以解决此问题。

The issue seems to be that running wget in the background while also recording more media overloads the camera and causes it to shut down the Wifi.

Removing the -b parameter from wget to avoid wget running in the background fixes this issue.

更多推荐

本文发布于:2023-07-28 23:43:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1310286.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:相机   avoid   GoPro   camera   connection

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!