That’s probably good enough to detect WNDRMAC (v1), then. Interesting that NETGEAR put the default SSID at offset 0x41 on the original WNDRMAC, and offset 0x42 on later models.
In case you’re curious, here’s the top of the art block from a WNDRMACv2: 00000000 M0 M0 M0 M0 M0 M0 M1 M1 M1 M1 M1 M1 M2 M2 M2 M2 |MMMMMMMMMMMMMMMM| 00000010 M2 M2 SS SS SS SS SS SS SS SS SS SS SS SS SS SS |MMSSSSSSSSSSSSSS| 00000020 SS SS SS SS SS SS SS 00 01 32 39 37 36 33 36 35 |SSSSSSS..2976365| 00000030 34 2b 31 36 2b 31 32 38 57 4e 44 52 4d 41 43 76 |4+16+128WNDRMACv| 00000040 32 00 4e 45 54 47 45 41 52 nn nn 00 00 00 00 00 |2.NETGEARnn.....| 00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000060 00 00 PP PP PP PP PP PP PP PP PP PP PP PP PP PP |..PPPPPPPPPPPPPP| 00000070 PP PP 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |PP..............| 00000080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| WNDR3800 is similar. I guess that adding an extra character to the hd_id when it went from +16+64 to +16+128 in conjunction with wanting to keep ten characters for the model name (WNDR3x00vN?) required things to get bumped over by a byte. Roman A. aka BasicXP wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > I have done this already, it's part of the preconfigured Wi-Fi information > that is printed on the bottom of the the router. The SSID is always > NETGEARXX, where XX is a random number. The "N" letter is the first letter of > the SSID. Here is the part of hexdump output of my WNDRMAC ("S" letters hide > the serial number, "P" - the preconfigured Wi-Fi password, "M" - router's MAC > addresses): > > 00000000 MM MM MM MM MM MM MM MM MM MM MM MM MM MM MM MM |................| > 00000010 MM MM SS SS SS SS SS SS SS SS SS SS SS SS SS SS |..SSSSSSSSSSSSSS| > 00000020 SS SS SS SS SS SS SS 00 05 ff ff ff ff ff ff ff |SSSSSSS.........| > 00000030 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| > 00000040 ff 4e 45 54 47 45 41 52 34 33 00 ff ff ff ff ff |.NETGEAR43......| > 00000050 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| > 00000060 ff PP PP PP PP PP PP PP PP PP PP PP PP PP PP PP |.PPPPPPPPPPPPPPP| > 00000070 PP 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff |P...............| > 00000080 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| > > My guess is that this should work on all WNDRMACs, although I only have one > device to test this. > > 15.06.2012 20:19, Mark Mentovai пишет: >> Are you sure this is universally correct for all WNDRMAC units? It's >> possible that the "N" there is actually variable, and part of something >> else that shows up at that location in flash. `hexdump -C /dev/mtd5` >> (assuming mtd5 is art in /proc/mtd) should help identify what that N is >> actually doing, which in turn might indicate whether it's useful for >> identifying the model or not. >> >> Роман А. aka BasicXP wrote: >>> This patch helps properly detect a WNDRMAC device. Before this patch the >>> model is detected as "NETGEAR ?????????N". >>> >>> Signed-off-by: Roman A. aka BasicXP <x12ozmo...@ya.ru> >>> >>> --- >>> >>> Index: target/linux/ar71xx/base-files/lib/ar71xx.sh >>> =================================================================== >>> --- target/linux/ar71xx/base-files/lib/ar71xx.sh (revision 32267) >>> +++ target/linux/ar71xx/base-files/lib/ar71xx.sh (working copy) >>> @@ -41,6 +41,8 @@ >>> model=$(ar71xx_get_mtd_offset_size_format art 56 10 %c) >>> if [ -z "$model" ] || [ "$model" = >>> $'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' ]; then >>> machine="NETGEAR WNDR3700v2" >>> + elif [ -z "$model" ] || [ "$model" = >>> $'\xff\xff\xff\xff\xff\xff\xff\xff\xffN' ]; then >>> + machine="NETGEAR WNDRMAC" >>> else >>> machine="NETGEAR $model" >>> fi > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.19 (MingW32) > > iQIcBAEBCgAGBQJP22f/AAoJEEyDwVxhh5pHMFYQAIIsUqwpaffW/cjcsd/UiynF > O4vBz8ocMzCR0lizVPAtQ1ZzWuD7Z3FmAqz5acZQSS+336bXuKG0CLTmrXRBKEoO > /UnUsYxncGbyOJ/bWZ9s0VwL2oELBXrR+mJ61QJrJWsUzLMOUfF2EVg+lgCCUAzq > rgcTcCnMcoJQzxGFbisi4GzlGqLucESLmBoulLCd/IkJheVrLprQTg4CIrIoPPno > Jm+xUMX6qEDx+YaMwvtSXeQN4Zde4thLG1aeMBw+51Y5eeCsZ7KZsET9Q9sviilz > kBBIcVzVLoSulNI/tls0atFkXY6Hu7z8xhXmnfqdzM+r5dxnF+NRjNy+Pt9wTHGN > w4Si2N0YVZkBECvJXRPNzkMTeebhGRq3nLkYT3GA/ActPFylOBkPPMEnrl+xoR6t > FnnOQulAUQBUuXI4XFone6t8mOOo7lgKgCBuiDVJV3wvt0PkzmdnUbZVu5vnQPnS > ATzb6PKsLNM+0NCfUugABU0DXUBCBCZ8xrB8Um96GeVkAq8DQu1ofPScHu3OlKov > APuRQTFYJ0WRG71i87QtJOjw3hPjX4mPlS1gN5cVOfFrp5mKJgStRT9/E+P/JwD3 > Q7LMPqOkaj72vWskn967XheiYHSCtZZT9rqRwcGjeAjKe94TgX5A/IgawNKTnoGi > 5wayIe8rFRaDKmSK2gk3 > =NLyH > -----END PGP SIGNATURE----- > _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel