#include <SoftwareSerial.h>

For project, I use this library because I don't use pins 0 and 1 for rx and tx. I guess that with this library I can't do this:

if (mySerial.available()>0){ A = mySerial.read(); lcd.print(A); }

What can I use instead of "available" and "read"?

SoftwareSerial is obsolete. You should be using NewSoftSerial, instead. NewSoftSerial has an available() method. Both classes have read() methods.

In the SoftwareSerial class, the value returned by read() is checked for validity (a non-negative value) before the value is used.

What do you want to mean by "read() is checked for validity (a non-negative value) before the value is used"? Thank you

SoftwareSerial does not have an available() method. So, your only option is ti call read(), which returns -1 if there was nothing available to read, and a 0 or positive value if there was data to read.

SoftwareSerial does not have an available() method. So, your only option is ti call read(), which returns -1 if there was nothing available to read

I thought* it simply blocked until a character arrived. If it could return -1, that suggests that it could also have an available method.

*Actually, I know, because I've read the source.

So without using softawreserial or newsoftserial librairies, “available” send a positive value when a data is received and “read” send the chararacter received, I understand this.
But, as I’m usining newsoftserial, “read” send a positive value when data is received, but I would like to know the character that microcontroler has received, how can I do that?
Thank you for your explanation

I'm guessing that a positive value is the value, and a negative value is "no value". So if you get 45 then, being positive, 45 is what you received. If you get -1 then being negative, you got no value.

I'm not sure about that, but I'm going to try now

This is my code and I’m sure that I hate to receive something. Every 1 seconde, my lcd displays a “P”

#include <LiquidCrystal.h>// librairie pour afficheur lcd
#include <NewSoftSerial.h>
const int RS=2;
const int E=3;
const int D4=4;
const int D5=5;
const int D6=6;
const int D7=7;
char A = 0;

#define rxPin 11 
#define txPin 10
LiquidCrystal lcd(RS, E, D4, D5, D6, D7);
NewSoftSerial mySerial(rxPin, txPin);
void setup(){
  
  mySerial.begin(9600);  
  mySerial.println("AT+CPIN=0409");
  lcd.clear();
  
}
void loop(){

      A = mySerial.read();
      lcd.print(A);
      delay(1000);
  
}

Capital P is hex 50, decimal 80. What is this receiver connected to?

Actually, even if I don’t send anything, lcd displays this “P”. I have to explain my projet, I do a transmission with a mobile phone.
I’v already done this with bascom, so I know how the mobile phone answers.
In the last program, I’ve send its pin code and I know that 's ok because, there’s a led on mobile phone which blinking

I have to explain my projet, I do a transmission with a mobile phone.

Well, why didn’t you say that?

void loop(){

      A = mySerial.read();
      lcd.print(A);
      delay(1000);
  
}

This looks to me like it will only ever read one character a second, even if there are more, or less available. What about:

void loop(){

  int c;

  // if available, show character
      while ((c = mySerial.read()) != -1)
        lcd.print(c);
  
    delay(100);
  
}

Sorry, I had a virus in my pc. In fact the mistake I made is in hardware and not as soft as I thought, I reversed and RX RTS ... For your information, mySerial.read did the same thing than Serial.read and mySerial .available did the same thing Serial.available.