How to obtain the type of the connected device?

I now have an OpenWrt router, may I ask you, is there any plug-in or method to get the device type of the connected device?(subdivided into Android, iOS, PC and other categories or roughly divided into mobile phones, computers and other categories).
I can go into the terminal operation of the router, or I can compile a new package for openwrt, if you have a good method, please guide me.

A supported device, or one "running OpenWrt" ?

…and the 100'000 $ question would be:

How would you tell?

On the network, all you get to see are IP- and MAC addresses (depending on the ISO layer), neither tend to wear name badges stating their position.

A running device with openwrt

which one, specifically ?

I can get ip/mac in dhcp.leases.Although I was able to get the hostname of the device,but the hostname is usually inaccurate or some devices don't provide a hostname, so there is no way to tell the type of device based on the hostname.
So I wondered if there was a better way to solve this problem

AX3000 router ,made by H3C

there's a MAC DB you can use, but AFAIK it doesn't ship with openwrt.
pi-hole uses it, but sometimes it'll only tell you the vendor of the NIC, not the hw behind it.

image

1 Like

that device isn't running openwrt, but a vendor derivative.

I think I read somewhere that enterprise devices are looking at MAC address and specific quirks in DHCP, DNS, NTP and other network chatter to guess device and model. Probably not something you want to dive into yourself.

Could you please tell me how to install it?

install what ?

I'm just a self-learner, I have bought a few development boards and some manufacturers' finished routers, I hope to achieve the best router in my heart through DIY functions, not a manufacturer who wants to achieve some strange purposes.

This MAC DB

  1. It doesn't ship with Openwrt, I wrote that
  2. Your device isn't running Openwrt, I wrote that too

To sum it up; I have no idea.

But since your doing a DIY router, you can probably figure it out.
The file pihole uses is called macvendor.db, on OS level.

Oh,sorry,I forgot that you have said

I have flashed it to openwrt compiled by my self

oh, you forgot to tell us that too ?
how convenient, to suddenly remember it.

it doesn't really change anything though.

My English is not good, so I use translation software to translate what you say, and there may be some deviations between this. But still thanks for your reply.
I'll look again to see if there are any other MAC addresses and the vendor's relationship table that can be used in OpenWRT.

Actually we have one arp-scan-database 1.10.0-r2

2 Likes