Your router lists names for other devices on the WLAN, but not for the Raspberry Pi. A clue to why this is is in the names used for the other devices.
What are their names? Are they hostnames you set or something else?
They are just names, like: Galaxy-Note9. I didn't gave anything any name
These are based on MAC address lookups. If you haven't heard of them before MAC addresses are network interface firmware entities; they are generally represented as a set of 6 bytes in hexidecimal separated by colons, eg.:
b8:27:eb:a0:32:bb
Because they are usually stored in firmware, they can be changed, so they are not a guarantee of anything, including uniqueness -- but since the chances of two devices with the same MAC are very slim,1 they are used by link layer protocols such as ARP by your router, which corresponds them to the IP addresses it assigns.
Point being, MAC addresses generally don't change from what they are assigned by a manufacturer, and they play an important role in structuring a WLAN. To help prevent collisions (duplicate addresses), the first half of a MAC address is associated with a particular manufacturer (then it is up to the manufacturer to avoid using the same address multiple times).2 Sort of like internet domain names, manufacturers buy/register blocks of such addresses, and you can do lookups and reverse look-ups based on that.
Which is exactly what your router does. If you pop my example address above into the "Vendor Lookup" just linked, you'll get Raspberry Pi Foundation. If you put "raspberry pi foundation" in the OUI reverse lookup (the OUI is the first 3 bytes of the MAC), you'll get B8:27:EB
.
Some versions of nmap
and other network tools also do lookups, which is why you will sometimes get "Raspberry Pi Foundation" from them.
Anyway, "Galaxy-Note9" doesn't have an OUI via reverse lookup, but "Samsung" has quite a long list. I would guess the router has a stored list that it uses (this is how nmap
does it, I believe) which may be periodically updated, rather than doing live internet exchanges. This could explain why the name is more specific (eg., if Samsung provides a breakdown), and why the lookup is not exhaustively accurate (it doesn't really matter anyway except for convenience in listing active devices). Evidently the Pi Foundation did not make the local list.3
In any case, it is not a host name, point being, the router did not get them from mDNS, which is what avahi-daemon
implements. This runs by default on Raspbian and is also implemented on Windows and Apple devices, hence these will identify the Pi this way. However, this higher level identification isn't very important to your router since it depends on the WLAN working properly first to function.
More accurately I'd guess the reason they are changeable is so that a router can refuse duplicates, in which case the device can proffer an alternative.
The last half of the address is 3 bytes, 16777216 possible combinations.
I notice that nmap
generally doesn't identify Pis by name either anymore, because I still get manufacturer IDs for many/most things on my WLAN but not for the Pis. I thought they had started using an unofficial/arbitrary OUI (they have probably sold more than half the number of addresses available with just one), but my newest pi, a 3A+, with the newer wifi chips, still uses b8:27:eb
.
systemctl status avahi-daemon
. If the AP is gathering hostnames, you need that to reciprocate, and you need port 5353 open locally. See en.wikipedia.org/wiki/… – goldilocks♦ Sep 18 at 14:39dhcpcd.conf
andwpa_supplicant.conf
. I'm basically sending network credentials from a PHP web-page into a .txt file and reading them with a C++ program and then applying them by overwriting intodhcpcd.conf
orwpa_supplicant.conf
. – bleah1 Sep 19 at 8:00