What's new

Retrieving serial number via CLI or WebUI

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

davidski

Occasional Visitor
Is there a way to retrieve the serial number of XT8 devices remotely (either via SSH or the WebUI)? I've looked all throughout the GUI, the various CLI commands and log files, with no success. There's so much other hardware information directly exposed and it would be convenient for inventorying/confirming deployments if I didn't have to unmount devices to get a peek at their undercarriages. 😄
 
Try:
Code:
nvram get serial_no

Or in the GUI go to Network Map, click on the router button (next to "Security level:"), click the Status tab and scroll down.
 
Try:
Code:
nvram get serial_no

Or in the GUI go to Network Map, click on the router button (next to "Security level:"), click the Status tab and scroll down.

Code:
nvram get serial_no
returns nothing for me. (exit code 0, but zero output).
Code:
nvram getall |grep serial
also gives me nothing with a serial number in it.

In the GUI, the status tab bottom half has LAN IP, something called a PIN code (an 8 digit code that doesn't match what looks like a serial number), and the MAC addresses of the various interfaces.

😞
 
Surely these came in a box with a serial number on the bar code label?
 
Hmm, maybe device dependant then. I assume you're running GNUton's firmware?

How about this (my serial number starts with "M1IUI"):
Code:
nvram show | grep M1IUI
 
Surely these came in a box with a serial number on the bar code label?
Oh, probably. I just have a couple nodes in awkward places (in stands that are kind of a pain to remove, etc.) and would like to retrieve the serial number without having to monkey about with the cables and all that.
 
Hmm, maybe device dependant then. I assume you're running GNUton's firmware?

How about this (my serial number starts with "M1IUI"):
Code:
nvram show | grep M1IUI
In my case,
Code:
nvram show |grep N3
, gives nothing. I guess it's just not exposed on this model. Phooey!
 
"wps_device_pin" in my sample of two is unique and matches what's printed on each label.

Bash:
nvram show 2>/dev/null | grep '\(lan_..addr\|_device[^=]\)'
provide enough id, I'd think, unless you just have to have the serial number...
 
Is there a way to retrieve the serial number of XT8 devices remotely (either via SSH or the WebUI)? I've looked all throughout the GUI, the various CLI commands and log files, with no success. There's so much other hardware information directly exposed and it would be convenient for inventorying/confirming deployments if I didn't have to unmount devices to get a peek at their undercarriages. 😄
On my router, if I go to Network Map - System Status - Status and scroll down I get the LAN IP, PIN Code, Serial Number etc....
 
On my router, if I go to Network Map - System Status - Status and scroll down I get the LAN IP, PIN Code, Serial Number etc....
These MAC addresses are not serial numbers.

The serial numbers are on the product box and on the sticker on the back of the router. The nvram command cannot directly retrieve the serial number, but can only obtain the WPS PIN code and MAC addresses.

But Asus does use serial numbers in the CFE for registration of services on each router (like Trend Micro).

sn.jpg
(Source: https://www.asus.com/support/Article/566/ )
 
Last edited:
These MAC addresses are not serial numbers.
Some routers (like mine and Anton's) also show the serial number in that tab as well as MAC addresses and PIN code. See post #2. This serial number is also stored in nvram. Unfortunately the OP has a model that doesn't have this information. See posts #3 and #7.
 
Some routers (like mine and Anton's) also show the serial number in that tab as well as MAC addresses and PIN code. See post #2. This serial number is also stored in nvram. Unfortunately the OP has a model that doesn't have this information. See posts #3 and #7.
Getting the serial number directly in nvram is not possible with most models, I think it only exists in newer models. Among Asus's services that require a serial number, some use the MAC address as a way to determine the device's identity.

Code:
cat /var/label_macaddr
 
Getting the serial number directly in nvram is not possible with most models, I think it only exists in newer models. Among Asus's services that require a serial number, some use the MAC address as a way to determine the device's identity.

Code:
cat /var/label_macaddr
Code:
admin@RT-AX86U:/# cat /var/label_macaddr
cat: can't open '/var/label_macaddr': No such file or directory
 
The shell command I included above was derived using XT8s. I also now have a GT-AX6000 and /it/ has the serial number as the nvram variable "serial_no".

No reason it couldn't be declared as such on an XT8, once "discovered". Though I guess I'd like to hear the reason for the need. From what I recall of the situation of the units in question, due to the effort described I'd stick with the MACs as identification. In fact, I /do/ anyway. I've made a shell script which returns all the information I want about the wifi connection in service on any given GNU/Linux "box". It tells me the network "name" of the router/AP based on a "case" clause using wildcarded MAC data. Sure, it took a minute to populate, but I can't be bothered with storing any other than device name identification in my personal RAM.

So, what's the need for the serial numbers as opposed to other ID?

Oh, BTW, notice that 32 digit hex number under *aes* (I /think/, going on after-work-celebrating RAM)? I intend later to see if that can be made into any kind of interesting ASCII.
 
My serial number shows in the GUI and with the command nvram get serial_no
This matches what is on the routers label for serial number.

Screenshot 2023-10-18 141839.jpg


Screenshot 2023-10-18 141750.jpg
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top