Well, this is a bit old thread, but intention is to spare some time for anybody trying to use **
iwpriv** (and to remind me never to mess with WiFi drivers even if a good friend asks for it:) )
This is just a coarse bunch of suggestions as there are simply too many specifics and "what if" and "ahh, then else" situations, but could be useful as a start.
a)
In most cases one needs some Linux distro with 2.6.xx-xx kernel.
This punishment is a sort of prerequisite for "iwpriv" command to work properly. See boring tech note 1.
Venerable ubuntu 10.04 should do nicely (with some hocus-pocus).
32 bit image:
10.04 desktop b)
Once the image is downloaded, flash it to an 4GB+ USB stick, preferably, with some tool that supports persistence. For Linux check something like mkusb:
HowTo for Win, there are a few USB writers that support this feature. Please google it.
Flash the ISO. Try to avoid latest and best USB 3.x sticks as they **might** NOT boot from an older PC/laptop. See boring tech note 2.
c)
Once you boot your laptop/whatever from an USB stick, we do enter a bit of drama. See boring tech note 3.
At this stage one should be able to use "iwpriv" in RW mode.
For more advanced stuff or possible other needs:
d) OPTIONAL
Install a HEX editor: "sudo apt-get install okteta" (this is a biggie as it usess KDE support environ, sadly, "bless" or similar are not in the feeds).
Crucial for me: install mc (sort of NC clone from MSDOS days). Again, not in the feeds, get it from, say,
mc for old stuff Just a reminder - See boring tech note 4.
With the last step one could edit *.ko drivers and change ViD/PiD to make drivers support a normal OS (say you want to get back an old Samsung only WiFi adapter or vice versa).
Or, compile a driver that needs "iwpriv" fix. Check the old, or rather original and working for this purpose sources from the 1st post. You might wish to add your ViD/PiD in a file that defines it, usually something along lines of "rtusb_dev_id.c". dev-id in the name should point you to the right stuff.
For 5370 devices e2p addresses are 208 for ViD and 20A for PiD
"sudo iwpriv ra0 e2p 208=140f" (or 4E8 for Samsung TV)
"sudo iwpriv ra0 e2p 20a=5370" (or 2018 to make it for Samsung TV)
For 7601 devices e2p addresses are 12 for ViD and 14 for PiD
Again, this is really not a "how to" guide but a simple directions. Hope it helps someone.
*****
Boring Tech Note 1:
Anything newer with kernel above 2.6.xx-xx will make your life miserable. On some older distros like Mint 13, iwpriv might read data, but canNOT write it to nvram/eeprom. VMware or Virtualbox may work, but you'll spend more time adjusting it then preparing/booting good ole' 10.04.x from an USB stick.
Boring Tech Note 2:
It might be prudent to use an older (say 2005+ up to 2015 laptop/Desktop). Newer/newest boxes should work, but if you get in trouble with unrecognized HW --> not worth the trouble.
Boring Tech Note 3:
Feeds for old ubuntu, as is, are down. The list for updates/sw dload points to a non existing url in "/etc/apt/sources.list". You might not need them, otherwise: from the terminal enter: "sudo sed -i 's/archive/old-releases/' /etc/apt/sources.list" OR "gksudo etc/apt/sources.list" and replace all the occurances of 'archive' with 'old-releases'
After this step, do type in the terminal; "sudo apt-get update"
Boring Tech Note 4:
New linux distros (some of them) enforce digital signing of drivers (*.ko stuff). Therefore, one cannot hexedit them.