Zend certified PHP/Magento developer

printer not found cleanly on lan but found on wifi

This is not a major issue but I am trying to find the tech reason ‘why’?
I have hp 2540 deskjet wifi printer. It is connected to my router on wifi.

I am trying to install it on my Windows 10 desktop which is wired to router on lan port. To install it, I run executable installer file as available on hp website. I don’t see a reason here but the printer is not cleanly found on network when my pc is on lan cable to router. The installer says something like your printer is on network but software is unable to find it using network discovery methods. You can operate the printer using ip address. Firewall in Windows 10 is Off.

I proceeded with install and printer worked fine after installation. Internet search on this error did not return any significant results. Just to experiment I restored my Windows 10 to earlier point, then disabled lan and plugged in my usb wifi adapter to my pc and now pc is on wifi connected to router. Now printer is very cleanly found (The installer clearly shows printer name with its ip address to choose from) and such warning does not appear at all.

What is wrong with lan connection? I can access the printer web interface by typing its ip address in browser even when I am on lan. Printer ipv4 is fixed and does not change. If I understand correctly, software must be connecting to router (gateway ip) and from thereon it should anyways find the printer regardless it’s on wifi or lan?