Bug 86986 - nokia,icera: udev-based whitelist of Nokia Internet sticks
Summary: nokia,icera: udev-based whitelist of Nokia Internet sticks
Status: RESOLVED MOVED
Alias: None
Product: ModemManager
Classification: Unclassified
Component: plugins (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: ModemManager bug user
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-03 21:59 UTC by Aleksander Morgado
Modified: 2018-06-10 09:05 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Aleksander Morgado 2014-12-03 21:59:59 UTC
Even if we have some logic to automatically probe for Icera devices branded by Nokia, the actual list of devices is not long, so it probably is worth setting up a udev-based whitelist for this.

Plus, if the default primary/modem port is always if#1, avoid udev tags to handle that.

See branch 'aleksander/nokia-icera-whitelist' in git.
Comment 1 Dan Williams 2014-12-04 00:27:17 UTC
On Windows, my CS-12 gets PID 061A. But on Linux, it's 0619.  On Windows my 21M-02 gets 0639.  But on Linux it gets 0638.

I guess the usb_modeswitch tool sends a different command than Windows does?

====

The drivers that come with my 21M-02 include the following devices.  All devices have USB interface #0 as the "modem" port.

0421:0634
0421:0636
0421:0638 <-- not listed on Windows but this is what I have on Linux
0421:0639
0421:063B
0421:063E
0421:0640
0421:0643
0421:0645

All these devices have CDC-ECM ethernet ports too, which varies depending on the device (usually #4 or #6).

====

So I think we need to add the PIDs for the newer "M" devices, but we also need to do a bit of digging to figure out what the PIDs are on Linux when usb_modeswitch switches them.  Because it's clearly different...
Comment 2 Tore Anderson 2014-12-04 08:38:19 UTC
I'm not sure if you're requesting any particular information from me here? If so, let me know what and I'll post it. :-)

Tore
Comment 3 Aleksander Morgado 2014-12-04 10:37:18 UTC
(In reply to Tore Anderson from comment #2)
> I'm not sure if you're requesting any particular information from me here?
> If so, let me know what and I'll post it. :-)
> 

Given that you have one of these, I just CC-ed you in case you were interested, no worries :)
Comment 4 Dan Williams 2014-12-04 18:38:32 UTC
So looking at the USB modeswitch TargetProduct rules, we may have been getting them wrong for a while under Linux.  The Windows drivers I typically look at obviously use "Windows" mode, but on Linux usb_modeswitch puts them into a different mode.

usb_modeswitch rules have:

CS-10: 060C -> 060E  (but we have 060D)
CS-15: 0610 -> 0612  (but we have 0611)
CS-12: 0618 -> 0619  (but we have 0619 because that's what mine does, but Windows switches to 061A)
CS-11: 061D -> 061E  (but we have 061F)
CS-17: 0622 -> 0623  (we have same)
CS-18: 0627 -> 0612,0629 (we have neither in our lists)
CS-19: 062C -> 062D  (we have 062E)
CS-7M: 0632 -> 0632 (?!)  (we don't have it)
21-M:  0637 -> 0638  (we have same)

For my 21M-02:
-------------

Linux:
0421:0638
MessageContent="5553424312345678000000000000061b000000020000000000000000000000"
ACM: 1, 3, 5
ECM: 7
MS: 9
(interface #0 is a Communications/Wireless Handset Control type)

Windows:
0421:0639
MessageContent="555342431234567800000000000010ff000000000000000000000000000000"
0321
ACM: 0, 2, 4
ECM: 6
MS: 8

For my CS-12:
-------------

Linux:
0421:0619
MessageContent="5553424312345678000000000000061b000000020000000000000000000000"
ACM: 1, 3
ECM: none
MS: none
(interface #0 is a Communications/Wireless Handset Control type)

Windows:
0421:061a
MessageContent="555342431234567800000000000010ff000000000000000000000000000000"
0321
ACM: 0, 1 (*no slave interfaces*, data/interrupt endpoints on same interface)
ECM: none
MS: none

[81725.862523] cdc_acm 2-1:1.0: Control and data interfaces are not separated!
[81725.862617] cdc_acm 2-1:1.0: ttyACM0: USB ACM device
[81725.863618] cdc_acm 2-1:1.1: Control and data interfaces are not separated!
[81725.863699] cdc_acm 2-1:1.1: ttyACM1: USB ACM device

===========

So we have two problems here:

1) we are missing many of the USB VID/PIDs for "Linux" mode, because we got the IDs from Windows drivers that switch to a different mode and PID.

2) we are getting the USB interface # for the modem interface correct, but only because we are ignoring the modeswitch thing.  Maybe we can check what type USB interface #0 is, and if it's class=2/subclass=8/proto=0 (Communications/Wireless Handset Control) we use #1 instead?  Maybe it's not worth it, if we just say that we only support "Linux"/WHC mode?  But if we do that we still need to fix #1
Comment 5 Dan Williams 2014-12-04 19:12:31 UTC
Pushed a new commit with some new device IDs, hopefully including most of the known Linux ones.  I don't have a lot of info on the "M" series so I'm not sure how well I got Linux mode for those.
Comment 6 Aleksander Morgado 2015-01-17 11:46:57 UTC
From your last comment I get that you added most tags for the Linux-mode, which in fact is the mode where if#1 is directly flagged as PPP in the plugin.

Do you think the branch is in a reasonable shape to get it merged to git master?
Comment 7 GitLab Migration User 2018-06-10 09:05:30 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/68.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.