USB printer is connected to the port but cannot be detected

i have a deskjet ink advantage 2515 connected to the usb port via usb.

The printer is working good for 7 months with no problem, last 2 months the printer act strange. When ever i try to print a doc in word 2010 i can see the printer is offline ( but in reality the printer is on and connected to the pc) and also checking the INK level an error show "The computer is unable to establish a two way communication with the device" . I reinstall the printer driver and follow the instruction on it but no luck still the printer is offline. Then I decided to bring it to the HP service center and the technician told me that i must download the latest driver of the printer. So I download the latest driver and install it follow the instruction on it and it worked.

Last 3 days I print a doc suddenly the printer restarted printing from the page 1 of the doc. And I can hear a sound ( when you insert or disconnect device into the usb port). I reinstall the latest driver and I follow the instructions on it, when the installation ask me to connect the usb cable , the usb cable of the printer cannot be detected. I look at the device manager under the USB controllers section the HP usb is not in there. So i check the usb port and the port is working fine. I replace a printer usb cable from my old printer still no luck. I install the HP print and scan doctor and i cannot print a test page it says that Unable to Communicate with the usb device.