Page 1 of 1

Pantech/Verizon UML295: multiple modes supported

Posted: 09 Mar 2015, 12:07
by bmork
Hello,

Don't know if this is already known, but just in case...

David McCullough and Markus Gothe found that the UML295 supports (at least) 3 modes:
  • 10a9:606f - unswitched
    10a9:6064 - CDC ECM - default, auto-switched after a few seconds
    10a9:???? - QMI - control request 0x70, wValue 4
    10a9:???? - RNDIS - control request 0x70, wValue 2 (i.e. usb_modeswitch "PantechMode)
So, the "PantechMode" will, if enabled, switch these devices to RNDIS mode:

Code: Select all

void switchPantechMode()
{
        SHOW_PROGRESS(output,"Send Pantech control message ...\n");
        ret = libusb_control_transfer(devh, LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_RECIPIENT_DEVICE, 0x70, 2, 0, (unsigned char *)buffer, 0, 1000);
        if (ret < 0) {
                SHOW_PROGRESS(output," Error: Pantech control message failed (error %d). Abort\n\n", ret);
                exit(1);
        }
}
IMHO that's the least useful mode for Linux. QMI is the only mode where we currently can manage the device in a useful way. It would be useful to at least be able to switch them to this mode as soon as we have got the qmi_wwan driver support in place (not there yet, but as usual you can always test it using the new_id sysfs attribute).


ref http://lists.freedesktop.org/archives/l ... 01117.html

Re: Pantech/Verizon UML295: multiple modes supported

Posted: 09 Mar 2015, 20:00
by Josh
So I take it you recommend this:

- QMI mode if driver is available

- CDC ECM otherwise

Is that right?

Re: Pantech/Verizon UML295: multiple modes supported

Posted: 09 Mar 2015, 22:07
by bmork
Josh wrote:So I take it you recommend this:

- QMI mode if driver is available

- CDC ECM otherwise

Is that right?
Yes.

Re: Pantech/Verizon UML295: multiple modes supported

Posted: 10 Mar 2015, 03:15
by LOM
Josh wrote:So I take it you recommend this:

- QMI mode if driver is available

- CDC ECM otherwise

Is that right?
That might cause problem with the MHS291L for which PantechMode was introduced and which is currently the only dongle using that ctrl msg.
I guess, but don't know for sure, that MHS291L also has a qmi mode but if it doesn't then we don't know what will become of it after getting the qmi ctrl msg (which it will get if the qmi driver is present in the system).

I'd suggest you introduce numerical values to the PantechMode switch so user can decide which mode he wants to use.

Re: Pantech/Verizon UML295: multiple modes supported

Posted: 21 Jun 2015, 16:16
by Josh
I decided to do the implementation in the following way:

Values for "PantechMode":
  • 1 - Automatic detection: UML295 will get wValue 4 if qmi_wwan present, otherwise self-switch is waited for (no usb_modeswitch action); MHS291L will get wValue 2
  • 2 and up - will be taken directly as wValue
This way any old config file for MHS291L will continue to work as expected.

Is there any word if storage driver binding/unbinding has any influence on the auto-switch behaviour?

Re: Pantech/Verizon UML295: multiple modes supported

Posted: 21 Jun 2015, 17:34
by LOM
The qmi_wwan driver is present in most builds nowadays so it must be removed if you want cdc_ether mode.
What about this instead:

wValue = config value x 2

0x2 = 0 , check wvalue and do nothing in case it is 0. This is autoswitch to cdc_ether
1x2 = 2 , this is rndis as before
2x2 = 4, this is qmi

Re: Pantech/Verizon UML295: multiple modes supported

Posted: 21 Jun 2015, 18:46
by Josh
Hmm, you are right.
However, "0" is not good because it's the 'option not set' value in several places.

I think might be better to add a 'forced' ether mode with config value 3. The pre-determination is done in the wrapper so there is a 'translation' of the parameter anyway.

The resulting setting would be:
  1. Automatic mode determination (not auto-switch) as described
  2. forced RNDIS
  3. forced CDC Ether (no action)
  4. forced QMI

Re: Pantech/Verizon UML295: multiple modes supported

Posted: 22 Jun 2015, 04:00
by LOM
ok, that's fine with me and better than my suggestion which would make it impossible to reach odd wValues if any such should be found out/needed in the future. :wink:

Re: Pantech/Verizon UML295: multiple modes supported

Posted: 03 Jul 2015, 18:15
by ACiD GRiM
Hi, could you tell me if this is still in development? I'm trying this with the latest tar sources and can't get this to switch.

When I plug this device into my windows computer with IP Passthrough enabled with the Pantech utility, I can see that the PID is listed as 6074, I then use this command in linux:

Code: Select all

./usb_modeswitch -v 10a9 -p 6064 -P 6074 -F -R -n
And it looks like it was successful, however lsusb still states the PID is 6064.

Re: Pantech/Verizon UML295: multiple modes supported

Posted: 04 Jul 2015, 09:24
by Josh
You might want to read the first post again.

If you see the product ID "6064", the modem has already switched automatically. There is no way to switch it again.
If you re-insert it, run "lsusb" immediately (probably more than once), and you should see the product ID "606f" which is the initial (unswitched) state. After a while it changes to "6064".

Unfortunately we don't know yet what the product IDs are for the other target modes. But you can just try both possibilities.

Again, remember that there is a time parameter involved. If you try to mode-switch manually, you would have to do that immediately after inserting the device.

Note that -F expects a parameter now. Try

Code: Select all

./usb_modeswitch -v 10a9 -p 606f -F 2
See what the result is, then try the same (after re-plugging) with "-F 4"

We are looking forward to your report ...

Re: Pantech/Verizon UML295: multiple modes supported

Posted: 04 Jul 2015, 11:24
by ACiD GRiM
I've also tried with 606f before the switch, but with the command line I mentioned. I will report next week when I'm back in town since I only have remote access at the moment. Thanks for the reply