Unable to create ppp connection using BG95 module

I am having problems trying to connect to the internet using the quectel BG95 module.

The modem seems to work fine in terms of being able to communicate with the OS, I tried some AT commands and it seems to work fine

at+cops?
+COPS: 0,0,"AR PERSONAL",8

OK
ati
Quectel
BG95-M3
Revision: BG95M3LAR02A03

OK

But when I try to use pppd to run a ppp connection over it I get the message Couldn’t set tty to PPP discipline: Invalid argument right after the serial connection is established.

Here’s the log:

Mar  9 21:58:13 pre-bnd-s71-sh1 local2.info chat[741]: abort on (BUSY)
Mar  9 21:58:13 pre-bnd-s71-sh1 local2.info chat[741]: abort on (NO CARRIER)
Mar  9 21:58:13 pre-bnd-s71-sh1 local2.info chat[741]: abort on (NO DIALTONE)
Mar  9 21:58:13 pre-bnd-s71-sh1 local2.info chat[741]: abort on (ERROR)
Mar  9 21:58:13 pre-bnd-s71-sh1 local2.info chat[741]: abort on (NO ANSWER)
Mar  9 21:58:13 pre-bnd-s71-sh1 local2.info chat[741]: timeout set to 30 seconds
Mar  9 21:58:13 pre-bnd-s71-sh1 local2.info chat[741]: send (AT^M)
Mar  9 21:58:13 pre-bnd-s71-sh1 local2.info chat[741]: expect (OK)
Mar  9 21:58:13 pre-bnd-s71-sh1 local2.info chat[741]: ^M
Mar  9 21:58:13 pre-bnd-s71-sh1 local2.info chat[741]: OK
Mar  9 21:58:13 pre-bnd-s71-sh1 local2.info chat[741]:  -- got it
Mar  9 21:58:13 pre-bnd-s71-sh1 local2.info chat[741]: send (ATE0^M)
Mar  9 21:58:13 pre-bnd-s71-sh1 local2.info chat[741]: expect (OK)
Mar  9 21:58:13 pre-bnd-s71-sh1 local2.info chat[741]: ^M
Mar  9 21:58:13 pre-bnd-s71-sh1 local2.info chat[741]: ^M
Mar  9 21:58:13 pre-bnd-s71-sh1 local2.info chat[741]: OK
Mar  9 21:58:13 pre-bnd-s71-sh1 local2.info chat[741]:  -- got it
Mar  9 21:58:13 pre-bnd-s71-sh1 local2.info chat[741]: send (ATI;+CSUB;+CSQ;+CPIN?;+COPS?;+CGREG?;&D2^M)
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[741]: expect (+COPS: 0,0)
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[741]: ^M
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[741]: ^M
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[741]: Quectel^M
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[741]: BG95-M3^M
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[741]: Revision: BG95M3LAR02A03^M
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[741]: ^M
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[741]: SubEdition: V05^M
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[741]: ^M
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[741]: +CSQ: 30,99^M
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[741]: ^M
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[741]: +CPIN: READY^M
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[741]: ^M
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[741]: +COPS: 0,0
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[741]:  -- got it
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[741]: send (AT+CGDCONT=1,"IP","super",,0,0^M)
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[741]: expect (OK)
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[741]: ,"AR PERSONAL",8^M
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[741]: ^M
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[741]: +CGREG: 0,4^M
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[741]: ^M
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[741]: OK
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[741]:  -- got it
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[741]: send (ATD*99#^M)
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[741]: expect (CONNECT)
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[741]: ^M
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[741]: ^M
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[741]: OK^M
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[741]: ^M
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[741]: CONNECT
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[741]:  -- got it
Mar  9 21:58:14 pre-bnd-s71-sh1 daemon.debug pppd[723]: Script chat -s -v -f /etc/ppp/peers/quectel-chat-connect finished (pid 741), status = 0x0
Mar  9 21:58:14 pre-bnd-s71-sh1 daemon.info pppd[723]: Serial connection established.
Mar  9 21:58:14 pre-bnd-s71-sh1 daemon.err pppd[723]: Couldn't set tty to PPP discipline: Invalid argument
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[743]: abort on (ERROR)
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[743]: abort on (NO DIALTONE)
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[743]: send (+++^M)
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[743]: send (+++^M)
Mar  9 21:58:14 pre-bnd-s71-sh1 local2.info chat[743]: send (+++^M)
Mar  9 21:58:14 pre-bnd-s71-sh1 daemon.debug pppd[723]: Script chat -s -v -f /etc/ppp/peers/quectel-chat-disconnect finished (pid 743), status = 0x0
Mar  9 21:58:14 pre-bnd-s71-sh1 daemon.info pppd[723]: Serial link disconnected.

I am lost here and could use some advice. Any ideas?
Thanks in advance

I’m guessing that your OS is missing some driver, so the problem is not related to your modem model.

I suspect the same. But I can’t figure out which one.

How about ppp_async ?

That’s the clue.

As Jfrog mentioned, please check that you have added the configurations

CONFIG_PPP 
CONFIG_PPP_ASYNC 
CONFIG_PPP_SYNC_TTY 
CONFIG_PPP_DEFLATE

This did the trick. Thanks guys!!!