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

WWAN device reported as ethernet #63

Open
symbx opened this issue May 6, 2024 · 2 comments · Fixed by #67
Open

WWAN device reported as ethernet #63

symbx opened this issue May 6, 2024 · 2 comments · Fixed by #67

Comments

@symbx
Copy link

symbx commented May 6, 2024

Issue Description

In some cases, wireless (Wi-Fi & WWAN) devices report their type as "Ethernet" (/sys/class/net//type contains "1"). This behavior has been observed on multiple devices (unfortunately, only Dell devices have been tested) running Arch/Manjaro distros.

It's unclear whether this issue is related to the kernel or driver (but a workaround is required as the app may be run on a distro with this problem).

Observations

The following list I got:

Interface: "enp2s0", type: Ethernet, up: true # real ethernet
Interface: "wlp3s0", type: Ethernet, up: true # wiifi card
Interface: "wlp108s0", type: Ethernet, up: true # wifi card
Interface: "wwp0s20f0u2i12", type: Ethernet, up: true # wwan card

Differences observed:

  • For Wi-Fi cards, there is a "wireless" directory under /sys/class/net/<interface>/.
  • For WWAN cards, there is no "wireless" directory, but /sys/class/net/<interface>/flags contains NO_ARP.

Request for Help

If anyone has insights or can identify other differences by which devices can be distinct, your input would be greatly appreciated.

@shellrow
Copy link
Owner

Thank you for your report.
I will investigate the differences in the device filesystem specifications and revise the implementation to accurately identify device types.
Until now, I have conducted tests on Ubuntu and Kali Linux, but I plan to also examine the behavior on Arch Linux. This will help us understand the differences in behavior across various Linux distributions and enable us to devise more appropriate measures.

I will continue to consider specific workarounds and solutions based on the results of these tests.

@shellrow shellrow linked a pull request May 18, 2024 that will close this issue
shellrow added a commit that referenced this issue May 18, 2024
#63 Fix interface type detection on Linux
@shellrow
Copy link
Owner

Fixed detection for Wi-Fi devices on Linux, ensuring they are correctly identified when previously they might have been misclassified as Ethernet. This was achieved by checking additional directories like /sys/class/net/<interface>/wireless and /sys/class/net/<interface>/phy80211 whenever the /sys/class/net/<interface>/type returned 1 (Ethernet).
Tested on Ubuntu, Kali, and Arch.

However, the current implementation does not yet cover WWAN devices. We are considering keeping this issue open to address WWAN coverage specifically, or we might close this issue and open a new one focused solely on WWAN detection improvements.

@shellrow shellrow reopened this May 18, 2024
@shellrow shellrow changed the title Wireless device reported as ethernet WWAN device reported as ethernet May 27, 2024
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

Successfully merging a pull request may close this issue.

2 participants