Hidden Wi-Fi connection possible only after scanning

Hello,

Using 5340+7002 and Zephyr, I met problem connecting to wifi with hidden SSID.
I use regular commands like "wifi scan' and 'wifi connect' but despite the fact that i pass correct ssid/pass with 'wifi connect' my device is not able to connect.
It goes into scanning, which never ends.

For workaround I can do scanning first and then 'wifi connect'. This way it works, but really I'm not sure why do I have to scan first? Is this expected behaviour?
Also, I can see that connecting to hidden network is waaay slower and less reliable (more often faults) than connecting to public, visible networks. 
I haven't found any info that maybe non-public networks are not supported, nor any special config/steps i should proceed before connecting to such specific network.

Do i miss something here, guys?
Thank you.

Parents
  • Perfect!
    We were really curious about reasons of this behaviour. Thank you very much for detailed answer :)

    EDIT:
    I removed from my post all sensistive data and switched this ticket to public - it may be useful for someone:

        struct wifi_reg_domain regd = {0};
        regd.oper = WIFI_MGMT_SET;
        regd.country_code[0] = 'I';
        regd.country_code[1] = 'N';
        regd.force = true;
    
        net_mgmt(NET_REQUEST_WIFI_REG_DOMAIN, net_if_get_default(), &regd,
                    sizeof(regd));



Reply
  • Perfect!
    We were really curious about reasons of this behaviour. Thank you very much for detailed answer :)

    EDIT:
    I removed from my post all sensistive data and switched this ticket to public - it may be useful for someone:

        struct wifi_reg_domain regd = {0};
        regd.oper = WIFI_MGMT_SET;
        regd.country_code[0] = 'I';
        regd.country_code[1] = 'N';
        regd.force = true;
    
        net_mgmt(NET_REQUEST_WIFI_REG_DOMAIN, net_if_get_default(), &regd,
                    sizeof(regd));



Children
No Data
Related