To connect your **HP DeskJet 2742e** printer to WiFi, you can use either the printer’s control panel with a WPS-enabled router or the HP Smart App.

Using the **control panel and WPS** method:
– Turn on the printer and wait until it’s ready.
– Press and hold the **Wireless button** and the **Information button** simultaneously for about 5 seconds until the blue wireless light blinks, indicating WiFi setup mode.
– Within 2 minutes, press the **WPS button** on your router to start the connection.
– Once connected, the blue light on the printer will stop blinking and stay solid, confirming the connection[2].

Using the **HP Smart App** method:
– Download and open the **HP Smart App** on your smartphone, tablet, or computer connected to the same WiFi network you want the printer to use.
– In the app, select **Set up a new printer** and pick your HP DeskJet 2742e when it appears.
– Enter your WiFi password when prompted and follow the on-screen instructions to complete setup[1][2].

Additional notes:
– If switching to a new WiFi network, you can reset the printer’s network settings and reconnect using the above methods[5].
– Make sure your printer is within router coverage and powered on during setup.
– For direct connections, WiFi Direct can also be used to connect the printer directly to devices without a router, but this is separate from WiFi network setup[4].

These steps cover the typical wireless setup for your DeskJet 2742e. If you experience connection issues, try restarting your printer and router or using WiFi Direct as a fallback[2].