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

esp_wifi_config_80211_tx_rate not declared #41

Closed
strakam opened this issue Nov 8, 2023 · 1 comment
Closed

esp_wifi_config_80211_tx_rate not declared #41

strakam opened this issue Nov 8, 2023 · 1 comment

Comments

@strakam
Copy link

strakam commented Nov 8, 2023

Hello, I'm trying to flash the software to my ESP-32 cam. I followed the tutorial for ESP32 v4.3-beta1 and everything seems to work well.
However, after going to air_firmware and running idf.py -p /dev/ttyUSB0 flash monitor, I get this error:

../main/main.cpp:695:21: error: 'esp_wifi_config_80211_tx_rate' was not declared in this scope
     esp_err_t err = esp_wifi_config_80211_tx_rate(ESP_WIFI_IF, (wifi_phy_rate_t)rates[(int)value]);
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../main/main.cpp:695:21: note: suggested alternative: 'esp_wifi_80211_tx'
     esp_err_t err = esp_wifi_config_80211_tx_rate(ESP_WIFI_IF, (wifi_phy_rate_t)rates[(int)value]);
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     esp_wifi_80211_tx
../main/main.cpp: In function 'void wifi_rx_proc(void*)':
../main/main.cpp:1036:21: warning: unused variable 'rssi' [-Wunused-variable]
             int16_t rssi = s_wlan_incoming_rssi;
                     ^~~~
`ninja: build stopped: subcommand failed.

I see that in main.cpp there are two other options for setting the esp_err_t. After trying the esp_wifi_internal_set_fix_rate, the program flashes successfully, but it doesn't seem to work. I'm gettin this error from the monitor:

MEMORY at start: 
Heap summary for capabilities 0x00000004:
  At 0x3ffae6e0 len 6432 free 140 allocated 4668 min_free 140
    largest_free_block 0 alloc_blocks 34 free_blocks 0 total_blocks 34
  At 0x3ffb91a8 len 159320 free 129072 allocated 28624 min_free 128104
    largest_free_block 65536 alloc_blocks 27 free_blocks 2 total_blocks 29
  At 0x3ffe0440 len 15072 free 13448 allocated 0 min_free 13448
    largest_free_block 8192 alloc_blocks 0 free_blocks 1 total_blocks 1
  At 0x3ffe4350 len 113840 free 112216 allocated 0 min_free 112216
    largest_free_block 65536 alloc_blocks 0 free_blocks 1 total_blocks 1
  Totals:
    free 254876 allocated 33292 min_free 253908 largest_free_block 65536
^[[0;32mI (813) gpio: GPIO[33]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 ^[[0m
MEMORY after fec: 
Heap summary for capabilities 0x00000004:
  At 0x3ffae6e0 len 6432 free 140 allocated 4668 min_free 140
    largest_free_block 0 alloc_blocks 34 free_blocks 0 total_blocks 34
  At 0x3ffb91a8 len 159320 free 1220 allocated 156476 min_free 1220
    largest_free_block 0 alloc_blocks 304 free_blocks 0 total_blocks 304
  At 0x3ffe0440 len 15072 free 88 allocated 13360 min_free 88
    largest_free_block 0 alloc_blocks 21 free_blocks 0 total_blocks 21
  At 0x3ffe4350 len 113840 free 106648 allocated 5568 min_free 106648
    largest_free_block 65536 alloc_blocks 17 free_blocks 1 total_blocks 18
  Totals:
    free 108096 allocated 180072 min_free 108096 largest_free_block 65536
(893) wifi:wifi driver task: 3ffe9110, prio:23, stack:6656, core=0
[0;32mI (893) system_api: Base MAC address is not set^[[0m
[0;32mI (893) system_api: read default base MAC address from EFUSE^[[0m
(913) wifi:wifi firmware version: 6b2834e
(913) wifi:wifi certification version: v7.0
(913) wifi:config NVS flash: enabled
(923) wifi:config nano formating: disabled
(923) wifi:Init data frame dynamic rx buffer num: 32
(923) wifi:Init management frame dynamic rx buffer num: 32
(933) wifi:Init management short buffer num: 32
(933) wifi:Init dynamic tx buffer num: 32
(943) wifi:Init static rx buffer size: 1600
(943) wifi:Init static rx buffer num: 10
(953) wifi:Init dynamic rx buffer num: 32
[0;32mI (953) wifi_init: rx ba win: 6^[[0m
[0;32mI (953) wifi_init: tcpip mbox: 32^[[0m
[0;32mI (963) wifi_init: udp mbox: 6^[[0m
[0;32mI (963) wifi_init: tcp mbox: 6^[[0m
[0;32mI (963) wifi_init: tcp tx win: 5744^[[0m
[0;32mI (973) wifi_init: tcp rx win: 5744^[[0m
[0;32mI (973) wifi_init: tcp mss: 1440^[[0m
[0;32mI (983) wifi_init: WiFi IRAM OP enabled^[[0m
[0;32mI (983) wifi_init: WiFi RX IRAM OP enabled^[[0m
[0;32mI (993) phy_init: phy_version 4660,0162888,Dec 23 2020^[[0m
(1093) wifi:mode : sta (0c:b8:15:76:f8:24)
(1093) wifi:enable tsf
(1093) wifi:Set ps type: 0
E (1093) wifi:can't set fix rate when tx ampdu is enabled
ESP_ERROR_CHECK failed: esp_err_t 0x106 (ESP_ERR_NOT_SUPPORTED) at 0x4008918c
file: "../main/main.cpp" line 1155
func: void setup_wifi()
expression: set_wifi_fixed_rate(s_ground2air_config_packet.wifi_rate)
abort() was called at PC 0x4008918f on core 0
Backtrace:0x4008ae17:0x3ffbe540 0x4008b5e9:0x3ffbe560 0x4009326a:0x3ffbe580 0x4008918f:0x3ffbe5f0 0x400d830d:0x3ffbe610 0x400d8478:0x3ffbe700 0x40153111:0x3ffbe750 0x4008ecfd:0x3ffbe770
ELF file SHA256: 5dd20f27a573f3a3
Rebooting...

What might I have done wrong and how can I fix it? I'm working on Ubuntu 20.04 and using the v4.3-beta1 version of ESP-IDF.
Sorry if this problem comes from my lack of knowledge of these systems.
Thanks in advance

@strakam strakam closed this as completed Nov 16, 2023
@Darkening-Silhouette
Copy link

Hi, I'm facing the same problem. May I know the workaround for the issue please? I'm far from being an expert, so any help would be appreciated.

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

No branches or pull requests

2 participants