Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ESP8266 Bridge] [BUGFIX] Add check for WIFI params for ESP8266 bridge #12348

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zdanek
Copy link
Collaborator

@zdanek zdanek commented Jan 19, 2025

Description

When using WIFI ESP8266 bridge for the first time, QGC was not checking for existence of WIFI parameters. It resulted in SIGSEGV

FactPanelControllerLog: Missing parameter: "240:WIFI_PASSWORD1"
Signal: SIGSEGV (Segmentation fault)

Test Steps

Create fresh build, with fresh ini config, connect ESP8266 bridge to Ardupilot board.

This fix checks for existing WIFI params.

@zdanek zdanek self-assigned this Jan 19, 2025
@zdanek zdanek requested a review from dogmaphobic January 19, 2025 10:54
@DonLakeFlyer
Copy link
Contributor

This seems a bit like fixing the symptom not the problem. How come these parameters are missing? Aren't they required?

@zdanek
Copy link
Collaborator Author

zdanek commented Jan 20, 2025

TBH, I don't know. Are those nested inside Ardupilot? Or in QGC? And, can QGC (GS in general) set new params? That is, send from external world and AP will save it? It's possible for LUA scripts to add new params, and they will be seen from now on in AP parameters list.

@DonLakeFlyer
Copy link
Contributor

Those params should come from the device itself. When QGC does a request for parameters from the vehicle it should get these as well.

Somehow it got this:

            //-- Is there an ESP8266 Connected?
            if(_vehicle->parameterManager()->parameterExists(MAV_COMP_ID_UDP_BRIDGE, "SW_VER")) {
                _esp8266Component = new ESP8266Component(_vehicle, this);
                _esp8266Component->setupTriggerSignals();
                _components.append(QVariant::fromValue((VehicleComponent*)_esp8266Component));
            }

But not the other parameters. That is very odd.

Can you help clean this code to at least tell the user that the UI isn't going to work? Right now it's just gonna show nothing in the UI for the wifi ssid/password fields. And they won't work. There should be some sort of 'valid' bool on the controller or something which indicates the whole things is hosed up. And then the ui lets the user at least know.

@DonLakeFlyer
Copy link
Contributor

When you run a build with your fix. Do you still get a parameters missing error when you go to the setup page?

@DonLakeFlyer
Copy link
Contributor

@zdanek Any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants