From 529fdeb5b830a0dd8cb224bbae8ede10a49a072e Mon Sep 17 00:00:00 2001 From: gitgayhub Date: Thu, 31 Aug 2023 11:35:27 +0000 Subject: [PATCH] Add wlan0 setting for T31 and rtl8188fu --- en/network-settings.md | 19 +++++++++++++++++++ en/unbrick-ingenic-t31-with-sd-card.md | 6 +++--- 2 files changed, 22 insertions(+), 3 deletions(-) mode change 100755 => 100644 en/unbrick-ingenic-t31-with-sd-card.md diff --git a/en/network-settings.md b/en/network-settings.md index e5a2bab..0c988e7 100644 --- a/en/network-settings.md +++ b/en/network-settings.md @@ -388,3 +388,22 @@ iface wlan0 inet dhcp pre-up wpa_supplicant -B -D nl80211 -i wlan0 -c/tmp/wpa_supplicant.conf post-down killall -q wpa_supplicant ``` + +### WLAN0 | T31 | RTL8188FU + +``` +auto wlan0 +iface wlan0 inet dhcp + pre-up echo 10 > /sys/class/gpio/export + pre-up echo out > /sys/class/gpio/gpio10/direction + pre-up echo 1 > /sys/class/gpio/gpio10/value + pre-up modprobe mac80211 + pre-up sleep 1 + pre-up insmod /lib/modules/8188fu.ko + pre-up sleep 1 + pre-up wlan_addr=$(fw_printenv -n wlanaddr); if [ -n "$wlan_addr" ]; then ip link set dev wlan0 address $wlan_addr; fi + post-up wpa_passphrase "$(fw_printenv -n wlanssid || echo OpenIPC)" "$(fw_printenv -n wlanpass || echo OpenIPC12345)" > /tmp/wpa_supplicant.conf + post-up sed -i '2i \\tscan_ssid=1' /tmp/wpa_supplicant.conf + post-up wpa_supplicant -B -i wlan0 -D nl80211,wext -c /tmp/wpa_supplicant.conf + post-down killall -q wpa_supplicant +``` diff --git a/en/unbrick-ingenic-t31-with-sd-card.md b/en/unbrick-ingenic-t31-with-sd-card.md old mode 100755 new mode 100644 index aa1ef70..6d4f8dc --- a/en/unbrick-ingenic-t31-with-sd-card.md +++ b/en/unbrick-ingenic-t31-with-sd-card.md @@ -33,14 +33,14 @@ Now you will get the compiled uboot file `u-boot-with-spl.bin` ### Burn uboot to SD card -Insert SD card to your PC, run `fdisk -l` to check, you should see the device like in my case `Disk /dev/sdb: 29.72 GiB, 31914983424 bytes, 62333952 sectors`. Pay attention to the physical sector size, in my case it's 512 bytes +Insert SD card to your PC, run `fdisk -l` to check, you should see the device like in my case `Disk /dev/sdb: 29.72 GiB, 31914983424 bytes, 62333952 sectors`. **CAUTION!** double check the `/dev` device name is actually your SD card, or you may lose data on other drives ``` -dd if=./u-boot-with-spl.bin of=/dev/sdb seek=34 +dd if=./u-boot-with-spl.bin of=/dev/sdb bs=512 seek=34 ``` -This will burn the uboot file to SD card at 34*512bytes=17KBytes offset from 0x0, where 512 is my SD card's block size. If yours is 1024, change `seek=34` to `seek=17`, to make the offset to be 17KBytes +This will burn the uboot file to SD card at 17KBytes offset from 0x0 ### Boot from SD card