Wifi Module Not working

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
JohnB710
Posts: 5
Joined: Tue Nov 15, 2016 6:01 pm

Wifi Module Not working

Post by JohnB710 »

I can not get the wifi module to work as a client or access point. I copied and pasted the Lua script for the GoPro. I used the correct SSID and password (both Lotus710). The wifi module is in the outside port. The wifi is enabled in the app.The activity light on the wifi module doesn't light up. The GoPro Hero 4 is on and wifi enabled (blinking blue light)
In the app under system status it says wifi is enabled (disconnected).

poll log:

[GoProWiFi] initializing
[GoProWiFi] send: AT+RST
[GoProWiFi] send: AT+CWMODE_CUR=1
[GoProWiFi] send: AT+CWJAP_CUR="Lotus710","Lotus710"
[GoProWiFi] could not connect to GoPro
[GoProWiFi] initializing
[GoProWiFi] send: AT+RST
[GoProWiFi] send: AT+CWMODE_CUR=1
[GoProWiFi] send: AT+CWJAP_CUR="Lotus710","Lotus710"

any ideas?

Thanks,

John[/img]

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

Post by brentp »

Hi John,

The current GoPro script requires that the built-in WiFi connectivity be *turned off* in the configuration. Otherwise the built-in WiFi code will take over the port the WiFi connector is plugged into, preventing the Lua script from running.
https://wiki.autosportlabs.com/RaceCapt ... WiFi#Notes

Future firmware versions will have built-in GoPro control, eliminating the need to have the Lua script.

Try it with WiFi turned off and see if the script starts responding. Thanks!
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

JohnB710
Posts: 5
Joined: Tue Nov 15, 2016 6:01 pm

Post by JohnB710 »

Thanks for your help Brent,

Turning off the wifi in the app did not change anything with my wifi module. On my friends module it will connect every time now. I get the same error as before. As soon as I replace the wifi module it connects.

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

Post by brentp »

So GoPro works with your friend's WiFi module, but not yours.

If you connect your suspected bad WiFi module, re-enable WiFi in the config (and write back your config), then power cycle RCP, and then look under system status in the app (top left menu) - what does it report for WiFi status?
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

JohnB710
Posts: 5
Joined: Tue Nov 15, 2016 6:01 pm

Post by JohnB710 »

I re-enabled Wifi, client mode, and access mode. Hit write and restarted RC. System status for client and access point is disabled for both.

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

Post by brentp »

Got it. Ok, so when you have those enabled, and you go to the RCP log (under the scripting window) - do you see anything like this? Just want to double-check. (Turns out we need an additional status indicator for WiFi to make sure we know the state of the WiFi sub-system)

*** Start! ***
[watchdog] Initializing...
Initializing CAN0 with baud rate 500000
CAN init success!
Initializing CAN1 with baud rate 500000
CAN init success!
IMU: init res=0
GPS: Initializing...
Start OBD2 task
BT: Detecting baud rate...
BT: Baudrate: 115200
timebase/logging/telemetry sample rate: 50/25/25
[lua] Initializing Lua state
[lua] memory usage: 16KB
[lua] Starting Lua Task
[wifi] Initializing...
[lua] Loading script. Length: 0
[lua] Successfully loaded script.
[ESP8266 Driver] Client config unchanged by update
[main] Setup Task complete!
[ESP8266 Driver] Checking WiFi Device...
[ESP8266 Driver] Initializing Wifi
GPS: provisioning attempt
GPS: probing baud rate: 921600
GPS: Using baud rate: 921600
GPS: module detected at: 921600
GPS: Configuring baud rate to: 115200
GPS: Message was successfully received.
GPS: Configuring was successful.
GPS: detected current update rate: 10
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
BT: Device responds at baud 115200
BT: Init complete
[esp8266] Version info:
AT version:0.23.0.0(Apr 24 2015 21:11:01)
SDK version:1.0.1
Ai-Thinker Technology Co. Ltd.
Apr 27 2015 13:55:14
[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 Driver] AP info:
SSID : RaceCapture/Pro MK2 539
Channel : 11
Encryption: 0
[ESP8266 Driver] Checking WiFi AP
[ESP8266 Driver] Retrieving Wifi IP info
[ESP8266 Driver] Checking Client
[ESP8266 Driver] Client is inactive.
[ESP8266 Driver] Checking WiFi AP
[ESP8266 Driver] AP configured properly
[ESP8266 Driver] Station IP: 192.168.4.1
[ESP8266 Driver] Checking Server
[ESP8266 Driver] Starting server on port: 7223
[USB] Starting telem stream on USB
[ESP8266 Driver] Socket connected on channel 0
[ESP8266 Driver] Connected on comm channel 0
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

