You've already said that you had, had the printer connected to the router through Ethernet, same as your desktop.
That should be sufficient as long as the router has wifi capabilities then you should be able to use it on the network.
My concern is that it does not seem to be getting an IP address from the router that corresponds to the network scheme of your desktop and I would assume, your laptop.
It might be worth your while to just reset the printer's network configuration back to factory defaults and see if that helps.
To reset to factory defaults
1 On the control panel of the HP all-in-one, press the Setup button.
2 Press 8, and then press 2.
This displays the Network menu and then selects Restore Network Defaults.
3 Press 1 to confirm.
SOURCE: Page 17 of the printer manual.