When you are using HP Photosmart 5520 e-All-in-One printer it is possible that you are struggling with frequent disconnects in your LAN infrastructure. That was the situation with me too. I checked if printer receives statical IP address, if it has strong Wi-Fi signal. Reinstalled driver. Connected it by network name and also by IP. Nothing helped. During a day it several times lost connection and user was not able to print and to scan. After a while connection usually restored, but such unstable behavior was not acceptable. Then I tried one workaround.
|This is how HP Photosmart 5520 looks. Picture from http://www8.hp.com/au|
As the Wi-Fi was maintained by Mikrotik router (which are my favorite routers) I set a Netwatch job, to ping printer IP every 30 seconds. And it helped. Possibly printer go to sleep or do something else when it is not used for a period of time, but when it gets pinged this state never occurs. And as the router and printer is always on, such workaround is good enough.
If your network is not based on advanced router, you can tray continued ping from some of local computer that are always on or at least while people are working during the day. It will also do the job.