Haier CE100 CDMA EVDO modem should be recognized by module option.ko (as it is supported)

Bug #490068 reported by Hendy Irawan
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Surbhi Palande
Nominated for Lucid by Hardik Dalwadi
Karmic
Fix Released
Medium
Surbhi Palande

Bug Description

SRU justification:

Impact: Missing ID

Fix: Pulled in as part of the stable update to 2.6.31.11

---

Haier CE100 CDMA USB Modem works fine with module option.ko as of 2.6.31-15.

Manually patching option.c and adding lines for this modem (vendor ID 0x201e, product ID 0x2009), recompiling, and replacing the option.ko, then works fine. Currently this configuration is what I use to post this bug report.

I'm attaching a patch for this to make it easy for developers to incorporate this patch.

Some references: (Indonesian)
* http://skyisgrey.org/blog/mengoptimalkan-koneksi-modem-smart-zte-2726.html
* http://blankblondtank.wordpress.com/2009/09/04/mengoptimalkan-koneksi-modem-haier-ce-100-cdma-di-linux/

ProblemType: Bug
Architecture: i386
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: ceefour 2168 F.... pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xf0500000 irq 22'
   Mixer name : 'Realtek ALC268'
   Components : 'HDA:10ec0268,15092f02,00100003 HDA:10573055,10573055,00100700'
   Controls : 24
   Simple ctrls : 15
Date: Mon Nov 30 03:22:43 2009
DistroRelease: Ubuntu 9.10
HibernationDevice: RESUME=UUID=b561688f-2a7c-4858-995b-ace0ec9557aa
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
MachineType: Intel Corporation Crestline & ICH8M Chipset
Package: linux-image-2.6.31-15-generic 2.6.31-15.50 [modified: lib/modules/2.6.31-15-generic/kernel/drivers/usb/serial/option.ko]
PccardctlIdent:
 Socket 0:
   no product info available
PccardctlStatus:
 Socket 0:
   no card
ProcCmdLine: BOOT_IMAGE=/vmlinuz-2.6.31-15-generic root=UUID=bf4d9bf6-49be-41ea-94cb-8b417b8da271 ro quiet splash
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-15.50-generic
RelatedPackageVersions:
 linux-backports-modules-2.6.31-15-generic N/A
 linux-firmware 1.25
RfKill:
 0: phy0: Wireless LAN
  Soft blocked: no
  Hard blocked: yes
SourcePackage: linux
Uname: Linux 2.6.31-15-generic i686
dmi.bios.date: 01/25/2008
dmi.bios.vendor: Phoenix Technologies LTD
dmi.bios.version: 1.0A-1471-0011
dmi.board.name: SANTA ROSA CRB
dmi.board.vendor: Intel Corporation
dmi.board.version: Not Applicable
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 1
dmi.chassis.vendor: No Enclosure
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnPhoenixTechnologiesLTD:bvr1.0A-1471-0011:bd01/25/2008:svnIntelCorporation:pnCrestline&ICH8MChipset:pvrNotApplicable:rvnIntelCorporation:rnSANTAROSACRB:rvrNotApplicable:cvnNoEnclosure:ct1:cvrN/A:
dmi.product.name: Crestline & ICH8M Chipset
dmi.product.version: Not Applicable
dmi.sys.vendor: Intel Corporation

Revision history for this message
Hendy Irawan (ceefour) wrote :
Revision history for this message
Hendy Irawan (ceefour) wrote :

Added screenshot of dmesg showing option.ko working with Haier CE100 CDMA USB modem.

Revision history for this message
Hendy Irawan (ceefour) wrote :

Added Patch for drivers/usb/serial/option.c to make it work with Haier CE100 CDMA USB modem.

