To keep an HP printer from going offline  move it closer to the router when connected to a wireless network Alternatively  use a network cable that fits firmly into the printer and computer for a cable connection  give the printer a static IP address or assign the correct port number