Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why does WLAN need VLAN tagging, or why doesn't RPI support that? #80

Closed
mcr opened this issue Dec 16, 2021 · 3 comments
Closed

why does WLAN need VLAN tagging, or why doesn't RPI support that? #80

mcr opened this issue Dec 16, 2021 · 3 comments

Comments

@mcr
Copy link
Collaborator

mcr commented Dec 16, 2021

When running edgesec on an RPI4, I am getting:

2021-12-16 19:09:42.843  TRACE iw.c:199: phy0 -> P2P-device
2021-12-16 19:09:42.843  TRACE iw.c:377: WiFi interface wlan0 doesn't suport vlan tagging
2021-12-16 19:09:42.843  DEBUG engine.c:338: interface wlan0 not VLAN capable
2021-12-16 19:09:42.843  TRACE generic_hsm_driver.c:69: context param is NULL
Failed to start edgesec engine.

This is with mcr@fennrau:~/EDGESec/build $ uname -a
Linux fennrau 4.19.97-v7l+ #1294 SMP Thu Jan 30 13:21:14 GMT 2020 armv7l GNU/Linux

Perhaps I am running too old a kernel.

@mereacre
Copy link
Contributor

mereacre commented Dec 17, 2021

The hostapd daemon, which has the role of creating the software WIFI access point (AP), needs the AP/VLAN interface mode of a WIFI card/modem to map (see the option vlan_file from https://w1.fi/cgit/hostap/plain/hostapd/hostapd.conf) from VLAN IDs to virtual network interfaces that correspond to given subnets.

edgesec has the option (https://github.com/nqminds/EDGESec/blob/main/config.ini.in#L11) to detect if a WIFI card supports the AP/VLAN interface mode. One can check by running the following command:

iw phy

and then subsequently check the Supported interface modes category.

The edgesec tool was tested with several WIFI cards. More details in https://nqminds.github.io/EDGESec/docs/devices.

For Raspberry Pis the card that works out of the box is this USB one https://thepihut.com/products/usb-wifi-adapter-for-the-raspberry-pi. It has the following USB options (lsusb):

148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter

@aloisklink
Copy link
Contributor

Just to add some more information in layman terms (since other people might see this same issue):

VLAN tagging is used to segment the network. E.g. if you have a bunch of smart light-bulbs from "Brand-Example", VLAN tagging can be used to put them all on the same subnet, to prevent them from accessing other devices on your network.

The Raspberry Pi 4's internal WiFi doesn't yet support VLAN tagging, however, the most common USB wifi adaptor for Raspberry Pi's does support it: https://thepihut.com/products/usb-wifi-adapter-for-the-raspberry-pi.

This would normally be called wlan1 instead of wlan0 on a Raspberry Pi.

@mcr
Copy link
Collaborator Author

mcr commented Dec 19, 2021

The hostapd daemon, which has the role of creating the software WIFI access point (AP), needs the AP/VLAN interface mode of a WIFI card/modem to map (see the option vlan_file from https://w1.fi/cgit/hostap/plain/hostapd/hostapd.conf) from VLAN IDs to virtual network interfaces that correspond to given subnets.

Why do we need to do this?
Why do we need more than one ESSID? or more than one subnet?
OpenWRT will all of this itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants