Bug 85001 - haier: new plugin required
Summary: haier: new plugin required
Status: RESOLVED FIXED
Alias: None
Product: ModemManager
Classification: Unclassified
Component: plugins (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: ModemManager bug user
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-14 14:16 UTC by Aleksander Morgado
Modified: 2015-01-15 09:39 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch. (8.19 KB, patch)
2014-10-14 14:41 UTC, Aleksander Morgado
Details | Splinter Review
detailed interface description (132 bytes, text/plain)
2014-11-05 14:32 UTC, Lars Melin
Details

Description Aleksander Morgado 2014-10-14 14:16:52 UTC
Originally reported at:
  https://bugzilla.gnome.org/show_bug.cgi?id=685011
Please refer to the original bug report if more details are needed.

The Haier CE81B CDMA modem (VID 0x201e, PID 0x10f8) exposes several TTYs, but only one of them can be used for data connections. If other interface is used, the modem will report a successful connection, but pppd won't be able to setup the IP session:

  NetworkManager[3242]: <info> Activation (ttyUSB2) Stage 4 of 5 (IPv4 Configure Timeout) started...
  NetworkManager[3242]: <info> (ttyUSB2): device state change: ip-config -> failed (reason 'ip-config-unavailable') [70 120 5]
  NetworkManager[3242]: <warn> Activation (ttyUSB2) failed.
  NetworkManager[3242]: <info> Activation (ttyUSB2) Stage 4 of 5 (IPv4 Configure Timeout) complete.
  NetworkManager[3242]: <info> (ttyUSB2): device state change: failed -> disconnected (reason 'none') [120 30 0]

The original reporter made it work by blacklisting if#0 to if#2, while leaving if#3 as the only TTY allowed to be used by ModemManager:

  # Haier CE81B
  ATTRS{idProduct}=="10f8", ENV{.MM_USBIFNUM}=="02", ENV{ID_MM_CANDIDATE}="0"
  ATTRS{idProduct}=="10f8", ENV{.MM_USBIFNUM}=="01", ENV{ID_MM_CANDIDATE}="0"
  ATTRS{idProduct}=="10f8", ENV{.MM_USBIFNUM}=="00", ENV{ID_MM_CANDIDATE}="0"

The contents of the mounted CD drive are also available:
http://www.mediafire.com/download/l39t0qk2kad9l02/setup_package.tar

The suggested fix is to prepare a new "haier" plugin that flags #if3 as 'data'.
Comment 1 Aleksander Morgado 2014-10-14 14:41:34 UTC
Created attachment 107829 [details] [review]
Patch.

This new plugin just creates a generic broadband modem but tags #if3 as being the primary+data port, so that it takes predenced over any other tty grabbed.
Comment 2 Aleksander Morgado 2014-10-14 14:43:29 UTC
Dan; you requested the mounted CD contents as well to the reporter, is there anything else from there that can be included in the plugin?
Comment 3 Dan Williams 2014-10-14 15:32:04 UTC
INF files say:

%VENDORMDM% = Modem2, USB\VID_201E&PID_10F8&MI_03
%VENDORDIAG%  = QportInstall00, USB\VID_201E&PID_10F8&MI_00
%VENDORAT%  = QportInstall00, USB\VID_201E&PID_10F8&MI_02
%VENDORNMEA%  = QportInstall00, USB\VID_201E&PID_10F8&MI_01

so yeah #3 should be primary + data like you say.
Comment 4 Dan Williams 2014-10-14 15:52:00 UTC
Trawling through the connection manager, we get some interesting stuff.  BM == BROADMOBI I thnk.

AT+BMSPN?
+BMSPN:
AT+CIMI
%02X
AT^SYSINFO
^SYSINFO:
%i,%i,%i,%i,%i,%i,%i
AT+COPS=?
+COPS:
AT+COPS=
no network service
AT+BMMODPREF
+BMMODPREF: 
AT+BMMODPREF=%d
AT+CSQ
AT^HDRCSQ
^HDRCSQ:
AT+CREG?
+CREG:
+CREG: %d,%d
AT+CGREG?
+BMMODPREF:
at+bmbtt
+BMBTT: 
AT+BMCGMR=%s
+BMSWVER:
AT+BMSWVER
AT+CIMI
AT+BMDEVMEID
+BMDEVMEID:
AT+CGMM
AT+BMCGMR
+BMCGMR:
AT+CGDCONT=1,"IP","%s"
-%d dBm
not known or not detectable
AT+BMDEVESN
+BMDEVESN:
AT+BMUIMID
+BMUIMID:
AT+BMEUIMID
+BMEUIMID:
AT+CPIN?
RUIM
AT^PREFMODE?
^PREFMODE:
AT+CSQ
AT^HDRCSQ
^HDRCSQ:
AT+BMREST
AT+BMRFINFO
00000000
(A)(dB)
(N)(dB)
255.00
 dBm

Messaging seems to be done with the proprietary Qualcomm messaging commands like AT$QCPMS, AT$QCNMI, AT$QCMGD, AT$QCMGR, AT$QCMGL, but we also have AT+BMCGMR.

There might be some PIN operation support too with the regular 3GPP PIN commands.

So if the modem works fine with regular CDMA commands and DIAG then great, otherwise if somebody cares enough some other support could be added later.
Comment 5 Dan Williams 2014-10-14 16:11:07 UTC
Send a kernel patch to add the device IDs to option too.
Comment 6 Aleksander Morgado 2014-10-15 08:11:11 UTC
(In reply to Dan Williams from comment #5)
> Send a kernel patch to add the device IDs to option too.

For reference, this is the patch in the option driver:
http://permalink.gmane.org/gmane.linux.usb.general/116296
Comment 7 Dan Williams 2014-10-15 14:30:54 UTC
aleksander/haier-plugin looks good to me.
Comment 8 Aleksander Morgado 2014-10-15 15:52:56 UTC
(In reply to Dan Williams from comment #7)
> aleksander/haier-plugin looks good to me.

I tried to ping the original reporter to see if he can test the patch; it's pretty much very low risk I would say anyway, so if we don't get tests back I'll just merge it.
Comment 9 Airlangga Cahya Utama 2014-10-17 19:45:07 UTC
Hello Aleksander,

Thank you for your patch.
I'm a bit busy atm.
I'll try to look out for fedora source build this
weekend.

When does the merge window happen?
Comment 10 Aleksander Morgado 2014-10-18 13:32:00 UTC
(In reply to Airlangga Cahya Utama from comment #9)
> Hello Aleksander,
> 
> Thank you for your patch.
> I'm a bit busy atm.
> I'll try to look out for fedora source build this
> weekend.
> 
> When does the merge window happen?

There's no merge window; as soon as you test it, if it works OK, I'll merge :)
Comment 11 Lars Melin 2014-11-05 14:32:15 UTC
Created attachment 108963 [details]
detailed interface description
Comment 12 Aleksander Morgado 2015-01-15 09:39:24 UTC
Merged branch to git master.


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.