----- Original Message ----- the modem you have (vendor id 0x1003) should be an E220 HSDPA modem. exactly the same device i tried to "run" last week on freebsd, where i got the same trouble as you. the problem is, that the device when plugged in, initially reports itself as a mass-storage device which will cause a cd-rom to be found. as far as i could figure out in tests (and some others pointed me in the right direction of course), the device needs some proper "message" to be transferred to switch from mass-storage mode into the modem mode. currently, there is a thread on the freebsd lists with the subject "huawei e220 hsdpa on freebsd 6.3-BETA2" regarding this. have a look on it, it'll help you out maybe... i'm currently testing the c-code which is provided there (i'm not a guru) but the first one does not look that bad (there are some errors and problems which i do not really have the time right now to look into). sorry, can't tell anything better right now on this, cheers ;)
the following diff to umsm(4) sends the proper message to the device
to cause the ucom port to appear.
I still have the problem, that sometimes talking to the ucom will
cause the device to reset itself, I have not figured out what is
causing that.
felix
Index: sys/dev/usb/umsm.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/umsm.c,v
retrieving revision 1.16
diff -u -r1.16 umsm.c
--- sys/dev/usb/umsm.c 19 Jun 2007 23:59:27 -0000 1.16
+++ sys/dev/usb/umsm.c 8 Sep 2007 19:50:44 -0000
@@ -58,6 +58,7 @@
{ USB_VENDOR_AIRPRIME, USB_PRODUCT_AIRPRIME_PC5220 },
{ USB_VENDOR_DELL, USB_PRODUCT_DELL_W5500 },
{ USB_VENDOR_KYOCERA2, USB_PRODUCT_KYOCERA2_KPC650 },
+ { USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E220 },
{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_EXPRESSCARD },
{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_MERLINV620 },
{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_S720 },
@@ -123,6 +124,25 @@
devinfop = usbd_devinfo_alloc(uaa->device, 0);
printf("\n%s: %s\n", sc->sc_dev.dv_xname, devinfop);
usbd_devinfo_free(devinfop);
+
+ if(uaa->product == USB_PRODUCT_HUAWEI_E220) {
+ usb_device_request_t req;
+ usbd_status err;
+
+ req.bmRequestType = UT_WRITE_DEVICE;
+ req.bRequest = UR_SET_FEATURE;
+ USETW(req.wValue, 1);
+ USETW(req.wIndex, 0);
+ USETW(req.wLength, 0);
+ err = usbd_do_request(sc->sc_udev, &req, 0);
+
+ if (err) {
+ printf("%s: failed to initialize device ",
+ sc->sc_dev.dv_xname);
+ sc->sc_dying = 1;
+ return;
+ }
+ }
if (usbd_set_config_index(sc->sc_udev, UMSM_CONFIG_NO, 1) != 0) {
printf("%s: could not set configuration no\n",
Index: share/man/man4/umsm.4
===================================================================
RCS file: /cvs/src/share/man/man4/umsm.4,v
retrieving revision 1.21
diff -u -r1.21 umsm.4
--- share/man/man4/umsm.4 21 Jun 2007 00:26:47 -0000 1.21
+++ share/man/man4/umsm.4 8 Sep 2007 19:50:44 -0000
@@ -38,6 +38,7 @@
...attached diff sends the proper message to the device to cause the
ucom port to appear. I still have the problem, that sometimes talking
to the ucom will cause the device to reset itself, I have not figured
out what is causing that.
felix
Index: sys/dev/usb/umsm.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/umsm.c,v
retrieving revision 1.16
diff -u -r1.16 umsm.c
--- sys/dev/usb/umsm.c 19 Jun 2007 23:59:27 -0000 1.16
+++ sys/dev/usb/umsm.c 8 Sep 2007 19:50:44 -0000
@@ -58,6 +58,7 @@
{ USB_VENDOR_AIRPRIME, USB_PRODUCT_AIRPRIME_PC5220 },
{ USB_VENDOR_DELL, USB_PRODUCT_DELL_W5500 },
{ USB_VENDOR_KYOCERA2, USB_PRODUCT_KYOCERA2_KPC650 },
+ { USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E220 },
{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_EXPRESSCARD },
{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_MERLINV620 },
{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_S720 },
@@ -123,6 +124,25 @@
devinfop = usbd_devinfo_alloc(uaa->device, 0);
printf("\n%s: %s\n", sc->sc_dev.dv_xname, devinfop);
usbd_devinfo_free(devinfop);
+
+ if(uaa->product == USB_PRODUCT_HUAWEI_E220) {
+ usb_device_request_t req;
+ usbd_status err;
+
+ req.bmRequestType = UT_WRITE_DEVICE;
+ req.bRequest = UR_SET_FEATURE;
+ USETW(req.wValue, 1);
+ USETW(req.wIndex, 0);
+ USETW(req.wLength, 0);
+ err = usbd_do_request(sc->sc_udev, &req, 0);
+
+ if (err) {
+ printf("%s: failed to initialize device ",
+ sc->sc_dev.dv_xname);
+ sc->sc_dying = 1;
+ return;
+ }
+ }
if (usbd_set_config_index(sc->sc_udev, UMSM_CONFIG_NO, 1) != 0) {
printf("%s: could not set configuration no\n",
Index: share/man/man4/umsm.4
===================================================================
RCS file: /cvs/src/share/man/man4/umsm.4,v
retrieving revision 1.21
diff -u -r1.21 umsm.4
--- share/man/man4/umsm.4 21 Jun 2007 00:26:47 -0000 1.21
+++ share/man/man4/umsm.4 8 Sep 2007 19:50:44 -0000
@@ -38,6 +38,7 @@
.Bl -column "Device ...I'll test it as soon as I get a chance, currently my laptop gets a page
fault and enters ddb during boot :-/
Also, I could not apply your diff on -current. Below is an updated diff.
BR,
Markus
--- sys/dev/usb/umsm.c.orig Wed Dec 12 22:21:44 2007
+++ sys/dev/usb/umsm.c Wed Dec 12 22:14:21 2007
@@ -58,6 +58,7 @@
{ USB_VENDOR_AIRPRIME, USB_PRODUCT_AIRPRIME_PC5220 },
{ USB_VENDOR_DELL, USB_PRODUCT_DELL_W5500 },
{ USB_VENDOR_KYOCERA2, USB_PRODUCT_KYOCERA2_KPC650 },
+ { USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E220 },
{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_EXPRESSCARD },
{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_MERLINV620 },
{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_S720 },
@@ -119,6 +120,25 @@
bzero(&uca, sizeof(uca));
sc->sc_udev = uaa->device;
+
+ if(uaa->product == USB_PRODUCT_HUAWEI_E220) {
+ usb_device_request_t req;
+ usbd_status err;
+
+ req.bmRequestType = UT_WRITE_DEVICE;
+ req.bRequest = UR_SET_FEATURE;
+ USETW(req.wValue, 1);
+ USETW(req.wIndex, 0);
+ USETW(req.wLength, 0);
+ err = usbd_do_request(sc->sc_udev, &req, 0);
+
+ if (err) {
+ printf("%s: failed to initialize device ",
+ sc->sc_dev.dv_xname);
+ sc->sc_dying = 1;
+ return;
+ }
+ }
if (usbd_set_config_index(sc->sc_udev, UMSM_CONFIG_NO, 1) != 0) {
printf("%s: could not set configuration no\n",
--- share/man/man4/umsm.4.orig Wed Dec 12 22:22:33 2007
+++ share/man/man4/umsm.4 Wed Dec 12 22:15:01 2007
@@ -38,6 +38,7 @@
.Bl -column "Device " "Bus" -compact -offset 6n
.It Em "Device Bus"
.It Li "AirPrime PC5220" Ta Ta CardBus
+.It Li "Huawei Mobile E220" Ta Ta USB...-current is booting on my laptop again, and after applying the diff the Huawei E220 is now recognized as umsm0 at uhub2 port 1 "HUAWEI Technologies HUAWEI Mobile" rev 1.10/0.00 addr 2 ucom0 at umsm0 portno 0 Anyone who has a ppp.conf that might work with swedish "3" operator (Hi3G Access AB) so I can test the modem? I have no real personal interest in this modem right now, hence won't take the time to figure it out. /Markus
Hi all, I do have a personal interest in getting such a modem working with OpenBSD - I have a laptop that is running win just for the sake of that modem, grrrr... Thanx for all yer work so far //Johan
included chat script and pppd option file works for me in Germany with Vodafone and the Huawei E220 (as well as other Huawei and Sierra Wireless Devices). ====== /dev/ttyU0 noipdefault defaultroute deflate 0 bsdcomp 0 noccp noaccomp novj novjccomp lock noauth #nomagic debug #persist user foo remotename foo connect '/usr/sbin/chat -f /etc/ppp/peers/umts.chat.huawei.vodafone' ====== ====== Chat Script ========== ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT "NO DIALTONE" '' AT OK AT+CGDCONT=1,"IP","web.vodafone.de" OK ATD*99***1# ============================= felix -- GPG/PGP: D9AC74D0 / 076E 1E87 3E05 1C7F B1A0 8A48 0D31 9BD3 D9AC 74D0 http://hazardous.org/~fkr - fkr@hazardous.org - fkr@silc|irc - FKR-RIPE https://www.bytemine.net/ - bytemine - BSD based Hosting/Solutions/Ideas
Otherwise this is almost exactly the same as the scripts I use with an EDGE phone with Finnish operators, it's worked well for me. -- Jussi Peltola
| Matthew Wilcox | [PATCH] Fix boot-time hang on G31/G33 PC |
| Vu Pham | Re: [Scst-devel] Integration of SCST in the mainstream Linux kernel |
| Greg Kroah-Hartman | [PATCH 004/196] Chinese: add translation of SubmittingPatches |
| Rafael J. Wysocki | [Bug #11799] xorg can not start up with stolen memory |
git: | |
| Li Frank-B20596 | why not TortoiseGit |
| Jon Smirl | ! [rejected] master -> master (non-fast forward) |
| Junio C Hamano | Re: If you would write git from scratch now, what would you change? |
| Wincent Colaiuta | Possible to make a totally empty repository for remote access? |
| Richard Stallman | Real men don't attack straw men |
| Chris | Prolific USB-Serial Controller |
| Douglas A. Tutty | OBSD's perspective on SELinux |
| Nick Guenther | Re: how to clear dmesg outpout |
| Volker Armin Hemmann | build error with 2.6.27.6+reiser4+ehci-hub patch. ERROR: "mii_ethtool_gset" [drive... |
| Wenji Wu | A Linux TCP SACK Question |
| Evgeniy Polyakov | [resend take 2 0/4] Distributed storage. |
| YOSHIFUJI Hideaki / | [GIT PULL] [IPV6] COMPAT: Fix SSM applications on 64bit kernels. |
