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 no WiFi RF packet send issue and upgrade to IDF v4.4(latest) #23

Closed
wants to merge 4 commits into from

Conversation

lida2003
Copy link
Contributor

Please test this PR before merge.
As my gs is NOT working(black screen issue).

Please consult @JulesThuillier @rottaran 's point of view in esp-idf 4.3 + latest code(56ee43e) constantly reboot #16 .

Please let me know:

  1. If this PR works
  2. Please try latest gs code
  3. are you using Pi 4 hardware?

a) Compiled with IDF release/v4.4 commit(9ee3c83)
b) AI Thinker(PSRAM 2MB), log shows RF packet send ok
c) WANLAN error changed to hex format; Board status refines prints
d) TX/RX/SD task increased stack size for overflow issues
e) Remove sdkconfig file, which will be generated automatically

Note: sdkconfig will cause interface error issue, which might be root cause IDF compatibility.

lida2003 and others added 2 commits January 25, 2023 08:14
a) Compiled with IDF release/v4.4 commit(9ee3c83)
b) AI Thinker(PSRAM 2MB), log shows RF packet send ok
c) WANLAN error changed to hex format; Board status refines prints
d) TX/RX/SD task increased stack size for overflow issues
e) Remove sdkconfig file, which will be generated automatically

Note: sdkconfig will cause interface error issue, which might be root cause IDF compatibility.
@@ -690,7 +690,9 @@ esp_err_t set_wifi_fixed_rate(WIFI_Rate value)
WIFI_PHY_RATE_MCS7_LGI,
WIFI_PHY_RATE_MCS7_SGI,
};
esp_err_t err = esp_wifi_internal_set_fix_rate(ESP_WIFI_IF, true, (wifi_phy_rate_t)rates[(int)value]);

esp_err_t err = esp_wifi_config_80211_tx_rate(ESP_WIFI_IF, (wifi_phy_rate_t)rates[(int)value]);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rates in that array were hand-tuned for the esp_wifi_internal_set_fix_rate API. Not sure if they map well to the esp_wifi_config_80211_tx_rate API. I used wireshark to capture the packets and validate the rates for each of the setting.

Copy link
Contributor Author

@lida2003 lida2003 Jan 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

debug findings: please check and compare under one factor only.
Because I made a mess here.

a) sdkconfig will cause "interface invalid"
b) no RF packet send might be caused by "esp_wifi_internal_set_fix_rate"
c) printf internal buffer is NOT enough for last two parameters "WLAN S: %d, R: %d, E: %d, D: %d, %%: %d || FPS: %d, D: %d || D: %d, E: %d\n"

@jeanlemotan
Copy link
Owner

I will try this weekend to check all the pending issues: RPI3 & Ubuntu not rendering, using IDF 4.4 and 5 and any other.

@lida2003
Copy link
Contributor Author

lida2003 commented Feb 5, 2023

Close and prepare seperated PRs.

And there is a new rate API related fix, see Fix rate adjustment bug and update README.md #28

@lida2003 lida2003 closed this Feb 5, 2023
@lida2003 lida2003 deleted the main branch February 5, 2023 03:23
@jeanlemotan
Copy link
Owner

I managed to fix this issue locally by editing the sdkconfig to free as much IRAM and heap, pin some tasks to some cores and general tweaking.
From the looks of it (and very brief debugging with the laptop on the couch) it looks like the packets get stuck in the wifi driver and they never get released.

@jeanlemotan
Copy link
Owner

the sdkconfig is committed, let me know if it's ok on your side

@lida2003
Copy link
Contributor Author

lida2003 commented Feb 6, 2023

Please check IDF4.4.4 sd_enqueue_proc stack issue #31

PS: I can't add comment this morning, really bizarr.......

@jeanlemotan
Copy link
Owner

Fixed.

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

Successfully merging this pull request may close these issues.

2 participants