Hello. My name is ***** ***** I will try to assist you with your question. So your HL-2270DW is getting a false error stating the cover is open? That is a frustrating issue. Do you have any canned air, or an air compressor with a blower attachment? Most likely it is 1 of two things that is causing this issue. 1st - Optical or manual sensor are blocked.
2nd - Sensor is faulty and needs replaced or printer needs replaced depending if the cost of the replacement sensor and the labor to replace it is more than the printer is worth. That is something you would have to decide if this is the case.
There are sensors throughout all printers that checks certain functions and one of those is to verify if covers and doors are open, and to NOT print if they are open. This is what is happening with yours. These sensors are sometimes optical in nature and accumulate dust which does not allow the optical sensor to get a clear signal, which in turn tell s the printer to flag an error of "Cover Open. If it is a manual switch then it might have something stopping it from clearing, like a small chunk of paper etc.
What I suggest first of all is to disconnect your printer from the PC and power,, and remove any toner or ink cartridges from the printer. Then use an air compressor or canned air and open all doors and covers and blow out the printer as best as you can. Paying close attention to the areas around the edges of the covers to hopefully clear any optical and manual sensors of dirt, dust or scrap paper. The goal here is to clean the heck out of the printer and any sensors that are blocked. Then after it is clean, re-insert your toner or ink, then hook it up to power first. Turn the printer on, and wait for it to fully power up and cycle through the startup procedure. Then hook it up to your PC. Once this is all done please get back to me and let me know the status. Thanks in advance and I hope this helps you. Matt