Connect your HP LaserJet Pro M15w printer to WiFi to make things easier. Have your print tasks done in just a few taps. Before you start the connection process, check that the Wi-Fi router is powered on and working properly. Keep your network name and WiFi password handy; you'll need these details during the process. Check that the WiFi light on your printer is blinking if it is in setup mode. The mobile device you are using for the setup should be connected to the same wireless network you want to connect your printer to.
Here’s what needs to be done to successfully connect your HP LaserJet Pro M15w printer to WiFi:
Check if the printer is turned on.
Place the printer sheets in the input tray.
On the control panel of the printer, press and hold the Resume/Cancel button for 3-4 seconds.
A printout including the WiFi Direct name and password will be printed.
Go to Wi-Fi settings on your device.
Ensure your Wi-Fi is turned on, and then search for nearby devices.
Tap on your printer’s WiFi Direct name in the WiFi settings when it appears.
Enter the WiFi Direct password in the field, then tap Join or Connect.
Source:- HP LaserJet Pro M15w to WiFi