JohnB710
Posts: 5
Joined: Tue Nov 15, 2016 6:01 pm

Post by JohnB710 »

This is what I get.

*** Start! ***
[watchdog] Initializing...
Initializing CAN0 with baud rate 1000000
CAN init success!
Initializing CAN1 with baud rate 1000000
CAN init success!
IMU: init res=0
GPS: Initializing...
Start OBD2 task
BT: Detecting baud rate...
BT: Baudrate: 115200
timebase/logging/telemetry sample rate: 50/50/50
[lua] Initializing Lua state
[lua] memory usage: 16KB
[lua] Starting Lua Task
[wifi] Initializing...
[lua] Loading script. Length: 3596
[lua] Successfully loaded script.
timebase/logging/telemetry sample rate: 50/50/50
[GoProWiFi] initializing
[GoProWiFi] send: AT+RST
GPS: provisioning attempt
GPS: probing baud rate: 921600
[GoProWiFi] send: AT+CWMODE_CUR=1
GPS: probing baud rate: 115200
[GoProWiFi] send: AT+CWJAP_CUR="Lotus710","Lotus710"
BT: Baudrate: 230400
[USB] Starting telem stream on USB
GPS: probing baud rate: 9600
[ESP8266 Driver] Failed to probe WiFi device
[ESP8266 Driver] Init failed

[wifi] Initialization failed!
[main] Setup Task complete!
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
[lapstats] Using fixed track config 0
BT: Baudrate: 9600
BT: Could not detect device using known baud rates.
BT: Failed to communicate with device.
BT: Restoring to target baud: 115200
BT: Baudrate: 115200
BT: Failed to provision module. A client may already be connected.
[GoProWiFi] could not connect to GoPro
[GoProWiFi] initializing
[GoProWiFi] send: AT+RST
[GoProWiFi] send: AT+CWMODE_CUR=1
[GoProWiFi] send: AT+CWJAP_CUR="Lotus710","Lotus710"
[GoProWiFi] could not connect to GoPro

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

Post by brentp »

That's the smoking gun. Ok, ping us back directly directly and we'll get you sorted out promptly.
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

FHB-PERFORMANCE
Posts: 24
Joined: Sun Mar 20, 2016 7:13 am
Location: Melbourne-Australia / Sao Paulo-Brazil

GoPri script not wor.9king

Post by FHB-PERFORMANCE »

Hi Brent,

I loaded the GoPro Script into my RaceCApture windows software (version 1.9) and RCP Mk2 2.10.2 and it hasn´t worked at all. I even put the same name and password for my GoPro Hero 3 as in the script but it is not working. How do I fix this? Thanks!

The Poll Log shows:

[lua] Gracefully stopping Lua Task
[lua] Destroying Lua State
[lua] Initializing Lua state
[lua] memory usage: 16KB
[lua] Starting Lua Task
[lua] Loading script. Length: 2647
[lua] Successfully loaded script.
[GoProWiFi] initializing
[ESP8266 Driver] Failed to acquire a free channel
Unable to create Serial for Beacon
[lua] Killing Lua task because it is unresponsive
[lua] Destroying Lua State
[lua] Initializing Lua state
[lua] memory usage: 16KB
[lua] Starting Lua Task
[lua] Loading script. Length: 2647
[lua] Successfully loaded script.
[GoProWiFi] initializing
[ESP8266 Driver] Failed to acquire a free channel
Unable to create Serial for Beacon
[lua] Killing Lua task because it is unresponsive
[lua] Destroying Lua State
[lua] Initializing Lua state
[lua] memory usage: 16KB
[lua] Starting Lua Task
[lua] Gracefully stopping Lua Task
Felipe

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

Post by brentp »

Hi FHB-PERFORMANCE:

It looks like you have WiFi enabled in your RaceCapture configuration. This conflicts with the GoPro script, the two cannot operate at the same time. See the notes here: https://wiki.autosportlabs.com/RaceCapt ... WiFi#Notes

We are targeting firmware 2.12.0 to enable native GoPro control without the use of the script. We don't have a firm ETA when this will be available.

Thanks, and sorry for the confusion!
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

jeffmcaffer
Posts: 31
Joined: Sat May 07, 2016 9:26 pm

Post by jeffmcaffer »

I see there is a best of 2.12 but no mention of GoPro or WiFi in the change log. Still thinking this will go in that release? My Lua script is getting pretty long...
Pro3 #24

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

Post by brentp »

Hi Jeff,

2.12.0 changes have been finalized - if no issues identified, this build will just be called the official release.

Full change log:
https://www.autosportlabs.com/help-us-t ... 12-0-beta/

GoPro triggering is penciled in for 2.13.0 :)
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

Post Reply