Fprintf issues

I am having difficulty sending commands to the UART using fprintf. I am able to send 4 commands without difficulty. However, when I try to send the fifth command, fprintf returns a -1. Any other commands after this also returns a -1. Any ideas why this is happening?

More questions in this forum