If any of the internal circuitry broke, you're better off buying a replacement. You can find them in online stores like Amazon or eBay (just make sure it's the Note 4 pen if you still want to use keep it in the port), or if you can't find it, any S-Pen for any Note model should work (they just won't fit into the port, DO NOT TRY to get it in).