OK, but is that new_id entry always present? Because in my Ubuntu desktop version there isn't a sys/bus/drivers folder at all.
NO… only when the module is loaded… which is why they have to be “injected” every time (or compiled in).
You cannot directly add the device ID to the driver (using this method), as the driver isn’t loaded yet… so you have to add the device ID to the USB subsystem, so when it’s detected by that subsystem, it modprobes the driver… NOW you can add the device ID to the driver.
The first file effectively adds the device ID to the USB subsystem and if the device is then detected, modprobes rt2870sta
The second file then adds the device ID to the drivers “new_id” file (now that it has been created) so the driver is aware of the device.
If (on your desktop version) you force rt2870sta to load with:
sudo modprobe rt2870sta
(or plug the device in)
you’ll see the drivers directory has now appeared
… but that doesn’t necessarily mean it knows what to do with the device.
Two thing have to happen when you plug a USB device in…
- The USB subsystem has to be aware of the device ID so it knows what to do with the device, and what driver (if any) to load.
- The driver (after being loaded by the USB subsystem) also has to be aware of the device ID so it know that it is supposed to handle it.
The above is a kind of simplified version… the USB subsystem can often take an educated guess as to the device type if it doesn’t recognise the device ID
Non of this will survive a reboot if those files aren’t present (or are empty), or unless the device ID has been compiled into the driver and added to the USB subsytem.
BTW, I’m assuming that was a typo… it should be /sys/bus/usb/drivers/rt2870
I don't see any advantage in doing so. Post #10 in that launchpad thread reports also the name of interface as wlan0 so it happens more often.
I’m not saying that there is an advantage to having the logical name ra0 (that’s irrelevant) … but I was under the impression that the ralink staging drivers used ra0 etc. as the logical name, but rt2800usb used wlan0 etc.
Post #10 in the launchpad thread is using the rt2800usb driver… NOT rt2870sta
So I still have a sneeking suspicion that rt2800usb is coming into play somewhere here… or that rt2870sta hasn’t got the device ID string for your card compiled in.
Here’s the important bit (if you want to skip the rest)
What I think may be happening is the USB subsystem is aware of the device ID (from a previous driver compile/install) so is loading rt2870sta… but the driver (because it’s now the default version) isn’t aware of the device ID, or is using the wrong section or wrong version of the firmware.
B.T.W.: what does that size number mean?
not sure… I’ll see if I can find out.
[EDIT]
I haven’t got a clue ??? … but as you said it doesn’t seem to have any relationship to the size of rt2870sta.ko, that’s for sure… on my system
rt2870sta 450555 0
yet
rt2870sta.ko = 696712 bytes
I’m going to guess it’s the “loaded” size… but it’s a pure guess.
[END EDIT]
The device ID (148F:3070) is already in the RT3070 section if I recall it correctly. I did a test with kernel 2.6.35 with the firmware mentioned in the launchpad at that moment and it did not work.
Yes, but didn’t I add that device ID to the most recent drivers before you downloaded them from my dropbox ? … and even if I didn’t, they were never tested with the “latest” firmware were they ? (I don’t mean the firmware mentioned in that thread, I mean the very latest firmware)
ATM, I’m still trying to discover a way of being SURE where rt2870sta is being loaded…
Can you post the full output from:
modinfo rt2870sta
please.
and confirm that:
sudo lshw -C network
says the wireless device is using rt2870sta rather than rt2800usb
also, check to see if either of those are included in /etc/initramfs-tools/modules
BTW, I don’t know if it was a typo… but those 2 lines you originally added had the wrong ID string anyway:
Create a new file /etc/udev/rules.d/network_drivers.rules with this line in it:
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="148f", ATTR{idProduct}=="2870", RUN+="/sbin/modprobe -qba rt2870sta"
Create another new file /etc/modprobe.d/network_drivers.conf with this line in it:
install rt2870sta /sbin/modprobe –ignore-install rt2870sta $CMDLINE_OPTS; /bin/echo “148f 2870″ > /sys/bus/usb/drivers/rt2870/new_id
Isn’t your device ID 148f:3070 ?
Erm… sorry that was so long… I got a bit carried away 