RF_PRE_INIT()
{
if (PHY_MODE_11B != wifi_get_phy_mode())
{
wifi_set_phy_mode(PHY_MODE_11B);
}
wifi_set_user_fixed_rate(FIXED_RATE_MASK_ALL, PHY_RATE_6);
wifi_set_user_sup_rate(RATE_11B1M, RATE_11B2M);
wifi_set_user_rate_limit(RC_LIMIT_11B, 0x00, RATE_11B1M, RATE_11B2M);
wifi_set_user_limit_rate_mask(LIMIT_RATE_MASK_ALL);
system_phy_set_powerup_option(31); // Do full RF calibration on power-up
system_phy_set_max_tpw(82); // Set max TX power
}
Name Speed Indoor Range
Wireless AC 1 Gbps 115 Feet
Wireless N 300 Mbps 230 Feet
Wireless G 54 Mbps 125 Feet
Wireless B 11 Mbps 115 Feet
I found it on the Internet, so it must be true.
I read the datasheet of ESP8266 and B mode was good for range.