Did it ever work, and is broken now? Or never worked in the first place? Is the phone stock or modded.
If fully stock, try Factory reset, and/or RUU and if it still doesn't work, return it under warranty.
Please click the "Thanks" button if you found a post helpful!
Phone: AT&T HTC One (M8)
Tablet: Samsung Galaxy Tab Pro 8.4 (WiFi only)