Arduino Due + SIM808 serial comm. issues

PaulS:
How do you expect us to explain what appears in the Serial Monitor application, when you failed to show us that?

The Serial Monitor application does NOT randomly spit out characters. It shows ONLY what the Arduino sent.

Hi PaulS,

I'm sorry for not being more specific or providing you all with a proper screenshot of the output in the serial monitor. However, when I refer to random characters, I mean gibberish nonsense.

If I type "AT" and I expect a response "OK", then sometimes I receive no response, and other times I receive something like "?`óe" - this especially applies to the first piece of code. The second piece of code either doesn't give any responses or it simply outputs what I provide as input.

I don't have the setup with me at the time of writing, but I can provide more information about the whole setup later if necessary.

I apologise for the inconvenience.