Firefly Open Source Community

Title: how to configure 2.4Ghz and 5Hz mode on Hotspot mode? [Print This Page]

Author: recogine    Time: 5/8/2017 12:10
Title: how to configure 2.4Ghz and 5Hz mode on Hotspot mode?
Hi firefly,
May i know that how we configure Hotspot dual band frequency 2.4Ghz and 5GHz, currently android lollipop doesn't provide any interface for this changes.

please tell me how to do that, thanks a lot
Author: isle    Time: 5/11/2017 09:59
like this:
  1. diff --git a/system/netd/server/SoftapController.cpp b/system/netd/server/SoftapController.cpp
  2. index f4ece88..5e896fe 100755
  3. --- a/system/netd/server/SoftapController.cpp
  4. +++ b/system/netd/server/SoftapController.cpp
  5. @@ -151,15 +151,16 @@ int SoftapController::setSoftap(int argc, char *argv[]) {
  6.      if (!strcasecmp(argv[4], "hidden"))
  7.          hidden = 1;

  8. -    if (argc >= 5) {
  9. +    channel = AP_CHANNEL_DEFAULT;
  10. +    /*if (argc >= 5) {
  11.          channel = atoi(argv[5]);
  12.          if (channel <= 0)
  13.              channel = AP_CHANNEL_DEFAULT;
  14. -    }
  15. +    }*/

  16.      asprintf(&wbuf, "interface=%s\ndriver=nl80211\nctrl_interface="
  17.              "/data/misc/wifi/hostapd\nssid=%s\nchannel=%d\nieee80211n=1\n"
  18. -            "hw_mode=g\nignore_broadcast_ssid=%d\nwowlan_triggers=any\n",
  19. +            "hw_mode=a\nignore_broadcast_ssid=%d\nwowlan_triggers=any\n",
  20.              argv[2], argv[3], channel, hidden);

  21.      if (argc > 7) {
  22. diff --git a/system/netd/server/SoftapController.h b/system/netd/server/SoftapController.h
  23. index 7063067..1695559 100644
  24. --- a/system/netd/server/SoftapController.h
  25. +++ b/system/netd/server/SoftapController.h
  26. @@ -25,7 +25,7 @@
  27. #define AP_BSS_STOP_DELAY      500000
  28. #define AP_SET_CFG_DELAY       500000
  29. #define AP_DRIVER_START_DELAY  800000
  30. -#define AP_CHANNEL_DEFAULT     6
  31. +#define AP_CHANNEL_DEFAULT     149

  32. class SoftapController {
  33. public:
  34.                
Copy the code

Author: bobblac529    Time: 1/31/2026 11:12
I took away so much from reading that article. Thanks to Sustainable-Investing valid test simulator online, I climbed the career ladder and earned more¡ªtoday, I¡¯m giving it away for free!
Author: oliverh612    Time: 2/1/2026 19:44
Thank you for your article, it really captured my attention. This CCM latest exam collection file helped me achieve career growth with a promotion and salary raise. It¡¯s free now for everyone. Wishing you success!
Author: jackwhi690    Time: 2/5/2026 15:49
Your article is absolutely awe-inspiring, thank you for sharing! The KCNA latest test duration test was my key to career success. Get it for free today and start advancing your career!




Welcome Firefly Open Source Community (https://bbs.t-firefly.com/) Powered by Discuz! X3.1