Hi! Someone know hot to read tp-link factory wireless pin from flash?
Since I know that the mac address is readable from flash. There some hints online that says that this data resides on art partition.
I want to know how to read the wireless pin (the same on label in the router).
I want to make a OpenWRT image with same SSID and password as stock firmware uses:
The SSID thing is already resolved with this, but I need to know hot to retrieve the password.
This advice is not about TP-Link, but general advice...
I have fetched the WPS PIN from my Netgear WNDR3700 art partition with the script below. That is a patch directly for the hostapd init script, so that hostapd uses the OEM factory PIN if the user has not set it in the uci config options.
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -351,6 +351,11 @@ hostapd_set_bss_options() {
set_default wps_manufacturer "www.lede-project.org"
set_default wps_independent 1
+ # Set WPS label pin to original Netgear value stored in art partition
+ # Value for wps_pin can be overridden by /etc/config/wireless
+ local PINdefault="$(dd if=/dev/mtdblock6 bs=1 skip=18 count=8 2>/dev/null)"
+ set_default wps_pin "$PINdefault"
+
wps_state=2
[ -n "$wps_configured" ] && wps_state=1
The same approach of fetching data from "art" can be used for other purposes. For example, my router's art contains the MAC addresses (3 items), WPS PIN (34063382) and the serial number...
But naturally you need to first look at the art partition contents with a hex editor / hexdump tool, and identify the correct offset.