Skip to content

Commit

Permalink
Add WiFi tethering support
Browse files Browse the repository at this point in the history
Change-Id: I66447ac705e65577910c36a518773ff04c8b6775
  • Loading branch information
grigorig authored and KonstaT committed Jan 15, 2013
1 parent 3fae18f commit 1722d70
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 2 deletions.
1 change: 1 addition & 0 deletions device.mk
Expand Up @@ -111,6 +111,7 @@ PRODUCT_COPY_FILES += \
# WiFi
PRODUCT_COPY_FILES += \
device/zte/blade/prebuilt/system/etc/wifi/wpa_supplicant.conf:system/etc/wifi/wpa_supplicant.conf \
device/zte/blade/prebuilt/system/etc/wifi/hostapd.conf:system/etc/wifi/hostapd.conf \
device/zte/blade/prebuilt/system/wifi/ar6000.ko:system/wifi/ar6000.ko \
device/zte/blade/prebuilt/system/wifi/regcode:system/wifi/regcode \
device/zte/blade/prebuilt/system/wifi/data.patch.hw2_0.bin:system/wifi/data.patch.hw2_0.bin \
Expand Down
21 changes: 19 additions & 2 deletions overlay/frameworks/base/core/res/res/values/config.xml
Expand Up @@ -30,12 +30,29 @@
</string-array>

<!-- List of regexpressions describing the interface (if any) that represent tetherable
USB interfaces. If the device doesn't want to support tething over USB this should
be empty. An example would be "usb.*" -->
Wifi interfaces. If the device doesn't want to support tethering over Wifi this
should be empty. An example would be "softap.*" -->
<string-array translatable="false" name="config_tether_wifi_regexs">
<item>"athap0"</item>
</string-array>

<!-- List of regexpressions describing the interface (if any) that represent tetherable
bluetooth interfaces. If the device doesn't want to support tethering over bluetooth this
should be empty. -->
<string-array translatable="false" name="config_tether_bluetooth_regexs">
<item>"bnep\\d"</item>
</string-array>

<!-- Array of ConnectivityManager.TYPE_xxxx values allowable for tethering -->
<!-- Common options are [1, 4] for TYPE_WIFI and TYPE_MOBILE_DUN or
<!== [0,1,5,7] for TYPE_MOBILE, TYPE_WIFI, TYPE_MOBILE_HIPRI and TYPE_BLUETOOTH -->
<integer-array translatable="false" name="config_tether_upstream_types">
<item>0</item>
<item>1</item>
<item>5</item>
<item>7</item>
</integer-array>

<!-- Flag indicating whether the we should enable the automatic brightness in Settings.
Software implementation will be used if config_hardware_auto_brightness_available is not set -->
<bool name="config_automatic_brightness_available">true</bool>
Expand Down
6 changes: 6 additions & 0 deletions prebuilt/root/init.blade.rc
Expand Up @@ -127,6 +127,12 @@ service iprenew_bnep0 /system/bin/dhcpcd -n
disabled
oneshot

service hostapd /system/bin/hostapd /data/misc/wifi/hostapd.conf
socket hostapd_athap0 dgram 660 wifi wifi
group wifi inet
oneshot
disabled

service abtfilt /system/bin/abtfilt -c -d -z -n
class main
disabled
Expand Down
8 changes: 8 additions & 0 deletions prebuilt/system/etc/wifi/hostapd.conf
@@ -0,0 +1,8 @@
auth_algs=1
channel_num=1
dtim_period=1
preamble=0
max_num_sta=8
beacon_int=100
ssid=AndroidTether
interface=athap0

0 comments on commit 1722d70

Please sign in to comment.