Andy Whitcroft (apw)
tags: added: kernel-karmic
Changed in linux (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Hi Hendy,

Ideally the best way to get this patch merged into the Ubuntu kernel is to get this patch upstream first. Then when we rebase we'll automatically pull in the patch. Also, the entire kernel community will benefit from this patch being upstream. ttps://wiki.ubuntu.com/KernelTeam/KernelPatches has been written to document the suggested policy and procedures for helping get a patch merged upstream and subsequently into the Ubuntu kernel. Please take the time to review that wiki. Let us know if you have any questions or need any help via the Ubuntu Kernel Team mailing list. Thanks in advance.

Revision history for this message
Hendy Irawan (ceefour) wrote :

Thanks Leann.. I'll try to do that.

Revision history for this message
Donny Kurnia (donnykurnia) wrote :

Leann and Hendy,

Today I have send and email about this bug and the patch to the linux kernel upstream maintainers. Here is the reply that I got:

Subject: patch usb-option-support-hi-speed-for-modem-haier-ce100.patch added to gregkh-2.6 tree
To: <email address hidden>,<email address hidden>,<email address hidden>,<email address hidden>
From: <email address hidden>
Date: Wed, 23 Dec 2009 09:54:01 -0800

This is a note to let you know that I've just added the patch titled

    Subject: USB: option: support hi speed for modem Haier CE100

to my gregkh-2.6 tree. Its filename is

    usb-option-support-hi-speed-for-modem-haier-ce100.patch

This tree can be found at
    http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/

>From <email address hidden> Wed Dec 23 09:47:01 2009
From: Donny Kurnia <email address hidden>
Date: Wed, 23 Dec 2009 19:03:12 +0700
Subject: USB: option: support hi speed for modem Haier CE100
To: Matthias Urlichs <email address hidden>
Message-ID: <email address hidden>

I made this patch for usbserial driver to add the support for EVDO modem
Haier CE100. The bugs report for this is here:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/490068

This patch based on these post:
http://blankblondtank.wordpress.com/2009/09/04/mengoptimalkan-koneksi-modem-haier-ce-100-cdma-di-linux/
http://tantos.web.id/blogs/how-to-internet-connection-using-cdma-evdo-modem-and-karmic-koala-ubuntu-9-10

I hope this patch can help other that have the Haier C100 modem, mostly in my country, Indonesia.

Signed-off-by: Donny Kurnia <email address hidden>
Cc: stable <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

---
 drivers/usb/serial/option.c | 5 +++++
 1 file changed, 5 insertions(+)

--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -340,6 +340,10 @@ static int option_resume(struct usb_ser
 #define FOUR_G_SYSTEMS_VENDOR_ID 0x1c9e
 #define FOUR_G_SYSTEMS_PRODUCT_W14 0x9603

+/* Haier products */
+#define HAIER_VENDOR_ID 0x201e
+#define HAIER_PRODUCT_CE100 0x2009
+
 static struct usb_device_id option_ids[] = {
  { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
  { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) },
@@ -641,6 +645,7 @@ static struct usb_device_id option_ids[]
  { USB_DEVICE(AIRPLUS_VENDOR_ID, AIRPLUS_PRODUCT_MCD650) },
  { USB_DEVICE(TLAYTECH_VENDOR_ID, TLAYTECH_PRODUCT_TEU800) },
  { USB_DEVICE(FOUR_G_SYSTEMS_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W14) },
+ { USB_DEVICE(HAIER_VENDOR_ID, HAIER_PRODUCT_CE100) },
  { } /* Terminating entry */
 };
 MODULE_DEVICE_TABLE(usb, option_ids);

I hope the patch will integrated soon, and coming with next release of the kernel.

Thanks.

Revision history for this message
Josua Dietze (digidietze) wrote :

Nobody will have to patch their own kernel until the device is integrated !

There is the "new_id" feature which allows to add USB IDs dynamically to the serial USB drivers.
Just do (as root):

modprobe -v option
echo "201e 2009" > /sys/bus/usb-serial/drivers/option1/new_id

This should work for every wireless USB modem that is not immediately recognized by any of the existing drivers.

I will add the this modem to the list of devices that USB_ModeSwitch can handle so that people won't have to write their own udev rule.

Revision history for this message
Donny Kurnia (donnykurnia) wrote :

Josua,

I tried your method, but it make the modem unrecognized. Please note that this modem have same vendor id and product id for both USB mass storage and for Modem, thus make usb_modeswitch unuseable.

I must eject the USB storage, modprobe, then the modem recognized. Can you explain more about the new_id method above? Thanks.

Revision history for this message
Hendy Irawan (ceefour) wrote :

Before using either option or usbserial module with this modem, it should be ejected first (by right clicking the icon on desktop and click "Eject").

To eject automatically, put this udev rule:

SYSFS{idVendor}=="201e", SYSFS{idProduct}=="2009", RUN+="/usr/bin/eject %k"

Revision history for this message
Hendy Irawan (ceefour) wrote :

The previous udev rule should be integrated somewhere in Ubuntu (not sure where), or is there another technique such as described by Josua above in https://bugs.edge.launchpad.net/ubuntu/+source/linux/+bug/490068/comments/7 ?

Revision history for this message
Donny Kurnia (donnykurnia) wrote :

Josua & Hendy,

I try to use udev script that I found here:
http://blankblondtank.wordpress.com/2009/09/03/koneksi-internet-smart-dengan-haier-ce-100-cdma-di-linux/

SYSFS{idVendor}=="201e", SYSFS{idProduct}=="2009", RUN+="/usr/bin/eject %k"

But when I have this rules in the /etc/udev/rules.d/93-haier.rules files, when I connect the modem to USB port, I still got it detected as mass storage device. When I try to eject /dev/sr1, I got error that /dev/sr1 does not exist.

So I just remove the file /etc/udev/rules.d/93-haier.rules, then create a bash script that will do:
eject /dev/sr1
pause
modprobe
pause
wvdial

At least, this work well in my Karmic Koala. I compiled my own option.ko with the patch to recognize haier, but I still need modprobe after eject. Without modprobe, the device /dev/ttyUSB0 is not exist.

Revision history for this message
Hendy Irawan (ceefour) wrote :

Donny Kurnia,

I'm curious why it didn't work for you.

Try rebooting after putting the udev rule.

After the udev rule is installed, Ubuntu should eject the modem automatically, but you still need to do modprobe manually, with specific parameters:

sudo modprobe -v usbserial vendor=0x201e product=0x2009

After doing this, /dev/ttyUSB0 will appear and you can use wvdial/pon/gnome-ppp etc. to connect Internet with fair speed.

...

Now you can :

1. rebuild option.ko with the patch
2. copy it to your kernel's
3. sudo depmod -a
4. reboot

At this point, when you connect the modem, Ubuntu will automatically eject (due to udev rule) and option module is automatically installed (due to patch), and you can use wvdial/pon/gnome-ppp etc. to connect with much better speed.

Revision history for this message
Donny Kurnia (donnykurnia) wrote :

Hendy,

I retry adding udev rule, reboot, and now I have the modem device listed in lsusb. Thanks.

I have rebuild option.ko with patch, but still need to do modprobe once to get the /dev/ttyUSB0 device created. After that, even if I unplug the modem and replug it, I can connect using wvdial without doing modprobe again.

Is there is a way to get the /dev/ttyUSB0 created at boot? Can I put the modprobe inside udev rules?

Revision history for this message
Hendy Irawan (ceefour) wrote :

Sorry for making this become a support forum.

Donny, are you sure you're using option module with your modem?

Try:

lsmod | grep option

See if the option module is actually loaded, and you're not using usbserial instead.

Also syslog messages and dmesg might help.

In my system, I don't need to do modprobe. Maybe there's some other hardware issue in your computer conflicting with Haier CE100 "auto-detection".

Revision history for this message
Donny Kurnia (donnykurnia) wrote :

@Hendy,

It's turn out that recently I have upgrade my kernel to 2.6.31-17-generic. The patched option.ko that I compile myself is for 2.6.31-16-generic. Today I do this:
1. re-patch the option.ko for 2.6.31-17-generic and copy option.ko to /lib/modules/2.6.31-17-generic/kernel/drivers/usb/serial/
2. depmod -a
3. disconnect wvdial
4. rmmod usbserial
5. plug-out the modem from usb port, then plug-in
6. This is the dmesg result:

[15182.472075] usb 5-2: new full speed USB device using uhci_hcd and address 14
[15182.635297] usb 5-2: configuration #1 chosen from 1 choice
[15182.661313] usbcore: registered new interface driver usbserial
[15182.661329] USB Serial support registered for generic
[15182.661376] usbcore: registered new interface driver usbserial_generic
[15182.661378] usbserial: USB Serial Driver core
[15182.665677] USB Serial support registered for GSM modem (1-port)
[15182.665733] option 5-2:1.0: GSM modem (1-port) converter detected
[15182.665823] usb 5-2: GSM modem (1-port) converter now attached to ttyUSB0
[15182.665843] option 5-2:1.1: GSM modem (1-port) converter detected
[15182.665898] usb 5-2: GSM modem (1-port) converter now attached to ttyUSB1
[15182.665918] option 5-2:1.2: GSM modem (1-port) converter detected
[15182.665968] usb 5-2: GSM modem (1-port) converter now attached to ttyUSB2
[15182.665983] usbcore: registered new interface driver option
[15182.665986] option: v0.7.2:USB Driver for GSM modems

Thanks for all the help. I hope this will help others too, while the patch find it's way to the next kernel release.

This is the last email I got about the patch:

Date: Tue, 05 Jan 2010 12:02:13 -0800
From: Greg KH <email address hidden>
To: <email address hidden>,
 <email address hidden>,
 <email address hidden>,
 <email address hidden>,
 <email address hidden>
Cc: Donny Kurnia <email address hidden>
Subject: [17/39] USB: option: support hi speed for modem Haier CE100
In-Reply-To: <email address hidden>

2.6.31-stable review patch. If anyone has any objections, please let us know.

------------------

From: Donny Kurnia <email address hidden>
--my original email--

@Josua, where I can find more information about "new_id" feature? Anyone have the info about this feature? I have try searching in google, but still don't get how it work.

Thanks.

Surbhi Palande (csurbhi)
Changed in linux (Ubuntu):
milestone: none → karmic-updates
assignee: nobody → Surbhi Palande (csurbhi)
Surbhi Palande (csurbhi)
tags: added: 2.6.31.10
Surbhi Palande (csurbhi)
Changed in linux (Ubuntu Karmic):
assignee: nobody → Surbhi Palande (csurbhi)
importance: Undecided → Medium
status: New → In Progress
Surbhi Palande (csurbhi)
Changed in linux (Ubuntu Karmic):
status: In Progress → Fix Released
Changed in linux (Ubuntu):
status: Triaged → Fix Committed
status: Fix Committed → Fix Released
Revision history for this message
Stefan Bader (smb) wrote :

This is not yet released. Just committed to the repo.

description: updated
Changed in linux (Ubuntu Karmic):
status: Fix Released → Fix Committed
Revision history for this message
Hardik Dalwadi (hardik-dalwadi) wrote :

@ Stefan,

Is there any chance that this commit will show up in Lucid Lynx (Ubuntu 10.04)?

Revision history for this message
Surbhi Palande (csurbhi) wrote :

Hardik Dalwadi, this patch is already in Lucid Lynx (Ubuntu-2.6.32-11.15~256)

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted linux into karmic-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (5.1 KiB)

This bug was fixed in the package linux - 2.6.31-21.59

---------------
linux (2.6.31-21.59) karmic-proposed; urgency=low

  [ Andy Whitcroft ]

  * [Config] generic-pae switch to M586TSC
    - LP: #519448

  [ Chris Wilson ]

  * (pre-stable) drm/i915: Increase fb alignment to 64k
    - LP: #404064

  [ Colin Ian King ]

  * Input: i8042 - bypass AUX IRQ delivery test on laptops
    - LP: #534448

  [ Jerone Young ]

  * SAUCE: Fix volume hotkeys for Dell Studio 1557
    - LP: #465250

  [ Mirsal Ennaime ]

  * SAUCE: aufs: Fix header files inclusion in debug.h
    - LP: #517151

  [ Stefan Bader ]

  * [Config] Enable all CGROUP configuration options
    - LP: #480739

  [ Surbhi Palande ]

  * Revert "[Upstream] acerhdf: Limit modalias matching to supported
    boards"
    - LP: #509730
  * [Config] ext3 defaults to ordered mode
    - LP: #510067

  [ Tim Gardner ]

  * [Config] Fix sub-flavours package conflicts
    - LP: #454827

  [ Upstream Kernel Changes ]

  * PCI/cardbus: Add a fixup hook and fix powerpc
    - LP: #455723
  * fnctl: f_modown should call write_lock_irqsave/restore
    - LP: #519436
  * ACPI: enable C2 and Turbo-mode on Nehalem notebooks on A/C
    - LP: #516325
  * tg3: Add 57788, remove 57720
    - LP: #515390
  * HID: ignore all recent SoundGraph iMON devices
    - LP: #488443
  * Input: ALPS - add interleaved protocol support (Dell E6x00 series)
    - LP: #296610
  * acerhdf: limit modalias matching to supported
    - LP: #509730
  * ASoC: Do not write to invalid registers on the wm9712.
    - LP: #509730
  * cifs: NULL out tcon, pSesInfo, and srvTcp pointers when chasing DFS
    referrals
    - LP: #509730
  * clockevents: Prevent clockevent_devices list corruption on cpu hotplug
    - LP: #509730
  * dma: at_hdmac: correct incompatible type for argument 1 of
    'spin_lock_bh'
    - LP: #509730
  * drivers/net/usb: Correct code taking the size of a pointer
    - LP: #509730
  * Libertas: fix buffer overflow in lbs_get_essid()
    - LP: #509730
  * md: Fix unfortunate interaction with evms
    - LP: #509730
  * pata_cmd64x: fix overclocking of UDMA0-2 modes
    - LP: #509730
  * pata_hpt3x2n: fix clock turnaround
    - LP: #509730
  * SCSI: fc class: fix fc_transport_init error handling
    - LP: #509730
  * sound: sgio2audio/pdaudiocf/usb-audio: initialize PCM buffer
    - LP: #509730
  * USB: emi62: fix crash when trying to load EMI 6|2 firmware
    - LP: #509730
  * USB: Fix a bug on appledisplay.c regarding signedness
    - LP: #509730
  * USB: musb: gadget_ep0: avoid SetupEnd interrupt
    - LP: #509730
  * USB: option: support hi speed for modem Haier CE100
    - LP: #490068, #509730
  * x86, cpuid: Add "volatile" to asm in native_cpuid()
    - LP: #509730
  * e100: Use pci pool to work around GFP_ATOMIC order 5 memory allocation
    failure
    - LP: #509730
  * e100: Fix broken cbs accounting due to missing memset.
    - LP: #509730
  * hostap: Revert a toxic part of the conversion to net_device_ops
    - LP: #509730
  * hwmon: (fschmd) Fix check on unsigned in watchdog_write()
    - LP: #509730
  * hwmon: (sht15) Off-by-one error in array index + incorrect constants
    - LP: #509730
  * i2c/tsl2550: Fix...

Read more...

Changed in linux (Ubuntu Karmic):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.