-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Koreader's WiFi manager
- Loading branch information
Showing
8 changed files
with
58 additions
and
10 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
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,16 @@ | ||
#!/bin/sh | ||
|
||
# Disable wifi, and remove all modules. | ||
|
||
killall dhcpcd default.script wpa_supplicant 2>/dev/null | ||
|
||
ifconfig wlan0 down | ||
|
||
# Some sleep in between may avoid system getting hung | ||
# (we test if a module is actually loaded to avoid unneeded sleeps) | ||
if lsmod | grep -q $WIFI_MODULE ; then | ||
rmmod $WIFI_MODULE | ||
fi | ||
if lsmod | grep -q sdio_wifi_pwr ; then | ||
rmmod sdio_wifi_pwr | ||
fi |
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,12 @@ | ||
#!/bin/sh | ||
|
||
# Load wifi modules and enable wifi. | ||
lsmod | grep -q $WIFI_MODULE || modprobe $WIFI_MODULE | ||
lsmod | grep -q sdio_wifi_pwr || modprobe sdio_wifi_pwr | ||
sleep 1 | ||
|
||
ifconfig wlan0 up | ||
|
||
pidof wpa_supplicant >/dev/null || \ | ||
( wpa_supplicant -D wext -iwlan0 -C /var/run/wpa_supplicant -B; \ | ||
ln -s /var/run/wpa_supplicant/wlan0 /var/run/wpa_supplicant/eth0 ) |
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,5 @@ | ||
#!/bin/sh | ||
|
||
./release-ip.sh | ||
|
||
dhcpcd wlan0 |
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,8 @@ | ||
#!/bin/bash | ||
|
||
export WIFI_MODULE=brcmfmac | ||
|
||
cd /opt/koreader | ||
while true; do | ||
./luajit ./reader.lua /mnt | ||
done |
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,3 @@ | ||
#!/bin/sh | ||
|
||
pkill -9 -f 'dhcpcd' |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Package: koreader | ||
Version: 2017.03-1 | ||
Version: 2017.03-2 | ||
Maintainer: Cosmin Gorgovan <okreader@linux-geek.org> | ||
Architecture: armhf | ||
Description: An ebook viewer application. |