PPP Widget 3
This is a fundamental rewrite of PPP Widget 2.
Just like the original version it allows the use of 3G modems and phones attached to a tablet's USB port
(with OTG adapter) or with Bluetooth (when paired with phones providing DUN profile).
The main improvements are a much better USB throughput and support for connection variants other than PPP - at the moment these are NCM, ECM and QMI. Most 4G/LTE devices should be able to work now.
- Does not rely on PPPD and Usb_ModeSwitch binaries anymore; the respective functions are rewritten in Java
- No kernel driver modules needed, the 'driver' implementation is based on the Android USB host API
- Dedicated native USB functions included, fixing some pre-Lollipop USB implementation bugs.
- More protocol support besides PPP. Common 4G/LTE modems should be working now.
- Contrary to other solutions, full network awareness for applications is provided
- Minimal configuration input required (in most cases just the APN)
- "Profile" feature for configuration, based on the active SIM card (one profile per SIM card, automatic detection)
- From version 1.0.15, display of signal mode and strength if the modem provides it in a standard way
- It's truly free. No ads. No data gathering. I don't want any money. Seriously.
Requirements and limitations:
- Root access is still mandatory. You won't get full network access without it
- You need a powered USB hub or a power-injecting OTG cable - unless your Android device has plenty of USB power
- "SuperSU" app needs to be installed (usually comes with rooting tools)
- At least Android 4.0 is required
Since driver modules are no longer needed, there is no fundamental problem with more recent devices anymore. However, some manufacturers have added "blacklists" for USB accessory devices that will not be accessible via the Android USB layer.
Baaad example: Sony Xperia Tablet Z - which has almost all 3G modems locked out !!
If you have such a device, you can still use "PPP Widget" as long as the serial USB drivers are available.
Frequently Asked Questions
Q: I have installed PPP Widget 3, but I don't know how to start it. There is no icon on the workspace
and I can't find it in the app list.
A: This is a widget-only app. To use a widget, you have to place it on the workspace.
The way to access the widget menu may differ from one manufacturer to the other. On older Google devices, there is usually a second tab in the app list screen which is named "Widgets". Many newer devices require a long tap on the workspace before they offer the widget menu button.
Q: I would like to see PPP Widget on all my workspaces.
A: No problem - as with every widget, you can place as many as you want. They will all act the same, no matter which one you use to setup and start your connection.
Q: How do I edit the connection configuration? Can I handle more than one SIM/provider?
A: The first step is to connect your modem or modem-enabled phone. The unique SIM ID will be determined and you will be instructed to complete the profile associated with the active SIM card.
You can use as many different SIMs as you like, in different modems or in the same one; if you insert the respective device, the SIM card is recognized and the stored configuration is used.
A: If you are on a GSM/UMTS/HSDPA based system, this is likely the only parameter that you have to provide.
If you did not get this basic information directly from your provider, start an Internet search for the provider's name and "apn". Be aware that the APN string can vary according to your specific plan.
Q: I am not sure what to enter as username and password for my connection.
A: In most cases, there is no actual authorization done because the connection is really set up with the modem itself, which then 'translates' the data stream to and from the cell phone connection; generally, the SIM card is used for actual identification
It is usually safe to enter a random user and password; this is better than leaving these fields blank which may cause problems with certain modems.
There are few exceptions to that rule where username and password are relevant and should be entered correctly, particularly with some CDMA providers.
Q: What should I enter as 'dial string'?
A: Basically, there are only two different possibilities:
If you are using a GSM/UMTS/HSDPA cell phone system, just leave the default alone.
If you are using a CDMA/WCDMA-based cell phone system, change the dial string to '#777'.
Q: If I plug my modem in, there is a pop-up window asking me if I want PPP Widget to handle this device.
A: Android includes a USB device management. Every new device is checked to see if an application offers to handle it. The management can remember the decision at your choice if you check the box in the dialog, so you won't be asked again for that device.
If your modem needs to be switched to a different device mode (most modems do), you will see the pop-up a second time - the new device mode appears to Android just like a different device.
Check the box there as well and you will not be bothered again.
Q: If the connection is made, there is a pop-up window asking me if I want to accept a VPN
connection created by PPP Widget 3.
A: This is intended and you will have to confirm the request; it's basically the only method to create a network interface for the mobile data connection.
PPP Widget 3 does not really do VPN; unfortunately, due to that trick there can be no real VPN while PPP Widget 3 is connected.
Q: On what versions of Android will it work?
A: The minimum version is Android 4.0. Extensive testing was done up to 6.0.1.
It's untested on version 7 and probably not fully operational there. Beware if you intend upgrade the official firmware !! See the troubleshooting questions about upgrading below.
Q: Why is custom ROM XYZ not supported?
A: The target systems of both PPP Widgets are unaltered tablets with stock ROM - just the root access is required.
Custom ROMs have no restrictions with regard to enabling 3G modem support, so PPP Widget's tricks are not needed there. Ask the creators of the ROMs to include serial drivers and 'official' PPP access.
I do not test on custom ROMS! Stock ROMs provide enough problems as it is ...
Q: I'm a developer and would like to control PPP Widget 3 from annother app or script.
A: There is a simple remote control feature added that works by sending a broadcast intent with one of the actions "de.draisberghof.pppwidget3.ACTION_CONNECT" and "de.draisberghof.pppwidget3.ACTION_DISCONNECT". This obviously only works if a modem is connected and ready to use.
To use that feature from the command line or from a script, you can run the "am" utility:
$ am broadcast -a "de.draisberghof.pppwidget3.ACTION_CONNECT"
Q: I would like to use advanced features, like selecting a fixed band or limiting the provider selection
A: Unfortunately, I am not able to include these advanced features myself. Some modems are using vendor-specific commands for these settings and there is no way I can cater to every device. PPP Widget 3 will stay as generic as possible to support the widest possible range of devices.
However, you can add custom AT commands to the dialling process to tweak the effective settings:
Go to the "lib" directory in the folder "data/de.draisberghof.pppwidget2/files" on the SD card. Add a file named "modem_init.txt" and insert your special AT commands, each on one line.
See the ETSI standard for GSM AT commands for possible tweaks, including provider and band limitations. Again, your device may not provide the full set of commands, or it may include additional ones.
Q: PPP Widget 3 gives me this message when I place it on the workspace: "No root access"
A: The widget checks if it can start commands with root rights upon start-up. Either your device is not properly rooted or the app that manages the access per application - like 'Superuser' or 'SuperSU' - did not grant the widget the necessary access right. In the latter case, review the settings in the respective application.
Q: PPP Widget 3 seems to find a modem even if I did not plug mine in yet. Also, there are sometimes
weird things going on after that initial modem search.
A: PPP Widget 3 is much more likely than the previous versions to find internal modems (in phones or cellular-enabled tablets) if they are connected as USB devices internally.
Unfortunately, there is no good way to tell which is an external modem and which is not. So I have added a workaround: in the configuration, there is an entry where you can add USB devices that should be ignored. Simply enter one or more USB IDs in that text field, and the respective devices will cause no more trouble.
To retrieve the USB ID, you have to enable logging in the configuration. Then remove and replace the widget on its workspace. The internal modem should be examined again. Afterwards, open the "USB Log" and note the USB ID (an example would be "05c6:904c"). Enter this exact ID in the ignore field.
Q: I plug in my modem with the widget on the workspace - but nothing happens. It has worked before!
A: There are two likely causes for this.
- It's possible that the Android system has 'killed' the background process of PPP Widget 3. Android constantly
hunts for long running programs which it thinks are doing nothing, and sometimes kills them - more often so if
memory is limited on the device.
Just touch the icon of the widget (the colored area showing "PPP" and a little USB stick). This will 'wake up' the app and usually recognize the modem instantly.
- Some tablets/phones are sensitive regarding the order of connection (OTG cable, modem, power source). In that case try to re-plug things in a different order than before.
Q: My modem is never found at all, despite having root access and using a powered USB hub.
A: Again, there are several possible causes:
- Annother application grabs the modem which initially appears as a memory device. Examples are StickMount and OTG Helper.
- Some devices come with blacklists on kernel or system level. Look at the output of command line tools like "dmesg" or "logcat" to spot this. There are some devices around where USB hubs are disabled on the kernel level, others (Xperia Tablet Z and probably other models from Sony) have almost all modems blacklisted on the Android level (!)
- Sometimes the order of connection is crucial. Some devices like it better if the modem is connected to the OTG cable (or the hub) and then both together are inserted into the host socket. On some devices it's the other way round ...
- The OTG driver or hardware may have hung up (it's not as robust as on a desktop computer). Try to reboot your Android device with the adapter unplugged
- Your modem is very new and the method to prepare it is not known yet (see Usb_ModeSwitch for an explanation). Have a look at the USB log for hints about this
- There is an unnoticed bug in PPP Widget 3. Post your report at the forum
Q: After plugging my modem, PPP Widget goes to "Prepare device", then hangs or goes into some
sort of a cycle.
A: It's very likely that your USB host port is not able to provide sufficient power or that aggressive power saving kicked in. Please see 'Power Problems' below.
Q: After plugging my modem, PPP Widget goes to "Prepare device", then says "No driver found"
A: On "PPP Widget 3", it is likely that this means your modem does not provide any useable ports.
In that case, post your USB log in the support forum.
Q: When successfully connecting my phone reboots!
A: The manufacturer has changed something in the Android system code for this device. This results in a crash when PPP Widget notifies the system about the network connection.
The only solution for this is to disable the system notification in the configuration. This will result in limitations for several applications, mostly the ones by Google which are relying on a network notification instead of just going ahead and using the network.
Unless the manufacturer publishes the changes in the source code (they are not required to), there is no other solution possible.
Q: I updated my Android firmware, and PPP Widget 3 stopped working!
A: You may have forgotten to get root access again; this must be done once for every new firmware.
Also be aware that PPP Widget 3 is using one or two undocumented API functions which can change with each version release. To be on the safe side, postpone the upgrade until PPP Widget 3 is keeping up again.
I can only test with my limited Android device park (still 13 different tablets and counting). I don't get the latest Android release immediately, if at all. Sometimes I need to wait if new devices are available with the new system.
Q: The widget says "Connected" but I have no network access at all!
A: It's quite likely that the route and nameserver parameters could not be set correctly after connecting.
This may be a problem of the installed superuser app that is responsible for executing the respective commands with root rights. There is reason to suspect that superuser apps other than "SuperSU" are not working properly. PPP Widget 3 is only tested with "SuperSU".
Q: I can connect but some apps keep telling me that there is no network connection!
A: New Android versions or changes by individual manufacturers may break PPP Widget's special way of making the network connection 'officially' known to the whole system. It relies on features that are not documented and can easily be changed or even removed by the Android maintainers.
You can only work around that by using alternative apps that don't rely on the 'official' network status and instead just go ahead and use any available kernel-level network route. Examples are "K9" for mail and alternative browsers like "Opera" or "Dolphin" if you want to start downloads from the web.
Q: I can't get PPP Widget to work, but my problem is not listed here
A: There is no guarantee, but try reporting your problem at the support forum.
In most cases it will be useful to post a log that may show the problem. Enable the "Logging" feature in the "PPP Widget 3" configuration; you will get an USB log which shows how the device preparation was handled, and a PPP log which contains all commands going to the modem and the actual network negotiation.
Q: After plugging my modem, PPP Widget 3 still shows "No modem found" or gets stuck at "Prepare
Q: PPP Widget 3 and my modem seem to behave erratically
Q: I get a message dialogue from PPP Widget 3 saying that my modem is gone again
A: This demands an extended explanation.
On smaller tablets (typically up to 7" devices) there is often not enough power available for attached USB devices.
Wireless modems are among the devices with the highest power demand (500 mA straight, the USB 2.0 standard's
maximum). Usually, only some larger tablets can provide that much power on their host ports. With
Samsung, even the 10" devices are reportedly power-limited; this goes for Nexus 10 also.
Smaller ones often have their limit at 100 mA which rules out using a large array of USB devices. On some tablets or phones you may be successful if the power level is close to 100% - but not for the rest of the time.
My Nexus 7 works fine with many 3G sticks attached directly - but even with this tablet I had at least one of my test modems go into a reset cycle once it started the actual transmission.
The problem went away when I used a powered hub.
In short: if your modem works when connected directly, you are just lucky!
A powered hub is usually the solution for power problems. There are also those sleek OTG adapters with power "injection", however they may not work with each and every tablet as they do not comply with USB specifications. They are mostly O.K. though and quite inexpensive, besides being very compact - plus you can attach your tablet's power adapter if they expect the power supply on a micro USB socket.
A great initial help for learning how to access USB modems without using kernel driver modules was the fine
project "USB Serial for Android", written
and maintained by Mike Wakerly and copyrighted 2011-2012 by Google Inc. (presumably because M.W. was previously
employed by Google). Thank you!
As a rewrite of PPP Widget 2, PPP Widget 3 has moved away from this project and does not use its code anymore.