BG95M3 Android(7.1) RIL

I got the latest RIL library from support (v3.3.32).
This version makes it farther but I’m still not there yet.
Everything looks pretty good until it tries to establish the PPP connection.

Here is a cut portion of the radio log:

12-31 19:14:22.116 D/use-Rlog/RLOG-RIL ATC( 2138): AT> AT&D2
12-31 19:14:22.119 D/use-Rlog/RLOG-RIL ATC( 2138): AT< OK
12-31 19:14:22.120 D/use-Rlog/RLOG-RIL ATC( 2138): AT> AT+CFUN?
12-31 19:14:22.121 D/CdmaSSM ( 1137): subscriptionSource from settings: 0
12-31 19:14:22.123 D/use-Rlog/RLOG-RIL ATC( 2138): AT< +CFUN: 1
12-31 19:14:22.123 D/use-Rlog/RLOG-RIL ATC( 2138): AT< OK
12-31 19:14:22.124 D/use-Rlog/RLOG-RIL ATC( 2138): AT> AT+COPS=3,2;+COPS?
12-31 19:14:22.128 D/use-Rlog/RLOG-RIL ATC( 2138): AT< +COPS: 0,2,“310410”,8
12-31 19:14:22.128 D/use-Rlog/RLOG-RIL ATC( 2138): AT< OK
12-31 19:14:22.128 D/use-Rlog/RLOG-RIL ATC( 2138): AT> AT+CEREG?
12-31 19:14:22.131 D/use-Rlog/RLOG-RIL ATC( 2138): AT< +CEREG: 2,1,“9800”,“64B5608”,8
12-31 19:14:22.131 D/use-Rlog/RLOG-RIL ATC( 2138): AT< OK
12-31 19:14:22.131 D/use-Rlog/RLOG-RIL ATC( 2138): AT> AT+QICSGP=1,1, “phone”,“”,“”,0;+QICSGP=1
12-31 19:14:22.133 D/QtiGsmDCT( 1137): [0]trySetupData: X retValue=true
12-31 19:14:22.134 D/use-Rlog/RLOG-RIL ATC( 2138): AT< +QICSGP: 1,“phone”,“”,“”,0
12-31 19:14:22.134 D/use-Rlog/RLOG-RIL ATC( 2138): AT< OK
12-31 19:14:22.134 D/use-Rlog/RLOG-RIL SETUP_DATA_CA( 2138): requesting data connection to APN ‘phone’!
12-31 19:14:22.135 D/use-Rlog/RLOG-RIL ATC( 2138): AT> AT+CGDCONT=1,“IP”,“phone”
12-31 19:14:22.141 D/use-Rlog/RLOG-RIL ATC( 2138): AT< OK
12-31 19:14:22.141 D/use-Rlog/RLOG-RIL ATC( 2138): AT> AT^DATAMODE
12-31 19:14:22.144 D/use-Rlog/RLOG-RIL ATC( 2138): AT< ERROR
12-31 19:14:22.145 D/use-Rlog/RLOG-RIL PPPD( 2138): pppd_thread_function ///0/99**1# enter
12-31 19:14:22.148 D/use-Rlog/RLOG-RIL PPPD( 2138): chat → AT
12-31 19:14:22.649 E/use-Rlog/RLOG-RIL PPPD( 2138): chat poll error on stdin: Success(0)
12-31 19:14:23.147 D/use-Rlog/RLOG-RIL SETUP_DATA_CA( 2138): ppp0 IP Address: 0.0.0.0/0
12-31 19:14:23.147 D/use-Rlog/RLOG-RIL SETUP_DATA_CA( 2138): [1] trying to get_local_ip … 0.0.0.0/0
12-31 19:14:24.151 D/use-Rlog/RLOG-RIL SETUP_DATA_CA( 2138): ppp0 IP Address: 0.0.0.0/0
12-31 19:14:24.151 D/use-Rlog/RLOG-RIL SETUP_DATA_CA( 2138): [2] trying to get_local_ip … 0.0.0.0/0
12-31 19:14:24.674 D/use-Rlog/RLOG-RIL PPPD( 2138): chat → AT
12-31 19:14:25.153 D/use-Rlog/RLOG-RIL SETUP_DATA_CA( 2138): ppp0 IP Address: 0.0.0.0/0
12-31 19:14:25.153 D/use-Rlog/RLOG-RIL SETUP_DATA_CA( 2138): [3] trying to get_local_ip … 0.0.0.0/0
12-31 19:14:25.176 E/use-Rlog/RLOG-RIL PPPD( 2138): chat poll error on stdin: Success(0)
12-31 19:14:26.157 D/use-Rlog/RLOG-RIL SETUP_DATA_CA( 2138): ppp0 IP Address: 0.0.0.0/0
12-31 19:14:26.157 D/use-Rlog/RLOG-RIL SETUP_DATA_CA( 2138): [4] trying to get_local_ip … 0.0.0.0/0
12-31 19:14:27.160 D/use-Rlog/RLOG-RIL SETUP_DATA_CA( 2138): ppp0 IP Address: 0.0.0.0/0
12-31 19:14:27.160 D/use-Rlog/RLOG-RIL SETUP_DATA_CA( 2138): [5] trying to get_local_ip … 0.0.0.0/0
12-31 19:14:27.207 D/use-Rlog/RLOG-RIL PPPD( 2138): chat → AT
12-31 19:14:27.708 E/use-Rlog/RLOG-RIL PPPD( 2138): chat poll error on stdin: Success(0)
12-31 19:14:28.164 D/use-Rlog/RLOG-RIL SETUP_DATA_CA( 2138): ppp0 IP Address: 0.0.0.0/0
12-31 19:14:28.164 D/use-Rlog/RLOG-RIL SETUP_DATA_CA( 2138): [6] trying to get_local_ip … 0.0.0.0/0
12-31 19:14:29.167 D/use-Rlog/RLOG-RIL SETUP_DATA_CA( 2138): ppp0 IP Address: 0.0.0.0/0
12-31 19:14:29.167 D/use-Rlog/RLOG-RIL SETUP_DATA_CA( 2138): [7] trying to get_local_ip … 0.0.0.0/0
12-31 19:14:29.738 D/use-Rlog/RLOG-RIL PPPD( 2138): chat → AT
12-31 19:14:30.171 D/use-Rlog/RLOG-RIL SETUP_DATA_CA( 2138): ppp0 IP Address: 0.0.0.0/0
12-31 19:14:30.171 D/use-Rlog/RLOG-RIL SETUP_DATA_CA( 2138): [8] trying to get_local_ip … 0.0.0.0/0
12-31 19:14:30.240 E/use-Rlog/RLOG-RIL PPPD( 2138): chat poll error on stdin: Success(0)
12-31 19:14:31.176 D/use-Rlog/RLOG-RIL SETUP_DATA_CA( 2138): ppp0 IP Address: 0.0.0.0/0
12-31 19:14:31.176 D/use-Rlog/RLOG-RIL SETUP_DATA_CA( 2138): [9] trying to get_local_ip … 0.0.0.0/0
12-31 19:14:32.178 D/use-Rlog/RLOG-RIL SETUP_DATA_CA( 2138): ppp0 IP Address: 0.0.0.0/0
12-31 19:14:32.178 D/use-Rlog/RLOG-RIL SETUP_DATA_CA( 2138): [10] trying to get_local_ip … 0.0.0.0/0
12-31 19:14:32.273 D/use-Rlog/RLOG-RIL PPPD( 2138): pppd_thread_function exit
12-31 19:14:33.180 D/use-Rlog/RLOG-RIL SETUP_DATA_CA( 2138): ppp0 IP Address: 0.0.0.0/0
12-31 19:14:33.180 D/use-Rlog/RLOG-RIL SETUP_DATA_CA( 2138): [11] trying to get_local_ip … 0.0.0.0/0
12-31 19:14:33.180 D/use-Rlog/RLOG-RIL SETUP_DATA_CA( 2138): ql_set_data_call_info_for_ppp pdp=1, ifname=ppp0, iptype=4, ipaddr=(null)
12-31 19:14:33.180 D/use-Rlog/RLOG-RIL SETUP_DATA_CA( 2138): get_local_ip: 0.0.0.0/0, cost 11 sec
12-31 19:14:33.180 E/use-Rlog/RLOG-RIL SETUP_DATA_CA( 2138): Unable to setup PDP in requestSetupDataCall
12-31 19:14:33.180 D/use-Rlog/RLOG-RIL ATC( 2138): AT> at+qcfg=“modemrstlevel”,0
12-31 19:14:33.181 D/RilRequest( 1137): [3780]< SETUP_DATA_CALL error: com.android.internal.telephony.CommandException: GENERIC_FAILURE ret=

What is “AT^DATAMODE”?

I am able to manually setup a PPP connection but I have questions about the PPP scripts:

What ttyUSB port should I have in the quectel-ppp script when using Android RIL to create the PPP connection? I have tried both ttyUSB2 and ttyUSB3 but it doesn’t seem to make a difference.

Is Android RILs in charge of setting up that PPP connection or do I need to do that myself before starting the ril-daemon?

Thanks!