In the Extended Edition of The Return of the King movie, in the scene at the Black Gate, the Mouth of Sauron comes out to parley with the company. Eventually, he presents Frodo's mithril shirt to Gandalf, and delivers the taunt that eventually leads Aragorn to decapitate him:
The Halfling was dear to thee, I see. Know that he suffered greatly at the hands of his host. Who would have thought that one so small could endure so much pain? And he did, Gandalf. He did.
This dialogue - and, more importantly, Sauron's finding of the mithril shirt - seems to indicate that he already knew a Hobbit had been present in Mordor. If this was the case, even at this late point, why was he not actively searching for said Hobbit? How was he unable to see the Fellowship's true plan even after he had made the very unusual discovery of a Hobbit in Mordor and had known for a long time that a Hobbit was carrying the Ring?
I'm not expecting any further exposition on this from the movies, but does Tolkien explain this any better in his writings? Or does he simply render those scenes entirely differently to the movie?