(Solved) How to get/see wlan0 link speed?

Got a new router with 5G AC wireless and wanted to check the link speed on my X92_S912 box.
No luck so far; this is what I get running commands that I know:

CoreELEC (official): 8.90.5 (S912.arm)

CoreELEC:~ # cat /sys/class/net/wlan0/speed
cat: read error: Invalid argument

CoreELEC:~ # iwconfig wlan0
wlan0 IEEE 802.11 Access Point: Not-Associated
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 invalid crypt:0 invalid misc:0

CoreELEC:~ # cat /proc/net/wireless
Inter-| sta-| Quality | Discarded packets | Missed | WE
face | tus | link level noise | nwid crypt frag retry misc | beacon | 22
wlan0: 0000 0 0 0 0 0 0 0 0 0
CoreELEC:~ #

Btw, internet and local network work normally over wlan0…

what does this show?

ethtool wlan0

or this for just the output you want I think

ethtool eth0 | grep -A 1 -i speed

Nothing:

CoreELEC (official): 8.90.5 (S912.arm)

CoreELEC:~ # ethtool wlan0
Settings for wlan0:
No data available

CoreELEC:~ # ethtool eth0 | grep -A 1 -i speed
Cannot get device settings: Device or resource busy
Cannot get wake-on-lan settings: Device or resource busy
Cannot get message level: Device or resource busy
Cannot get link status: Device or resource busy
CoreELEC:~ #

Try

ifconfig

to see what that outputs.

I tried that also, but it does not show wlan0 speed:

CoreELEC (official): 8.90.5 (S912.arm)
CoreELEC:~ # ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:4096 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

wlan0 Link encap:Ethernet HWaddr CC:B8:A8:C1:37:FC
inet addr:192.168.1.24 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:139 errors:0 dropped:0 overruns:0 frame:0
TX packets:136 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:36550 (35.6 KiB) TX bytes:22089 (21.5 KiB)

CoreELEC:~ #

I didn’t expect ifconfig to show the speed … just wanted to confirm you are using wlan0.

I have never had a failure of ethtool to show details as you have, so I am as lost as you. :wink:

It’s because Wired network was disabled, only Wireless was on. When I enable Wired and connect it to the router I get proper response with ethtool:

CoreELEC (official): 8.90.0 (S912.arm)
CoreELEC:~ # ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Link partner advertised pause frame use: Symmetric
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Port: MII
PHYAD: 0
Transceiver: external
Auto-negotiation: on
Supports Wake-on: ug
Wake-on: d
Current message level: 0x0000003d (61)
drv link timer ifdown ifup
Link detected: yes
CoreELEC:~ #

But wireless link speed is what I am trying to finnd out :slight_smile:

Yes I generally use a wired connection which explains why I have not come across this problem.

What about the router?
Can you get the connection information from there?

No, it’s a LTE (Huawei B525 Cat6) router. It has only necessary settings for 2,4G and 5G WiFi. From it I can get all sorts of info regarding G4/LTE connection, but none for LAN or WiFi…

Checking the WiFi connection with my Win10 laptop I get max connection speeds of 300, 600 and 1200mbit/s respectivly for WiFi Bandwidth 20, 40 and 80MHz.

Finally found proper command to get Wlan link speed.

Result for 2,4G:

CoreELEC (official): 8.90.5 (S912.arm)
CoreELEC:~ # iw dev wlan0 link
Connected to 3c:cd:5d:1b:f5:ed (on wlan0)
SSID: Huawei-4G
freq: 2462
signal: -43 dBm
tx bitrate: 150.0 MBit/s

Result for 5G:

CoreELEC (official): 8.90.5 (S912.arm)
CoreELEC:~ # iw dev wlan0 link
Connected to 3c:cd:5d:1b:f5:ef (on wlan0)
SSID: Huawei-5G
freq: 5220
signal: -52 dBm
tx bitrate: 180.0 MBit/s

Not much, but considering that it’s a 50$ box, satisfied :slight_smile:

1 Like