[solved] Constant, inconsistent SIM800L failures while trying to use it

Hi,

I am really new to the whole Arduino world - for couple of days I played around with some sensors and managed to get done what I wanted, never had any experience with microcontrollers before and I used c++ years ago so I was struggling but it wasn't so bad.

Now I got stuck totally with SIM800L I am trying to connect (the version that runs on 5V), basically whatever I do the unit behaves very moody and just seems to die randomly or gets "stuck". I uploaded this example file from tinygsm: TinyGSM/HttpClient.ino at master · vshymanskyy/TinyGSM · GitHub to my Arduino Uno.

When I run the board and connect to serial I can see very inconsistent responses like this:

Initializing modem...
Wait...
Initializing modem...
Modem: 
Waiting for network... OK
Connecting to internetWait...
Initializing modem...
Modem: �RS��␂�␕�r��j
Waiting for network... OK
Connecting to internetWait...
Initializing modem...
Modem: SIM800 R14/18
Waiting for network... fail
Waiting for network... fail
Wait...
Initializing modem...
Modem: 
Waiting for network...Wait...
Initializing modem...
Modem: SIM800 R16.18
Waiting for network... OK
Connecting to internet fail
Waiting for network... fail
Waiting for network... OK
Connecting to internet fail
Waiting for network... OK
Connecting to internet fail
Initializing modem...
Modem: SIM800 R16/L8

I did some research and I found out that the power is usually the bottleneck for this module and I was powering it off USB port in my computer first as I had no 5V PSU. So I had the idea to cut off some old usb cable and use it with some PSU to deliver power to the module - so I did and tried several PSU's including an iPad PSU that is supposed to be 2.1A . No effect - the modem still seems totally unstable. In fact it seemed to produce less "trash" like Modem: �RS��␂�␕�r��j when it was connected to my computer USB port than PSU.

The prototype is on a breadboard connected with quite lengthy cables (about 20cm) - can this be the issue? The Arduino and SIM board grounds are connected.

I did connect the modem to my PC through USB/Rs and I could communicate with it w/o problems - tried to send SMS and some AT commands - seemed ok, also simple test script (echo serial <--> modem) like on this page https://www.ayomaonline.com/programming/quickstart-sim800-sim800l-with-arduino/ work...

So any tips to get this working would be much appreciated.

Regards,
Lech

I have done another test w/o tinyGSM, just terminal and all seems to work. Why would the modem fail with tinyGSM?

AT+CGATT=1

OK
AT+SAPBR=3,1,"CONTYPE","GPRS"

OK
AT+SAPBR=3,1,"APN","internet"

OK

AT+SAPBR=2,1

+SAPBR: 1,1,"10.82.192.117"

OK
AT+HTTPINIT

OK
AT+HTTPPARA="URL","http://www.google.com"

OK

AT+HTTPACTION=0

OK

+HTTPACTION: 0,200,11810
AT+HTTPREAD=0,20

+HTTPREAD: 20
<!doctype html><html
OK

I think I figured it out so maybe its helpful for someone - it appears the problems were happening because the communication between arduino and the sim800 died randomly, changing the port speed to 38400 seems to resolve the issue - the communication is now consistent. The rogue characters output from the serial seems to be a good indication of this issue.