Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| docs:guide-developer:mac.address [2019/11/11 19:08] – [Set label MAC address via 02_network] adrianschmutzler | docs:guide-developer:mac.address [2021/01/03 21:09] (current) – [Find out about flash locations] . /lib/functions/system.sh sources /lib/functions.sh borromini | ||
|---|---|---|---|
| Line 57: | Line 57: | ||
| or by using mtd_get_mac_binary (based on partition label): | or by using mtd_get_mac_binary (based on partition label): | ||
| < | < | ||
| - | . / | ||
| mtd_get_mac_binary art 0x4</ | mtd_get_mac_binary art 0x4</ | ||
| Line 90: | Line 89: | ||
| Known cases: | Known cases: | ||
| * ath79: **mtd-cal-data**: | * ath79: **mtd-cal-data**: | ||
| - | * ramips: **mediatek, | + | * ramips: **mediatek, |
| + | * **ath9k**: offset + 2 (mostly) | ||
| * **ath10k**: offset + 6 | * **ath10k**: offset + 6 | ||
| Line 98: | Line 98: | ||
| < | < | ||
| &wmac { | &wmac { | ||
| - | status = " | + | status = " |
| - | | + | |
| + | mtd-cal-data = <& | ||
| }; | }; | ||
| </ | </ | ||
| Line 106: | Line 107: | ||
| < | < | ||
| &wmac { | &wmac { | ||
| - | status = " | + | status = " |
| - | | + | |
| - | | + | mtd-cal-data = <& |
| + | mtd-mac-address = <& | ||
| }; | }; | ||
| </ | </ | ||
| + | This can also be exploited for setting the label MAC address (see below) via 02_network. | ||
| ===== Label MAC address ===== | ===== Label MAC address ===== | ||
| Line 131: | Line 134: | ||
| < | < | ||
| - | label-mac-device = &wifi0; | + | label-mac-device = &wifi0; |
| }</ | }</ | ||
| Line 184: | Line 187: | ||
| + | ==== Using the label MAC address ==== | ||
| + | |||
| + | When everything is set up correctly, the label MAC address can be accessed with: | ||
| + | |||
| + | < | ||
| + | . / | ||
| + | . / | ||
| + | label_mac_addr=$(get_mac_label) | ||
| + | </ | ||
| ===== Common MAC address locations ===== | ===== Common MAC address locations ===== | ||