Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

how to configure 2.4Ghz and 5Hz mode on Hotspot mode?

76

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
76

how to configure 2.4Ghz and 5Hz mode on Hotspot mode?

Posted at 5/8/2017 12:10:07      View:3757 | Replies:1        Print      Only Author   [Copy Link] 1#
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
Reply

Use props Report

1821

Credits

10

Prestige

17

Contribution

super moderator

Rank: 8Rank: 8

Credits
1821
Posted at 5/11/2017 09:59:32        Only Author  2#
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
Reply

Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list