PPP Widget 3

 

Screenshot
 

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.

The disclaimer from V.2 still applies though: many device/tablet combinations are working fine, but there is no guarantee that your's will. Don't blame me - I cannot possibly test all devices and modems out there. You don't lose anything though - after all, you did not spend any money ...

Features: For a list of version changes, see the announcement topic in the forum.

 

Requirements and limitations:


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 the orignal "PPP Widget" as long as the serial USB drivers are available.

 

Frequently Asked Questions

Usage:

Q: I have installed PPP Widget 3, but I don't know how to start it. Touching the icon just opens a dialog that says "Place PPP Widget 3 on your workspace first".
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.

Q: What should I enter as 'APN'?
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. So just leave these entries as they are.
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 next time when you connect 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: On what versions of Android will it work?
A:
The minimum version is Android 4.0. Testing was done up to Amdroid 12 (from version 2.0.0)
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: Can I really trust you when you say you don't secretly collect and transmit data through PPP Widget?
A:
Unfortunately, all I can give is my assurance. I don't think there is an easy way to monitor the data that's going in and out of the USB interface, so the cell network would have to be monitored.
I started writing this app because my first Wifi-only tablet wasn't able to connect over my phone. Since then, it's a hobby project. I don't need money. You can also look at the other projects described on this website, one of which is by now a standard component of all Linux distributions I know.
PPP Widget is not open source precisely because the ideas involved could indeed be used for nefarious purposes.

If you mistrust my intentions, don't use PPP Widget.

Special Features:

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 (roaming).
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.

Troubleshooting:

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 'Magisk' 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.

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:

Q: My Android device claims to support USB modems. PPP Widget finds my modem anyway, all seems to go well, the connection is made but there is no data traffic; no browsing, no download!
A:
The built-in support for USB modems is often shaky at best. It is known to fail for current 4G modems. The worst part is that in the cases I know modems are messed up so that they can't be used with PPP Widget. Newer Huawei modems are often affected - they are treated like old 3G modems and put into unuseable modes. PPP Widget sees the modem only after it has been wrongly prepared and has no way to bring it into the advanced mode which is intended for connecting.
In version 1.2.0 I have introduced a feature which attempts to bring newer Huawei modems into their advanced mode permanently, by disabling the install mode and enabling the advanced ports. This prevents the "modem support" mess-up; modems appear in the correct mode right away when plugged in.
Important: You may need to reverse the change if you are going to use the same modem with an operating system other than Linux (or Linux-based, like Android). To reverse, run the same procedure again.
Now how does it work? If you have a Huawei modem, you may find a button named "H" at the bottom of the configuration page.

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:
It is likely that this means your modem does not provide any ports which PPP Widget knows how to use.
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:
There can be several reasons for this.

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 part of the official API 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 "Vivaldi" 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.

Power Problems:

Q: After plugging my modem, PPP Widget 3 still shows "No modem found" or gets stuck at "Prepare device"
Q: I can connect but after some time the connection seems to just stop
Q: I get a message dialogue from PPP Widget 3 saying that my modem is gone again
Q: PPP Widget 3 and my modem seem to behave erratically
A:
This demands an extended explanation.

On smaller tablets (typically up to 7" devices) or on phones, 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 if they have a micro USB socket for power supply, you can just attach your tablet's power adapter.

Acknowledgements:

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 complete rewrite of PPP Widget 2, PPP Widget 3 has moved on and does not use code from this project anymore.