Jump to content
Sign in to follow this  
dinoduino

WiFi dev naming issues pcduino3B

Recommended Posts

I have read pages and pages of information on the net re dev and persistent device names but cannot get it to work on pcDuino3b.

 

What I am attempting to do is the following:

 

Use pcduino3B's onboard Wifi as wlan0 and use a WiFi USB as wlan1.

 

Now all the information on dev talks of MAC address matching which is of no use to me as I will swap out the WiFi USB for many different types but need them all to be wlan1 when inserted. So I attempted to match on manufacturer and driver but that doesn't work.

 

My dev file 70-persistent-net.rules file looks like this:

 

# USB device 0x0bda:0x8179 (usb)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="rt*", ATTR{address}=="*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

 

 

# USB device 0x0bda:0x8179 (usb)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="RE*", ATTR{address}=="*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan1"

 

 

On reboot, names will get switched or names will be rename6 or similar.

 

Any help would be greatly appreciated.

 

 

 

Share this post


Link to post
Share on other sites

Thanks but this doesn't work.

 

The only thing I have found is that you MUST boot the pcduino with NO additional WiFi USB device plugged in.

It will create a 70-persistent-net.rules with the MAC address of the internal WiFi module.

You then plug the WiFi USB in and it will be assigned wlan1.

 

Future reboots will use udev and the MAC address match to set internal WiFi to wlan0.

 

If you swap the WiFi USB and reboot, the WiFi USB will be assigned wlan0, NOT the internal WiFi

Share this post


Link to post
Share on other sites
Have you try to add address?

 

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="b4:6d:83:63:dd:dc", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

 

According to the rule you give, I have no idea why # USB device 0x0bda:0x8179 (usb)  are same?

 


# USB device 0x0bda:0x8179 (usb)     


SUBSYSTEM=="net", ACTION=="add", DRIVERS=="rt*", ATTR{address}=="*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"


 


 


# USB device 0x0bda:0x8179 (usb)


SUBSYSTEM=="net", ACTION=="add", DRIVERS=="RE*", ATTR{address}=="*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan1"


Share this post


Link to post
Share on other sites

I deleted the 70-persistent-net.rules file and rebooted with no USB WiFi attached.

The system created a new 70-persistent-net.rules with the MAC address and correct manufacturer/product comment.

I then rebooted, wlan0 was assigned to the internal WiFi. GOOD!

I then plugged in a USB WiFi, rebooted. wlan0 was assigned to the External WiFi USB and the original wlan0 is now called rename6.

​I conclude from this that the udev rule does nothing. The internal WiFi and MAC address should be enough for udev to set it to wlan0..... but it does not.

Share this post


Link to post
Share on other sites

Can anybody tell me if they have 2 WiFi devices working on pcDuino3, 1 internal, 1 USB?

After days and days my test results are telling me nothing due to no repeatable pattern, it all seems VERY hit and miss!

Sometimes I reboot with no other device connected and it still doesn't find onboard WiFi.... then sometimes it does. 

This is hardly a workable platform!

 

** EDIT **

 

I note that the udev rule sometimes takes too long to get called and if the USB WiFi has been given wlan0 the rule fails with "rename6 to wlan0: File exists"

 

So it appears that the assignment of wlan0 is happening for the USB poll which is before the udev rule to set the internal WiFi to wlan0.

Use the rules in /lib/udev/rules.d and not /etc/udev/rules.d

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×