Some news, I have tried to activate the echo mode with the command :
ATE1
I have tried the command ATQ0 too :
This parameter setting determines whether or not the TA transmits any result
code to the TE. Information text transmitted in response is not affected by
this setting.
If =0: OK (TA transmits result code)
If =1: (none) (Result codes are suppressed and not transmitted)
I changed nothing... I'm desperate
I will receive an other SIM800L the 7th of july, I will try with this new one
Because after setup line: sim800l.println("AT"); you should receive at least an OK response.
This command is sent with Carriage Return, so it is a valid command.
However in your Serialcom() function a command termination is sent again after 500ms and the response is only read after that.
Going forward with this:
sim800l.print("AT+CMGF=1");
Serialcom();
First you sent the command, delay 500ms in Serialcom(), but only terminated the command after delay and the response is immediately checked (which was probably not there yet). However with the next Serialcom() call, the response from the previous command should be arrived.
I would change the function, so it does not send termination to avoid confusion.
Instead send single line commands with println, as @J-M-L pointed out.
And from Serial Monitor send the command with termination (can be selected).