RTL8720DN connection to AP with hidden SSID

I do not use dev board, just an ordinary module with the following markings:
B&T BW16
WiFi RTL8720DN
ARM KM4
2.4G/5.8G/BT
FCC ID: 2AHMR-BW16

I’m sure the Chanel Plan configuration is persistent (stored somewhere in flash memory) and the value remains between restarts.
The module itself works well with 2.4 and 5 GHz. Can connect to both types of networks when SSID is not hidden. Also, I can connect to hidden 2.4 GHz AP too. The only problem is to connect to hidden 5GHz AP which is important for our project.
I have default security type set on my AP: WPA-2-PSK-AES and as a confirmation, I can connect to it using my mobile phone, so the AP configuration seems to OK.

can you try using this binaries.7z.xml (376.8 KB)?
I have tested it with the BW16 board I have and could connect to a hidden 5GHz AP. You should see it report the current channel plan and change it to 0x76 on LOG_UART.

It will be hard to use those binaries as I use PB_1 & PB_2 pins for UART communication.
Instead, do you have repo (sources) for the binaries you’ve provided?

extern "C" {
#include "wifi_conf.h"
}

void setup() {
  wifi_on(RTW_MODE_STA);
  uint8_t chnpln;     // Default channel plan 0x7F
  uint8_t chntgt = 0x76; 
  if (wifi_get_channel_plan(&chnpln) == RTW_SUCCESS) {
    printf("WiFi Channel Plan: 0x%x\r\n", chnpln);
    if (chnpln != chntgt) {
      if (wifi_set_channel_plan(chntgt) == RTW_SUCCESS) {
        printf("WiFi Set Channel Plan OK\r\n");
        wifi_get_channel_plan(&chnpln);
        printf("WiFi Channel Plan: 0x%x\r\n", chnpln);
      } else {
        printf("WiFi Set Channel Plan Failed\r\n");
      }
    }
  }
}

void loop() {

}

The binaries were compiled using this code in Arduino, using the latest package V3.1.3.

According to the current SDK accessible via GitHub, by using ATW0, ATW1, and ATWC commands, I have successfully connected to 5GHz WiFi networks with hidden SSIDs.Both hidden and regular 2.4GHz networks, as well as regular 5GHz networks, function normally with the same commands.