The rear camera won't focus, takes photo fine, but will not focus on up close photos, and will not allow any scan function (bar code etc), possibly a replacement camera?
Yes this sounds to be a hardware problem with the focus ring, I had the same problem with an iphone 5 last week and apple swapped it out. I would back up the phone and restore it first just to check though.