'ESP32 station mode problem with iPhone hotspot

I have ESP32 and when I’m connect it to my router like TPLink using WIFI Its working fine and get ip address, while when i try to connect my ESP32 to my iPhon hotspot the ESP not get IP address. I changed the ESP and still the same problem, when i tried to connect my laptop to IPhon hotspot my laptop get ip address .. Also i checked my iPhone hotspot band and it working on 2.4GHz .. plz any advice .. Thanks in advance. code:

> #include "WiFi.h" 
    > void setup(){
    >     // Set WiFi to station mode and disconnect from an AP if it was previously connected
    >     WiFi.mode(WIFI_STA);
    >     WiFi.disconnect();
    >     delay(100);
    >     Serial.println("Setup done");
    >     Initialization();
    >     WiFiConnection();
    > 
    >  }
    > void Initialization(){
    >      Serial.begin(115200);   }
    > 
    > void WiFiConnection(){   WiFi.begin(WIFI_SSID, WIFI_PASSWORD);  
    > Serial.print("Connecting to Wi-Fi");   while (WiFi.status() !=
    > WL_CONNECTED)   {
    >     Serial.print(".");
    >     delay(300);   }  
 

      Serial.println();  
       Serial.print("Connected with IP: ");   
       Serial.println(WiFi.localIP());  
       Serial.println();
    > 
    > Firebase.reconnectWiFi(true); }


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source