forked from samtap/fang-hacks
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
65 changed files
with
1,616 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
bak/ | ||
releases/ |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Configuraton parameters | ||
|
||
# HACKS_ENABLED | ||
# This parameter determines if the scripts on the sdcard are executed. | ||
# When disabled, the webinterface is still available but no other modifications are made. | ||
HACKS_ENABLED=1 | ||
|
||
# DISABLE_CLOUD | ||
# This parameter determines if cloud apps are started at boot. | ||
# Note you can leave this disabled and use the stop_cloud script to stop the apps after boot. | ||
# This allows the apps to configure the network interface (NETWORK_MODE=0). | ||
# When cloud apps are disabled and the network is configured by fang-hacks scripts (NETWORK_MODE=1 or 2), | ||
# boot time is reduced to ~15 seconds and not dependent on cloud servers availability. | ||
DISABLE_CLOUD=0 | ||
|
||
# NETWORK_MODE | ||
# 0: Cloud Mode: Let cloud apps manage network | ||
# 1: WiFi Client Mode | ||
# 2: WiFi Access Point Mode | ||
NETWORK_MODE=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Configuraton parameters | ||
|
||
# HACKS_ENABLED | ||
# This parameter determines if the scripts on the sdcard are executed. | ||
# When disabled, the webinterface is still available but no other modifications are made. | ||
HACKS_ENABLED=1 | ||
|
||
# DISABLE_CLOUD | ||
# This parameter determines if cloud apps are started at boot. | ||
# Note you can leave this disabled and use the stop_cloud script to stop the apps after boot. | ||
# This allows the apps to configure the network interface (NETWORK_MODE=0). | ||
# When cloud apps are disabled and the network is configured by fang-hacks scripts (NETWORK_MODE=1 or 2), | ||
# boot time is reduced to ~15 seconds and not dependent on cloud servers availability. | ||
DISABLE_CLOUD=0 | ||
|
||
# NETWORK_MODE | ||
# 0: Cloud Mode: Let cloud apps manage network | ||
# 1: WiFi Client Mode | ||
# 2: WiFi Access Point Mode | ||
NETWORK_MODE=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
interface=wlan0 | ||
ctrl_interface=/var/run/hostapd | ||
driver=rtl871xdrv | ||
ssid=XiaoFang | ||
beacon_int=100 | ||
hw_mode=g | ||
ieee80211n=1 | ||
wme_enabled=1 | ||
ht_capab=[SHORT-GI-20][SHORT-GI-40] | ||
max_num_sta=8 | ||
auth_algs=1 | ||
wpa_passphrase=XiaoFang | ||
wpa_key_mgmt=WPA-PSK | ||
#wpa_pairwise=TKIP # insecure, old clients | ||
rsn_pairwise=CCMP | ||
interface=wlan0 | ||
ignore_broadcast_ssid=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/sh | ||
|
||
awk ' | ||
BEGIN { OFS = "\t"; } | ||
/\<Cell/ { | ||
# Print previous AP | ||
if (wpa) { | ||
security = "WPA" | ||
} else if (wep) { | ||
security = "WEP" | ||
} else { | ||
security = "None" | ||
} | ||
if (essid) print essid, address, security, quality; | ||
# Reset security flags. | ||
wep = 0; wpa = 0; | ||
address = $5 | ||
} | ||
/\<ESSID:/ { | ||
essid = substr($0, index($0, ":") + 1); | ||
essid = substr(essid, 2, length(essid) - 2) # discard quotes | ||
} | ||
/\<Quality/ { | ||
split($1, q, "[:=]"); # q[1] -> "Quality", q[2] -> value | ||
split(q[2], qvalues, "/"); | ||
if (qvalues[2]) { | ||
quality = int(qvalues[1] / qvalues[2] * 100); # we have both parts, divide | ||
} else { | ||
quality = qvalues[1]; # we have only one part, use it as-is | ||
} | ||
} | ||
/\<Encryption key:(o|O)n/ { wep = 1 } | ||
/\<IE:.*WPA.*/ { wpa = 1 } | ||
END { | ||
# Print last AP | ||
if (wpa) { security = "WPA" } else { if (wep) { security = "WEP" } else { security = "None" }} | ||
if (essid) print essid, address, security, quality; | ||
}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#!/bin/sh | ||
source /etc/fang_hacks.cfg | ||
DISABLE_CLOUD="${DISABLE_CLOUD:-0}" | ||
|
||
echo "Load drivers..." | ||
|
||
#/usr/bin/timing_cali & | ||
|
||
modprobe snx_gpio | ||
#modprobe snx_pwm | ||
#modprobe snx_rtc | ||
modprobe snx_i2s_gpio | ||
modprobe snx_nvram | ||
|
||
/etc/init.d/videomdprob.sh & | ||
/etc/init.d/audmdprob.sh & | ||
|
||
#power on sensor | ||
/bin/gpio_ms1 -n 6 -m 1 -v 1 | ||
modprobe mt7601Usta | ||
#modprobe snx_uvc | ||
|
||
|
||
#modprobe snx_vo | ||
modprobe snx_sd | ||
if [ "$DISABLE_CLOUD" -eq 0 ]; then | ||
modprobe snx_wdt | ||
fi | ||
modprobe 8188eu | ||
#hwclock -s | ||
|
||
if [ -f /lib/modules/2.6.35.12/kernel/drivers/bcmdhd.ko ]; then | ||
#/bin/bcmdl -n /usr/share/WUBB-738GN_4.2/Wi-Fi/nvram_wubb-743gn.nvm /usr/share/WUBB-738GN_4.2/Wi-Fi/fw_bcm43143b0_mfg.bin.trx -C 10 | ||
/bin/bcmdl -n /usr/share/WUBB-738GN_4.2/Wi-Fi/nvram_wubb-743gn.nvm /usr/share/WUBB-738GN_4.2/Wi-Fi/cooee.bin.trx -C 10 | ||
modprobe bcmdhd | ||
fi | ||
|
||
# Start all init scripts in /etc/init.d | ||
# executing them in numerical order. | ||
# | ||
for i in /etc/init.d/S??* ;do | ||
|
||
# Ignore dangling symlinks (if any). | ||
[ ! -f "$i" ] && continue | ||
|
||
case "$i" in | ||
*.sh) | ||
# Source shell script for speed. | ||
( | ||
trap - INT QUIT TSTP | ||
set start | ||
. $i | ||
) | ||
;; | ||
*) | ||
# No sh extension, so fork subprocess. | ||
$i start | ||
;; | ||
esac | ||
done | ||
|
||
# Here start our services | ||
/etc/init.d/rc.local & | ||
|
||
/usr/bin/singleBoadTest/singleBoadTest | ||
|
||
if [ "$DISABLE_CLOUD" -eq 0 ]; then | ||
/usr/bin/iSC3S/iSC3S & | ||
fi |
Oops, something went wrong.