Wifi naming is not coming up as standard

Sure

“network” :
{
“wifi”:
{
“randomMacAddressScan”: false
}
},
“udevRules”:
{
“42”: "SUBSYSTEM==“net”, ACTION==“add”, DRIVERS==“wlan_sdio”, NAME=“wlan0"”
“43”: "SUBSYSTEM==“net”, ACTION==“add”, DRIVERS==“rt2800usb”, NAME=“wlan1"”
}

I tried it with and without mac addresses. (copy paste removed the \")

for starters this might not work due to name collisions.
These rules will rename the devices after they have already been named by the system so you are better off picking names that do not exist like wlo0 wlo1.
Also I am not quite sure what you did to add these rules. The best way to add udev rules in balena is described here https://github.com/balena-os/meta-balena#udevrules and it requires a reboot. Be very careful when editing config.json as your device might not go online if you damage the file.
The rules will only be active after rebooting the device, so after reboot you should make sure that the rules actually made it into the system by calling
ls -l /etc/udev/rules.d/ and taking a look at what you find there…
In case the rules are there but it did not work it might make sense to take a look at the journal or dmesg to see if it gives you any hints.
If this does not help we can take a look at your device and see if we can come up with a working set of rules…

I used nano with the device connected to my Linux Laptop and edited /boot/config.json.

I will attempt to use different names and see if that corrects the problem.

Thank you for your help.

You were right. I had an error in the config.json. I slightly modifed the rules to match what I know works on a standard Raspberry Pi.

But as you can see, it did not matter:

I would be grateful if you could go into this system and look to see what it is that I am doing wrong.

You would have to enable support access and send me the uuid of the device. If you do not want it on the forum you can send it in a private message.

How do I do that ?

I figured it out. I sent you a private message.

Ok thanks I am looking at your device

First thing I came across was a forum post that claimed that udev does not like uppercase values in MAC addresses. That could be a try.
I found
ATTR{address}==“48:a4:93:05:3e:46”
and
ATTR{address}==“1c:bf:ce:1a:39:d3”

Other approach could be to use the vendor id product id keys at least for the USB adapter with something like this:

SUBSYSTEM=="net", ACTION="add",  ATTRS{idProduct}=="5370",  ATTRS{idVendor}=="148f",  NAME="wlo1"
SUBSYSTEM=="net", ACTION="add",  ATTRS{device}=="0x9135",  ATTRS{vendor}=="0x02df",  NAME="wlo0"

Generally this a match and the less you have to match the less chances for a mismatch so I wonder if your rules

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="wlan_sdio", ATTR{address}=="48:A4:93:05:3E:46", ATTR{dev_id}=="0x0", ATTR{type}=="1", NAME="wlo0"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="rt2800usb", ATTR{address}=="1C:BF:CE:1A:39:D3", ATTR{dev_id}=="0x0", ATTR{type}=="1", NAME="wlo1"

could be shortened to

SUBSYSTEM=="net", ACTION=="add",  ATTR{address}=="48:a4:93:05:3e:46",  NAME="wlo0"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="1c:bf:ce:1a:39:d3",  NAME="wlo1"

If that does not work we will have to find an expert tomorrow as our support is coming to an end soon for today and we will not find anyone to answer this in balena any more.

1 Like

Okay, thank you and have a great weekend. I will try as you have suggested.

No worries, I will still be around for 15 minutes…

That did not work on renaming the adapters.

image

image

which one did you try ?

The lowercase approach.

I will try the other approach tomorrow.

I remember doing this before but its been a while… Let me see if I find a recipe

nothing found - another hint I did find is to use higher rule numbers to make it unlikely they will be overridden by other rules.
This said have a nice weekend and get back to us if you do not get it solved or tell us your solution if you did.

First of all, I would like to thank the entire balena Team for not giving up on this.

I did achieve what I was looking for. I was hoping to use wlan0 and wlan1 as the names, but will work with this:

image

udev rules:

and I was able to start my wifi hotspot and adhoc network using this.

Thank you again. This can be marked resolved.

2 Likes

@jprovan great! Thanks for coming back to post the solution :+1: