Batteries included
peterh337
Posts: 17
Joined: 03 Mar 2015, 17:02

PPP W2 Samsung Galaxy S android 4.4.2 - basic problems

Post by peterh337 » 03 Mar 2015, 17:10

Hello,

I have a rooted tablet, but also installed Superuser, and root check reports it is fully rooted.

I have repeatedly installed and uninstalled PPP W2 but it doesn't do anything. Usually the two buttons are greyed out, so I can't do any config. Sometimes the config button is not greyed out so I can get in, and then I have tried various things like *99# for dialing out using a Nokia 6310i phone (GPRS capable) but PPP W2 doesn't indicate anything is connected, and doesn't report any usable USB ports.

I had installed it before I installed Superuser (not realising any rooted tablet already has SU in the ROM) but it didn't do anything differently then. Incidentally the SU program has no list of apps showing and offers no visible way of adding any (lots of hits on google on this issue alone). I have configured SU to *not* ask for a prompt when an app requires access.

Is there something more basic I need to do to get the program to work?

The tablet works in every other respect.

My eventual objective is to use the tablet with a Thuraya satellite phone which is a straight Hayes modem, 19200 baud, which does 9600 baud dial-up access using ATDT1722. I have it working easily under WinXP, DUN.

The cable I am using is a StarTech ICUSBANDR232 which I believe is an FTDI cable (based on the FT232 chip). But PPP W2 doesn't behave differently whether or not this cable is connected to the tablet.

I would really appreciate help with this since this is quite a critical application which presently can be done only with a Lenovo Tablet 2 win8 tablet which has all sorts of problems, like the touch interface being almost totally useless :)

peterh337
Posts: 17
Joined: 03 Mar 2015, 17:02

Re: PPP W2 Samsung Galaxy S android 4.4.2 - basic problems

Post by peterh337 » 03 Mar 2015, 18:51

To add:

What exactly would cause the program to show both buttons greyed-out?

I did install the FTDI drivers from the app shop, together with the FTDI terminal program.

The terminal isn't talking to the phone (a separate problem; AT<CR> doesn't generate a reply) but would the PPP W2 show both buttons greyed out unless there is a modem connected *and* is responding to some AT command?

peterh337
Posts: 17
Joined: 03 Mar 2015, 17:02

Re: PPP W2 Samsung Galaxy S android 4.4.2 - basic problems

Post by peterh337 » 03 Mar 2015, 22:59

Extra info:

The greyed out button status on PPP W2 is not related to whether a USB OTG cable is plugged in. I know that shorting pins 4 and 5 on the device end of the OTG cable tells the device whether the cable is inserted.

I also have the tablet working as a terminal emulator using a Startech FTDI cable which has a micro-USB connector and a standard USB connector, both at one end (the standard one is used for power only - yes slightly bizzare, and if there is no power provided the cable is totally dead, despite the FTDI chip drawing only a few mA) and an RS232 connector (DB9M) at the other end.

So the tablet is capable of serial comms using a virtual COM port of some kind.

But the PPP W2 spec says it needs a USB OTG cable so I am now testing with that. But the only time the config button is not greyed out (the Connect button is always greyed out) is immediately after the app is installed. If you install it and reboot the tablet, both are greyed out.

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Re: PPP W2 Samsung Galaxy S android 4.4.2 - basic problems

Post by Josh » 04 Mar 2015, 00:13

PPP Widget 2 uses only the USB API of Android and it assumes that a standard 3G modem is connected. It is not really able to control an actual serial interface.

Did you try PPP Widget (the original version) yet? It uses the standard pppd program which can connect to any serial or USB-serial port - provided there are kernel drivers for the respective device on board.
It also has some configuration options to manually override diverse settings.

Starting with Android 4.2 (I think) Google's genuine devices (the Nexuses) had module loading in the kernel disabled alltogether, so this path to extending the connectivity was barred - thus the development of PPP Widget 2.

peterh337
Posts: 17
Joined: 03 Mar 2015, 17:02

Re: PPP W2 Samsung Galaxy S android 4.4.2 - basic problems

Post by peterh337 » 04 Mar 2015, 00:42

I don't have a 3G USB adapter. I could get one but it won't help with what I need to do. I need to drive a Hayes modem at 19200 baud, ATDT 1722 (Thuraya's in-house ISP).

But these adapters only emulate a serial USB device, don't they? They contain the functional equivalent of an FT232 or PL2303 (well, the USB side thereof).

And behind that they have a Hayes compatible modem, which you kick off with ATDT*99# etc.

So PPP W2 should work in the same way with any FT232 or PL2303 cable, going to a normal Hayes compatible modem.

My assumption about PPP W2 is that it tries to detect a modem, by sending out ATI? or similar, repeatedly. That is what windows does, or some similar query.

Then it dials out with the configured string, usually *99# for GPRS or 3G/3G+.

When it gets a connection, it switches to a TCP/IP stack and creates a network socket within the O/S.

Should PPP W (not 2) just install on 4.4.2 and not need any extra drivers? Do I need to install pppd and if so where from?

I do have both the FTDI and PL2303 drivers installed. (Note that the original PL2303 is not supported; it needs to be the rare HX version - same problem with win8.x).

What exactly causes the Config button on PPP W2 to be greyed out? That would really help me if I knew that.

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Re: PPP W2 Samsung Galaxy S android 4.4.2 - basic problems

Post by Josh » 04 Mar 2015, 09:16

peterh337 wrote:But these adapters only emulate a serial USB device, don't they? They contain the functional equivalent of an FT232 or PL2303 (well, the USB side thereof).
Not really. For instance, they don't bother with the data signal lines used in analogue serial connections; they also don't need flow control which the USB layer already takes care of.

You can believe me, there is no good chance that PPP Widget 2 will work.

Regarding PPP Widget (1), all necessary tools are 'on board'. As to the driver situation, this depends on your tablet configuration. But if the USB-to-Serial adapter is recognized, there is a good chance that the driver is present.
Look for "ttyUSB" device files in the "/dev" folder after you plugged the adapter in.

Also, you may want to read the FAQs if you haven't already done so.

peterh337
Posts: 17
Joined: 03 Mar 2015, 17:02

Re: PPP W2 Samsung Galaxy S android 4.4.2 - basic problems

Post by peterh337 » 04 Mar 2015, 09:28

I have installed PPP Widget (not 2) and the config button is always shown, but it says modem not found.

Does it require a OTG cable (pins 4+5 interconnected)?

How does it detect the modem? Does it periodically send out AT commands?

The FTDI terminal app autostarts whenever the cable is connected, so presumably I need to terminate that app manually (or uninstall it) - please confirm.

The tty* files I see under/dev are

tty
ttyGS0 ... GS3
ttyS0 .. S3
ttySAC0 ... SAC3

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Re: PPP W2 Samsung Galaxy S android 4.4.2 - basic problems

Post by Josh » 04 Mar 2015, 22:32

If you need special Android software to operate the serial cable and it does not use USB host capabilities, chances are that it is not recognized on the kernel level.

Does any of those serial device files in /dev disappear if you plug the cable out? If not, then they are not related to the cable.

PPP Widget needs a USB device ID to work with, which is usually only available if the USB interface is in host mode.

And the pppd standard tool needs a Linux device file with serial capabilities in the /dev folder.

peterh337
Posts: 17
Joined: 03 Mar 2015, 17:02

Re: PPP W2 Samsung Galaxy S android 4.4.2 - basic problems

Post by peterh337 » 05 Mar 2015, 12:20

"Does any of those serial device files in /dev disappear if you plug the cable out?"

No they don't.

Does PPP W require a OTG cable (pins 4+5 interconnected)?

How does it detect the modem? Does it periodically send out AT commands?

"which is usually only available if the USB interface is in host mode"

Could you give me any pointers on where to look? I have written loads of software (asm, C, mostly embedded systems) but not unix.

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Re: PPP W2 Samsung Galaxy S android 4.4.2 - basic problems

Post by Josh » 06 Mar 2015, 09:28

Again: PPP Widget relies on a USB host subsystem. Most tablets have only one USB port which is in "gadget mode" when connected to a computer and will switch to "host mode" if a OTG cable is connected. That's what OTG means - a USB port with two modes.

Some tablets however have a full featured USB socket; they have their host mode enabled permanently (like my Acer Iconia A500). These do not need a OTG cable obviously.

The USB standard says that a device can be hot-plugged and "discovered", meaning the system is aware of something plugged in and takes care of the necessary steps like loading a matching driver.

Since version 3.1, there is an Android API where an app is notified that a device which it has registered for is attached. This is what PPP Widget is using, but it can also do manual device selection based on the USB IDs of all devices attached. Still needs the USB host mode though.

From what I read in your cable's description I assume it does not use the host mode of the USB port. It bypasses the host subsystem entirely, using proprietary software. Consequently, neither kernel nor the Android system can "see" the cable - only the special app can.

Unless this app has a way to create a Linux device file to access the cable, you are out of luck; you can't even use pppd directly with a custom script.

peterh337
Posts: 17
Joined: 03 Mar 2015, 17:02

Re: PPP W2 Samsung Galaxy S android 4.4.2 - basic problems

Post by peterh337 » 09 Mar 2015, 20:15

I have made progress.

There appears to be no way to get a ttyUSB device file under /dev, using anything from FTDI. I have spoken to them.

However Prolific's PL2303HX does do that, via a normal OTG cable. I now see ttyUSB0.

So I went back to install PPP Widget, which I had uninstalled, but the app store says it is installed. So I deleted the folders in the root for both PPP W and PPP W2 and then it installed.

Presumably PPP Widget 2 is not the correct one to use in this case.

I configured PPP W for ttyUSB0 but it doesn't find the modem. Post-reboot, it sits there indefinitely, saying "checking access" with both buttons greyed out.

What is "checking access"? Does it send AT commands to ttyUSB0 (I configured that port manually)?

If I connect a scope to the RS232 connector, and start up the Prolific dumb terminal app, I can see characters coming out, and if I loopback pins 2 and 3, I see the reception of the transmitted data (9600,8,n,1, handshake off). So this is MAJOR PROGRESS! A functioning VCP.

Now I need to find out what PPP W is trying to do... obviously I terminate the dumb terminal before trying it and I have even rebooted the tablet, never started the terminal, and still PPP W does the same. After the initial install I cannot get into the config. Looking at the RS232 with a scope I cannot see PPP W trying to output anything, so maybe it is waiting for something, but a Hayes compatible modem isn't going to output anything. Is it maybe waiting for a CTS or DSR input to go to a HIGH level?

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Re: PPP W2 Samsung Galaxy S android 4.4.2 - basic problems

Post by Josh » 10 Mar 2015, 08:57

"Checking access" is the test for root access. There seems to be a problem with your superuser installation.

Try to install "SuperSU".

peterh337
Posts: 17
Joined: 03 Mar 2015, 17:02

Re: PPP W2 Samsung Galaxy S android 4.4.2 - basic problems

Post by peterh337 » 10 Mar 2015, 14:19

I already had SuperSU installed, so I did an "update" from the app shop.

PPP W is listed under "grant".

However looking at the logs for SuperSU, it says "Super SU Pro is required for this feature".

So I bought SuperSU Pro, installed it, rebooted, bit still the same.

Looking in the SU logs, I can see PPP W accesses from yesterday (the log entry mentioned above) when I installed it, but nothing is showing for just now.

The SU settings for PPP W are

Access - Grant
Notifications - Global Default
Logging - Global Default
Force User - (None)

So I uninstalled PPP W and reinstalled it. This recovered the Configure button, so I configured ttyUSB0 manually, but nothing else.

Then I rebooted, but PPP W again says Checking access.

So I enabled full logging in SU.

But PPP W does not appear in the logs.

So it looks like PPP W is making the SU request *in a way which SU sees* only when initially installed. Afterwards, it thinks it is but it isn't. Maybe PPP W is loading too soon, before SU has loaded up?

I have notifications enabled in SU and sure enough I don't see anything popping up. I see them for stuff like Adblock...

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Re: PPP W2 Samsung Galaxy S android 4.4.2 - basic problems

Post by Josh » 10 Mar 2015, 21:22

Hmm, I wonder if the stupid SD card restrictions of Android 4.4 are back-firing here ... I'll check the code.

peterh337
Posts: 17
Joined: 03 Mar 2015, 17:02

Re: PPP W2 Samsung Galaxy S android 4.4.2 - basic problems

Post by peterh337 » 11 Mar 2015, 09:21

I have applied SD fix and can write to the SD card freely.

Could you also tell me what AT commands PPP W sends to the modem? In one case (Thuraya 7100) I need to send ATDT1722<CR> so I configured just 1722 in the modem config. In another context, testing with an old GSM/GPRS phone (Nokia 6310i) I would use *99#

Both of these modems work with an embedded product developed at work and those are the strings which we use to dial out.

Post Reply