# 5GHz hidden SSID unable to connect

**URL:** <https://forum.amebaiot.com/t/5ghz-hidden-ssid-unable-to-connect/3715>\
**Category:** WiFi\
**Tags:** rtl872xd\
**Created:** [January 15, 2025, 10:04pm UTC](https://forum.amebaiot.com/t/5ghz-hidden-ssid-unable-to-connect/3715 "2025-01-15T22:04:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![airista\_islavov](https://avatars.discourse-cdn.com/v4/letter/a/e95f7d/32.png) [@airista\_islavov](https://forum.amebaiot.com/u/airista_islavov)\
**Post date:** [January 15, 2025, 10:04pm UTC](https://forum.amebaiot.com/t/5ghz-hidden-ssid-unable-to-connect/3715/1 "2025-01-15T22:04:01Z")

</div>

When scanning 5GHz channels using active scan we are not seeing any matches when SSID is hidden. When same SSID is set to not be hidden, active scan results are being returned properly.

Using this function to scan:  
wifi\_scan(RTW\_SCAN\_TYPE\_ACTIVE, RTW\_BSS\_TYPE\_ANY, &scan\_buf))

NOTE: When scanning 2.4GHz channels using same API call, we DO see the hidden SSIDs.

I am setting the channels using wifi\_set\_pscan\_chan  
and using PSCAN\_ENABLE 0x01 option

I am looking into Wi-Fi Channel Plan from chapter 14.5.5 from “AN0400 Ameba-D Application Note v8.0” in sdk/doc folder. If I am not mistaken, Channel Plan will enforce certain channel map for 5G channels to default to passive scan even though code sets scan mode to active, is this a correct assumption? At least this is how the chips seems to behave, by default.

I will try changing channel plan and see if chip can then see hidden 5G networks.

If anyone has dealt with this and/or has a confirmed solution feedback, please chime in.

Thanks,  
Ivan S

---

<div class="post-metadata">

**Author:** ![KaiFai\_Y](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/kaifai_y/32/2252_2.png) [@KaiFai\_Y](https://forum.amebaiot.com/u/KaiFai_Y)\
**Post date:** [January 21, 2025, 1:37am UTC](https://forum.amebaiot.com/t/5ghz-hidden-ssid-unable-to-connect/3715/2 "2025-01-21T01:37:53Z")

</div>

Hi @airista_islavov, you may raise a request on this [github link](https://github.com/Ameba-AIoT/ameba-rtos-d/issues/new) for further support.  
Thank you.

---

<div class="post-metadata">

**Author:** ![xsutter](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/xsutter/32/565_2.png) [@xsutter](https://forum.amebaiot.com/u/xsutter)\
**Post date:** [January 25, 2025, 1:14pm UTC](https://forum.amebaiot.com/t/5ghz-hidden-ssid-unable-to-connect/3715/3 "2025-01-25T13:14:39Z")

</div>

Hi @airista_islavov, did you have a look at [this thread](https://forum.amebaiot.com/t/rtl8720dn-connection-to-ap-with-hidden-ssid/1033)?  
I switched from the default 0x7f channel plan to 0x76 (US, Europe), which allows active scanning of channels 36, 40, 44, 48, 149, 153, 157, 161 and 165. For me it worked.

Hope that helps,  
Xavier

---

<div class="post-metadata">

**Author:** ![airista\_islavov](https://avatars.discourse-cdn.com/v4/letter/a/e95f7d/32.png) [@airista\_islavov](https://forum.amebaiot.com/u/airista_islavov)\
**Post date:** [January 27, 2025, 6:07pm UTC](https://forum.amebaiot.com/t/5ghz-hidden-ssid-unable-to-connect/3715/4 "2025-01-27T18:07:31Z")

</div>

I used wifi\_set\_country defined in wifi\_conf.h, and that did it.  
I exposed a parameter to set the county in my firmware, and then rely on chip to set proper channel plan based on section 14.5.5. setting country to US did exactly what you described.

```auto
/**
 * @brief Set the country code to driver to determine the channel set.
 * @param[in] country_code: Specify the country code.
 * @return RTW_SUCCESS: If result is successfully set.
 * @return RTW_ERROR: If result is not successfully set.
 */
int wifi_set_country(rtw_country_code_t country_code);

```

---

<div class="post-metadata">

**Author:** ![airista\_islavov](https://avatars.discourse-cdn.com/v4/letter/a/e95f7d/32.png) [@airista\_islavov](https://forum.amebaiot.com/u/airista_islavov)\
**Post date:** [January 29, 2025, 10:15pm UTC](https://forum.amebaiot.com/t/5ghz-hidden-ssid-unable-to-connect/3715/5 "2025-01-29T22:15:18Z")

</div>

Update: setting country code via “wifi\_set\_country(RTW\_COUNTRY\_US)” allows hidden 5GHz SSID connections on non-DFS channels, exactly per the “Wi-Fi Channel Plan from chapter” and country mappings.

I just wanted to confirm what is the recommended way to set the channel plan?

- to set the country code via "wifi\_set\_country(…)… and that seems to be setting correct channel plan  
OR
- wifi\_set\_channel\_plan - to directly set the channel plan

Do both need to be called or setting country would suffice?

---

<div class="post-metadata">

**Author:** ![airista\_islavov](https://avatars.discourse-cdn.com/v4/letter/a/e95f7d/32.png) [@airista\_islavov](https://forum.amebaiot.com/u/airista_islavov)\
**Post date:** [July 30, 2025, 4:38pm UTC](https://forum.amebaiot.com/t/5ghz-hidden-ssid-unable-to-connect/3715/6 "2025-07-30T16:38:03Z")

</div>

Setting country to US allows us to connect to hidden 5G networks. I have exposed country as a parameter that can be set to accommodate other countries.

Can anyone find the actual definition of “RT\_CHANNEL\_DOMAIN\_REALTEK\_DEFINE”, I don’t see that defined anywhere in the SDK, but the application note referees to it.  
I am thinking of a use case where after we set the country to lets say US, and then we might want to go back to this default value “RT\_CHANNEL\_DOMAIN\_REALTEK\_DEFINE”, and it is not clear what actual value to use

 ![image](https://us1.discourse-cdn.com/flex016/uploads/ameba/original/2X/1/16567017697a3aefc0f19e5cf942aa739b77a105.png)
