Power & Source of Big Ideas

Android build with GPRS support (almost) Need help!!!

Moderators: chensy, FATechsupport

I have managed to create a custom Android build with GPRS support using a SIMCOM RIL and SIM5320E modem module.

It can send and receive SMS but it crashes com.android.phone when it connects to PPP and I have been unable to track down the reason for this.

If anyone is willing to help I have permission from FriendlyArm to post the source and looking for assistance to find out why it crashes. I have littered the code with additional log commands in an attempt to find out where it actually crashes and so far not found it.

I'll upload the source this week to Github and anyone who is interested in helping, PM me for the link. I'll make it public after we get this sorted.
OK. I have finally tracked this down and fixed it so that it can work but the issue that causes this is still in the code.

The fault is caused when NetworkMonitor handles the CAPTIVE_PORTAL_SERVER using the property ro.net.captive_server in setprop.

Code: Select all

        mServer = Settings.Global.getString(mContext.getContentResolver(),
                Settings.Global.CAPTIVE_PORTAL_SERVER);
        if (mServer == null) {
            mServer = SystemProperties.get("ro.net.captive_server");
            if (mServer == null || mServer.length() == 0) {
                mServer = DEFAULT_SERVER;
            } else {
                Settings.Global.putString(mContext.getContentResolver(),
                        Settings.Global.CAPTIVE_PORTAL_SERVER, mServer);
            }
        }


By commenting out the ro.net.captive_portal in the setprop file, the connection now uses the default server for connection checking.

The fault lies in the line where Settings.Global.putString is called. This causes an exception. Why I do not yet know.

By removing the property, the PPP connection now works 100%

Who is online

In total there are 3 users online :: 0 registered, 0 hidden and 3 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 3 guests