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

fix(scan): Make sure scan struct is cleared before set #10282

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

me-no-dev
Copy link
Member

@me-no-dev me-no-dev commented Sep 3, 2024

new parameters could cause issues if scan is not cleared

fixes: #10281

Copy link
Contributor

github-actions bot commented Sep 3, 2024

Messages
📖 🎉 Good Job! All checks are passing!

👋 Hello me-no-dev, we appreciate your contribution to this project!


Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against 2a58393

Copy link
Contributor

github-actions bot commented Sep 3, 2024

Test Results

 56 files   -  83   56 suites   - 83   4m 17s ⏱️ - 1h 38m 31s
 21 tests  -   9   21 ✅  -   9  0 💤 ±0  0 ❌ ±0 
135 runs   - 168  135 ✅  - 168  0 💤 ±0  0 ❌ ±0 

Results for commit 2a58393. ± Comparison against base commit e70f4d3.

This pull request removes 9 tests.
performance.coremark.test_coremark ‑ test_coremark
performance.fibonacci.test_fibonacci ‑ test_fibonacci
performance.psramspeed.test_psramspeed ‑ test_psramspeed
performance.ramspeed.test_ramspeed ‑ test_ramspeed
performance.superpi.test_superpi ‑ test_superpi
test_touch_errors
test_touch_interrtupt
test_touch_read
validation.periman.test_periman ‑ test_periman

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Sep 3, 2024

Memory usage test (comparing PR against master branch)

The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.

MemoryFLASH [bytes]FLASH [%]RAM [bytes]RAM [%]
TargetDECINCDECINCDECINCDECINC
ESP32S3💚 -51K‼️ +103K💚 -5.83‼️ +10.61💚 -7K‼️ +12K💚 -16.28‼️ +36.35
Click to expand the detailed deltas report [usage change in BYTES]
TargetESP32S3
ExampleFLASHRAM
WiFi/examples/FTM/FTM_Initiator‼️ +20K‼️ +6K
WiFi/examples/FTM/FTM_Responder‼️ +21K‼️ +6K
WiFi/examples/SimpleWiFiServer‼️ +56K‼️ +7K
WiFi/examples/WPS‼️ +71K‼️ +7K
WiFi/examples/WiFiAccessPoint‼️ +56K‼️ +7K
WiFi/examples/WiFiBlueToothSwitch‼️ +48K‼️ +12K
WiFi/examples/WiFiClient‼️ +71K‼️ +7K
WiFi/examples/WiFiClientBasic‼️ +71K‼️ +7K
WiFi/examples/WiFiClientConnect‼️ +69K‼️ +7K
WiFi/examples/WiFiClientEnterprise‼️ +71K‼️ +7K
WiFi/examples/WiFiClientEvents‼️ +70K‼️ +7K
WiFi/examples/WiFiClientStaticIP‼️ +71K‼️ +7K
WiFi/examples/WiFiExtender‼️ +21K‼️ +6K
WiFi/examples/WiFiIPv6‼️ +20K‼️ +6K
WiFi/examples/WiFiMulti‼️ +21K‼️ +6K
WiFi/examples/WiFiMultiAdvanced‼️ +50K‼️ +5K
WiFi/examples/WiFiScan‼️ +71K‼️ +7K
WiFi/examples/WiFiScanAsync‼️ +71K‼️ +7K
WiFi/examples/WiFiScanDualAntenna‼️ +71K‼️ +7K
WiFi/examples/WiFiScanTime‼️ +71K‼️ +7K
WiFi/examples/WiFiSmartConfig‼️ +73K‼️ +7K
WiFi/examples/WiFiTelnetToSerial‼️ +71K‼️ +7K
WiFi/examples/WiFiUDPClient‼️ +71K‼️ +7K

@Jason2866
Copy link
Collaborator

Tested with https://github.com/TD-er/MCVE_ESPxx and a C6. Before only two APs where found. With the fix all APs around are found.

@TD-er
Copy link
Contributor

TD-er commented Sep 3, 2024

Also tried here using the same MCVE code ;) on a C3 which was failing very well before and now working just fine.

@TD-er
Copy link
Contributor

TD-er commented Sep 4, 2024

This PR should also address this macro:

#define WIFI_SCAN_PARAMS_DEFAULT_CONFIG() { \
    .scan_time.active.min = WIFI_ACTIVE_SCAN_MIN_DEFAULT_TIME, \
    .scan_time.active.max = WIFI_ACTIVE_SCAN_MAX_DEFAULT_TIME, \
    .scan_time.passive = WIFI_PASSIVE_SCAN_DEFAULT_TIME, \
    .home_chan_dwell_time = WIFI_SCAN_HOME_CHANNEL_DWELL_DEFAULT_TIME\
}

This macro is suggested to be used in the comments for esp_wifi_set_scan_parameters or maybe it is used inside this function too???
So it should at least also set the channel bitmap to some default or 0.

Edit:
This macro is part of the IDF code, so made an issue there: espressif/esp-idf#14505

@me-no-dev me-no-dev added the Status: Pending Merge Pull Request is ready to be merged label Sep 9, 2024
@me-no-dev me-no-dev merged commit e964a2d into master Sep 9, 2024
69 checks passed
@brentru
Copy link

brentru commented Sep 12, 2024

@P-R-O-C-H-Y @me-no-dev @TD-er As that macro is important and part of the ESP-IDF code, would it need to be addressed before a new version arduino-esp32 is released next or does this PR work without it?

@me-no-dev
Copy link
Member Author

@brentru we do not use that macro in Arduino

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Pending Merge Pull Request is ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WiFi scanNetworks may not find all APs
5 participants