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

wifi multiple antenna switch GPIO doesn't work on ESP32-S3 (IDFGH-8972) #10385

Closed
3 tasks done
chndao77 opened this issue Dec 16, 2022 · 8 comments
Closed
3 tasks done
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally

Comments

@chndao77
Copy link

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

I am trying add a FEM to esp32s3,
I found following code, works on ESP32 chip, but doesn't work on ESP32-S3,
no error report,
on ESP32 chip, tx/rx gpios work great,: when tx is high, rx is low, and when tx is low, rx is high
on ESP32-S3, tx/rx gpios keep low.
lastest esp-idf git version and lastest wifi lib.

`#include "driver/gpio.h"
#include "esp_rom_gpio.h"
void gpio_out_tx_status()
{
wifi_ant_gpio_config_t config_gpio;

//GPIO pull down initially for TX
esp_rom_gpio_pad_select_gpio(15);
gpio_set_direction(15, GPIO_MODE_OUTPUT);
gpio_set_level(15, 0);
//GPIO pull down initially for RX
esp_rom_gpio_pad_select_gpio(16);
gpio_set_direction(16, GPIO_MODE_OUTPUT);
gpio_set_level(16, 0);

config_gpio.gpio_cfg[0].gpio_select = 1;
config_gpio.gpio_cfg[0].gpio_num = 15;
config_gpio.gpio_cfg[1].gpio_select = 1;
config_gpio.gpio_cfg[1].gpio_num = 16;
wifi_ant_config_t config_ant = {
.rx_ant_mode = WIFI_ANT_MODE_ANT1,
.rx_ant_default = WIFI_ANT_MODE_ANT1,
.tx_ant_mode = WIFI_ANT_MODE_ANT0,
.enabled_ant0 = 1,
.enabled_ant1 = 2
};
esp_wifi_set_ant_gpio(&config_gpio);
esp_wifi_set_ant(&config_ant);
}

static int wifi_cmd_ap(int argc, char **argv)
{
int nerrors = arg_parse(argc, argv, (void **) &ap_args);

if (nerrors != 0) {
    arg_print_errors(stderr, ap_args.end, argv[0]);
    return 1;
}

wifi_cmd_ap_set(ap_args.ssid->sval[0], ap_args.password->sval[0]);
ESP_LOGI(TAG, "AP mode, %s %s", ap_args.ssid->sval[0], ap_args.password->sval[0]);

gpio_out_tx_status();
ESP_LOGI(TAG, "AP mode, load ATT config");    
return 0;

}`

@espressif-bot espressif-bot added the Status: Opened Issue is new label Dec 16, 2022
@github-actions github-actions bot changed the title wifi multiple antenna switch GPIO doesn't work on ESP32-S3 wifi multiple antenna switch GPIO doesn't work on ESP32-S3 (IDFGH-8972) Dec 16, 2022
@sbuto1
Copy link

sbuto1 commented Apr 20, 2023

Has there been any investigation into this issue? I can confirm it is present when using ESP-IDF v4.4.4 running on a ESP32-S3-DevKitC-1. The same code has no issue on a ESP32. I also tried a variety of GPIO pins on the board but all had the same behavior (net remains low at all times). Thanks

@MaxwellAlan
Copy link
Collaborator

Hi @sbuto1

Thanks for your report, we have fixed this bug internal. Plz wait for the fix to sync to Github.

Thanks.

@sbuto1
Copy link

sbuto1 commented Sep 14, 2023

@MaxwellAlan, thanks for checking on & fixing this issue! Since submitting this I also discovered that the ESP32-C3 also has the issue, so it is not specific to ESP32-S3 line - hopefully the fix is applied to both/all chip families.

FYI, there is also a small bug in the new wifi antenna example projects - I noted that in issue IDFGH-10851.

@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: NA Issue resolution is unavailable and removed Status: Opened Issue is new labels Oct 13, 2023
@Xiehanxin
Copy link

hi @sbuto1 could I close this issue? if there are any update can reopen it.

@sbuto1
Copy link

sbuto1 commented Oct 25, 2023

Hi @Xiehanxin , I'm not the original poster so I don't have the ability to close the issue. I did post a very similar issue, #12055 (which has not been marked as done). In both cases I still see the issue in the most recent public ESP-IDF release, v5.1.1. Have these issues been fixed in any public ESP-IDF commit? If not I would suggest keeping them open. Thanks!

@Xiehanxin
Copy link

sorry @sbuto1 ,we will give feedback to #12055, and hi @chndao77 ,could I close this issue? if there are any update can reopen it.

@mhdong
Copy link
Collaborator

mhdong commented Nov 1, 2023

Hi @chndao77 fix on master branch is available at 16ec599, we are also back porting to other release branches.
Will update further if any progress. Thanks.

@Alvin1Zhang
Copy link
Collaborator

Thanks for reporting, feel free to reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally
Projects
None yet
Development

No branches or pull requests

7 participants