|
Activation Codes and Methods, Hardware Details, Sniffing
-
bmork
- Posts: 167
- Joined: 15 Mar 2012, 22:47
- Location: Oslo, Norway
Post
by bmork » 09 Mar 2015, 12:07
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
-
Josh
- Site Admin
- Posts: 6577
- Joined: 03 Nov 2007, 00:30
Post
by Josh » 09 Mar 2015, 20:00
So I take it you recommend this:
- QMI mode if driver is available
- CDC ECM otherwise
Is that right?
-
bmork
- Posts: 167
- Joined: 15 Mar 2012, 22:47
- Location: Oslo, Norway
Post
by bmork » 09 Mar 2015, 22:07
Josh wrote:So I take it you recommend this:
- QMI mode if driver is available
- CDC ECM otherwise
Is that right?
Yes.
-
LOM
- Posts: 1404
- Joined: 11 Jul 2012, 15:14
- Location: Koh Samui, TH
Post
by LOM » 10 Mar 2015, 03:15
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.
-
Josh
- Site Admin
- Posts: 6577
- Joined: 03 Nov 2007, 00:30
Post
by Josh » 21 Jun 2015, 16:16
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?
-
LOM
- Posts: 1404
- Joined: 11 Jul 2012, 15:14
- Location: Koh Samui, TH
Post
by LOM » 21 Jun 2015, 17:34
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
-
Josh
- Site Admin
- Posts: 6577
- Joined: 03 Nov 2007, 00:30
Post
by Josh » 21 Jun 2015, 18:46
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:
- Automatic mode determination (not auto-switch) as described
- forced RNDIS
- forced CDC Ether (no action)
- forced QMI
-
LOM
- Posts: 1404
- Joined: 11 Jul 2012, 15:14
- Location: Koh Samui, TH
Post
by LOM » 22 Jun 2015, 04:00
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. 
-
ACiD GRiM
- Posts: 2
- Joined: 03 Jul 2015, 09:48
Post
by ACiD GRiM » 03 Jul 2015, 18:15
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.
-
Josh
- Site Admin
- Posts: 6577
- Joined: 03 Nov 2007, 00:30
Post
by Josh » 04 Jul 2015, 09:24
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 ...
-
ACiD GRiM
- Posts: 2
- Joined: 03 Jul 2015, 09:48
Post
by ACiD GRiM » 04 Jul 2015, 11:24
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
|
|