Jump to content


Photo

WiFi dev naming issues pcduino3B

pcduino3B wifi

  • Please log in to reply
5 replies to this topic

#1 dinoduino

dinoduino

    Member

  • Members
  • PipPip
  • 16 posts

Posted 17 February 2016 - 07:43 AM

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.

 

 

 



#2 youkee

youkee

    Advanced Member

  • Administrators
  • 237 posts

Posted 17 February 2016 - 11:45 AM

Maybe this will be helpful.

http://unix.stackexc...twork-interface



#3 dinoduino

dinoduino

    Member

  • Members
  • PipPip
  • 16 posts

Posted 17 February 2016 - 12:22 PM

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



#4 youkee

youkee

    Advanced Member

  • Administrators
  • 237 posts

Posted 18 February 2016 - 12:18 AM

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"



#5 dinoduino

dinoduino

    Member

  • Members
  • PipPip
  • 16 posts

Posted 18 February 2016 - 02:14 AM

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.



#6 dinoduino

dinoduino

    Member

  • Members
  • PipPip
  • 16 posts

Posted 19 February 2016 - 10:15 PM

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






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users