GoPro or WiFi issue?

Race Capture Pro hardware installation- power, wiring, physical installation, etc. See the dedicated forum for Sensor related topics

Moderators: JeffC, rdoherty, stieg, brentp

Post Reply
MCScott
Posts: 13
Joined: Sun Apr 10, 2016 11:40 pm

GoPro or WiFi issue?

Post by MCScott »

I'm working on setting up to control GoPro from my RCP Mk2 using WiFi module. Using a slightly modified version of the standard LUA script designed to trigger on logging start, rather than speed, I successfully got it to trigger video start/stop a few times in a bench test. Then I moved it to the car to do a real logging with video test - and the GoPro control didn't work anymore, and doesn't work now on the bench either.

With debugging on, I get the following log in the script window starting from plugging the RCP in. The log is the same whether the GP is turned on and Wifi enabled, or not. The log is showing some errors which make me wonder if the WiFi module is bad? Please let me know, Lucky Dog race coming up in 2 weeks :)

*** Start! ***
[watchdog] Initializing...
sizeof LoggerConfig: 13452
[CAN device] Initializing CAN0 with baud rate 500000
[CAN device] CAN init success!
[CAN device] Initializing CAN1 with baud rate 500000
[CAN device] CAN init success!
IMU: init res=0
GPS: Initializing...
[OBD2] Init current values
BT: Detecting baud rate...
BT: Baudrate: 115200
timebase/logging/telemetry sample rate: 50/10/10
[lua] Initializing Lua state
[lua] memory usage: 16KB
[lua] Starting Lua Task
[wifi] Initializing...
[lua] Loading script. Length: 2636
[lua] Successfully loaded script.
[GoProWiFi] initializing
[GoProWiFi] send: AT+RST
GPS: provisioning attempt
GPS: probing baud rate: 921600
[ESP8266 Driver] Client config unchanged by update
[main] Setup Task complete!
[ESP8266 Driver] Checking WiFi Device...
[ESP8266 Driver] Initializing Wifi
[esp8266] Version info:
AT version:0.40.0.0(Aug 8 2015 14:45:58)
SDK version:1.3.0
Ai-Thinker Technology Co.,Ltd.
Build:1.3.0.2 Sep 11 2015 11:48:04
[esp8266] Initialized
[ESP8266 Driver] Initialization successful
[ESP8266 Driver] Checking WiFi Device...
[ESP8266 Driver] Increasing baud to 230400
[ESP8266 Driver] Checking WiFi Device...
[ESP8266 Driver] Checking WiFi Device...
[ESP8266 Driver] Checking Client
[ESP8266 Driver] Retrieving Wifi Client Info
[ESP8266 Driver] Checking Client
[ESP8266 Driver] Client is inactive.
[ESP8266 Driver] Checking WiFi AP
[ESP8266 Driver] Retrieving Wifi AP Info
[esp8266] get_ap_info_cb failed.
[ESP8266 Driver] Failed to read AP info
[ESP8266 Driver] Checking WiFi AP
[ESP8266 Driver] AP is inactive.
[ESP8266 Driver] Checking Server
[ESP8266 Driver] Starting server on port: 7223
[USB] Starting telem stream on USB
[GoProWiFi] send: AT+CWMODE_CUR=1
[at] Unhandled msg received: OK

BT: Device responds at baud 115200
BT: Init complete
GPS: probing baud rate: 115200
[GoProWiFi] send: AT+CWJAP_CUR="ScottBGoPro","5B074D46E9"
GPS: probing baud rate: 9600
GPS: Using baud rate: 9600
GPS: module detected at: 9600
GPS: Configuring baud rate to: 115200
GPS: Message was successfully received.
GPS: Configuring was successful.
GPS: detected current update rate: 1
GPS: Configuring update rate to 10: win
GPS: Configuring NMEA messages
GPS: Message was successfully received.
GPS: Successfully configured NMEA
GPS: configure message type: win
GPS: configure navigation data message interval: win
GPS: Configuring Gnss Navigation Mode: win
GPS: Disabling NMEA messages
GPS: Message was successfully received.
GPS: Successfully disabled NMEA messages
GPS: provisioned
[ESP8266 Driver] Client connected
[ESP8266 Driver] Checking Client
[ESP8266 Driver] Client got IPv4 address
[ESP8266 Driver] Checking Client
[ESP8266 Driver] Retrieving Wifi Client Info
[at] Command timed out
[esp8266] get_ap_cb failed.
[ESP8266 Driver] Checking Client
[at] Unhandled msg received: OK

[GoProWiFi] could not connect to GoPro
[GoProWiFi] initializing
[GoProWiFi] send: AT+RST
[at] Unhandled msg received: OK

[ESP8266 Driver] Client disconnected
[ESP8266 Driver] Checking Client
[ESP8266 Driver] Client is inactive.
[at] Unhandled msg received:
[at] Unhandled msg received:
[at] Unhandled msg received: f`ffff~f`xfxxf
[GoProWiFi] send: AT+CWMODE_CUR=1
[at] Unhandled msg received: xfx
[GoProWiFi] send: AT+CWJAP_CUR="ScottBGoPro","5B074D46E9"
[at] Unhandled msg received: xx
[GoProWiFi] could not connect to GoPro
[GoProWiFi] initializing
[GoProWiFi] send: AT+RST
[at] Unhandled msg received: x
[GoProWiFi] send: AT+CWMODE_CUR=1
[at] Unhandled msg received: xfx
[GoProWiFi] send: AT+CWJAP_CUR="ScottBGoPro","5B074D46E9"
[at] Unhandled msg received: xx

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Hi,

When you use the GoPro script, you need to turn off WiFi in the RaceCapture configuration - otherwise the script and the built-in wifi functions will conflict with each other.

Try turning off WiFi under wireless configuration and see if that fixes things.

Thanks, and let us know if that works!
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

MCScott
Posts: 13
Joined: Sun Apr 10, 2016 11:40 pm

Post by MCScott »

WiFi was already turned off. As I said above, it worked fine the first few times I tried it on the bench, then ceased to work and started putting errors to the log as documented above.

MCScott
Posts: 13
Joined: Sun Apr 10, 2016 11:40 pm

Post by MCScott »

OK, just tried reflashing the firmware that was already in it (2.12) and rechecking wireless setup and script. Same problem.

So I tried flashing previous version firmware (2.11) and it is now working again, both on bench and in the car. Keeping my fingers crossed that the issue does not reoccur :)

Scott

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Glad you figured it out, but it should definitely work the same on 2.12 - and you want the latest firmware for the stability improvements and features.

The log messages starting with ESP8266 is evidence that WiFi is turned on. If you have time, try:

* flashing 2.12 again,
* ensure Wifi is turned off at the top level
* then write the config back.
* Then, read-back the config after a power cycle to verify the setting is off.

Finally, check the log to ensure there are no WiFi initialization messages

Thanks for working through it!
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

MCScott
Posts: 13
Joined: Sun Apr 10, 2016 11:40 pm

Post by MCScott »

Brent,

I have it working with 2.12 now. The problem I had seems to be caused by, under circumstances I have not been able to replicate, WiFi access mode being accidentally turned on during reads/writes/flashes. Even though the WiFi module itself remains turned off, this results in the error conditions I logged above.

So for those having GoPro issues, make sure every toggle switch under Wireless->WiFi (WiFi module, WiFi Client Mode, WiFi Access Mode) is turned off.

Scott

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Great. Thanks for the update!~
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

Post Reply