Interested to get some advice on the following please.
Working on a project for some time now and had this issue with a serial console showing weird characters.
Everything is the code works but have some minor issues that I need to resolve.
I have read about baud rates and slowing the code down to communicate to the SIM modem. Baud rate is 115200.
Q. Where do these extra characters come from?
Q. How do I debug them?
Q. Both MQTT and modem AT commands seem to generate them?
Q. MQTT pub topics seem to have more
Q. MQTT sub topics are ok
Using MQTT explorer to the cloud MQTT broker and pub/sub messages are as expected.
In serial console added to the code looking for blanks etc...
Then I'd suspect one or more is dodgy. Getting good characters so often, occasional issues like that is either a flaky connection, something spiking your power supply (like a relay or solenoid you're turning on or off), or a big piece of equipment turning on or off in the vicinity of your apparatus. Serial is susceptible to noise.
Those are my guesses, anyways.
Concur. I suspect what you're seeing are valid characters, then, just not intelligible to Serial Monitor. Have you looked at the data with something more sophisticated? There are serial sniffers out there that will show you the hex value instead of an unintelligible character.