help setting u3g speed and help with new device

Hans Petter Selasky hselasky at c2i.net
Sat Oct 3 07:28:21 UTC 2009


On Friday 02 October 2009 16:28:09 Mike Tancsa wrote:
> I am having problems getting the later Option GTM378, 380 and 382 3g
> modems to work properly with the u3g driver on FreeBSD.  Older
> generation 378s work just fine, but I can crazy slow speeds when
> using the newer ones. (21kbps vs about 1.5Mb based on the signal here
> at the office)
>
> On an older generation 378, all I did was add the device ID and all
> works just fine
> Not sure if it makes a difference, but the connect speed on the
> "working" 378 shows
> Jan  1 08:38:33 alix ppp[1758]: tun10: Chat: Received: CONNECT 3600000
> vs
> Oct  2 10:11:37 378n ppp[1085]: tun10: Chat: Received: CONNECT 7200000
>
> How do I find out what the "right" speed is and set it for the device ?
>
> Despite the higher connect speed, I get a transfer rate of about
> 21Kbps.  On the older gen modem, I get 1,376Kbps
>
> also, on the newer 378s I need to do a mode switch for it to
> work.  On RELENG_7, I made the following changes based on what was in
> usb_modeswitch
>
> MessageContent="55534243123456780000000000000601000000000000000000000000000
>000"
>
>
>
> --- usbdevs     2009-07-10 02:55:30.000000000 -0400
> +++ /tmp/usbdevs        2009-10-02 10:19:16.000000000 -0400
> @@ -1917,6 +1917,10 @@
>   product OPTION GTICON322       0xd033  GlobeTrotter Icon322 storage
>   product OPTION GTMAX36         0x6701  GlobeTrotter Max 3.6 Modem
>   product OPTION GTMAXHSUPA      0x7001  GlobeTrotter HSUPA
> +product OPTION GTMAXHSUPAE     0x6901 GlobeTrotter HSUPA PCIe
>
>   /* OQO */
>   product OQO WIFI01             0x0002  model 01 WiFi interface
> @@ -2039,6 +2043,7 @@
>   product QUALCOMM CDMA_MSM      0x6000  CDMA Technologies MSM phone
>   product QUALCOMM2 RWT_FCT      0x3100  RWT FCT-CDMA 2000 1xRTT modem
>   product QUALCOMM2 CDMA_MSM     0x3196  CDMA Technologies MSM modem
> +product QUALCOMM2 GTM3782005   0x1000  CDMA Technologies MSM modem
>   product QUALCOMMINC CDMA_MSM   0x0001  CDMA Technologies MSM modem
>   product QUALCOMMINC ZTE_MSM    0x0031  CDMA Technologies MSM modem
>   product QUALCOMMINC ZTE_STOR   0x2000  USB ZTE Storage
>
>
> --- u3g.c       2009-08-13 03:19:43.000000000 -0400
> +++ /tmp/u3g.c  2009-10-02 10:20:07.000000000 -0400
> @@ -52,7 +52,7 @@
>   #endif
>   #include "usbdevs.h"
>
> -static int u3gdebug = 0;
> +static int u3gdebug = 1;
>   SYSCTL_NODE(_hw_usb, OID_AUTO, u3g, CTLFLAG_RW, 0, "USB u3g");
>   SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug, CTLFLAG_RW,
>             &u3gdebug, 0, "u3g debug level");
> @@ -123,6 +123,7 @@
>   #define U3GINIT_ZTESTOR                4               // Requires
> SCSI command (ZTE STOR)
>   #define U3GINIT_CMOTECH                5               // Requires
> init command (CMOTECH)
>   #define U3GINIT_WAIT           6               // Device reappears
> after a short delay (none)
> +#define U3GINIT_GTM3782005     7               // Option GlobeSurfer Icon
> 7.2 };
>
>   // Note: The entries marked with XXX should be checked for the correct
> speed @@ -134,9 +135,13 @@
>          {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GT3GPLUS
> },            U3GSP_UMTS,     U3GINIT_NONE },
>          {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTMAX36
> },             U3GSP_HSDPA,    U3GINIT_NONE },
>          {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTMAXHSUPA
> },          U3GSP_HSDPA,    U3GINIT_NONE },
> +               {{ USB_VENDOR_OPTION,
> USB_PRODUCT_OPTION_GTMAXHSUPAE  },                U3GSP_HSDPA,
> U3GINIT_NONE },
> +        {{ USB_VENDOR_OPTION,
> USB_PRODUCT_OPTION_GTMAX380HSUPAE  },             U3GSP_HSPA,
> U3GINIT_NONE },
> +        {{ USB_VENDOR_OPTION,
> USB_PRODUCT_OPTION_GTMAX382HSUPAE  },             U3GSP_HSPA,
> U3GINIT_EJECT },
>          {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_VODAFONEMC3G
> },        U3GSP_UMTS,     U3GINIT_NONE },
>          /* OEM: Qualcomm, Inc. */
>          {{ USB_VENDOR_QUALCOMMINC, USB_PRODUCT_QUALCOMMINC_ZTE_STOR
> },  U3GSP_CDMA,     U3GINIT_ZTESTOR },
> +       {{ USB_VENDOR_QUALCOMM2, USB_PRODUCT_QUALCOMM2_GTM3782005
> },    U3GSP_HSPA,     U3GINIT_GTM3782005 },
>          {{ USB_VENDOR_QUALCOMMINC, USB_PRODUCT_QUALCOMMINC_CDMA_MSM
> },  U3GSP_CDMA,     U3GINIT_EJECT },
>          {{ USB_VENDOR_QUALCOMMINC, USB_PRODUCT_QUALCOMMINC_ZTE_MSM
> },   U3GSP_CDMA,     U3GINIT_NONE },
>          /* OEM: Huawei */
> @@ -144,6 +149,7 @@
>          {{ USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E220
> },                U3GSP_HSPA,     U3GINIT_HUAWEI },
>          /* OEM: Novatel */
>          {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_CDMA_MODEM
> },        U3GSP_CDMA,     U3GINIT_EJECT },
> +        {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U760
> },              U3GSP_CDMA,     U3GINIT_EJECT },
>          {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_ES620
> },             U3GSP_UMTS,     U3GINIT_EJECT },        // XXX
>          {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_MC950D
> },            U3GSP_HSUPA,    U3GINIT_EJECT },
>          {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U720
> },              U3GSP_UMTS,     U3GINIT_EJECT },        // XXX
> @@ -513,6 +519,25 @@
>       0x00, 0x00
>   };
>
> +static unsigned char gtm3782005stor_cmd[31] = {
> +    0x55, 0x53, 0x42, 0x43,     /* 0..3: Command Block Wrapper (CBW)
> signature */
> +    0x12, 0x34, 0x56, 0x78,     /* 4..7: CBW Tag, unique 32-bit number */
> +    0x00, 0x00, 0x00, 0x00,     /* 8..11: CBW Transfer Length, no
> data here */
> +    0x00,                       /* 12: CBW Flag: input */
> +    0x00,                       /* 13: CBW Lun */
> +    0x06,                       /* 14: CBW Length */
> +
> +    0x01,                       /* 15+0: opcode */
> +    0x00,                       /* 15+1: byte2 */
> +    0x00, 0x00,                 /* 15+2..3 */
> +    0x00,                       /* 15+4: */
> +    0x00,                       /* 15+5: */
> +    0x00, 0x00, 0x00, 0x00,     /* 15+6..15: */
> +    0x00, 0x00, 0x00, 0x00,
> +    0x00, 0x00
> +};
> +
> +
>   static unsigned char cmotech_cmd[31] = {
>       0x55, 0x53, 0x42, 0x43,    /* 0..3: Command Block Wrapper (CBW)
> signature */
>       0x01, 0x00, 0x00, 0x00,    /* 4..7: CBW Tag, unique 32-bit number */
> @@ -683,6 +708,12 @@
>                                        "changing ZTE STOR modem to
> modem mode\n");
>                  u3gstub_BBB_cmd(sc, ztestor_cmd);
>                  break;
> +       case U3GINIT_GTM3782005:
> +               if (bootverbose || u3gdebug)
> +                       device_printf(sc->sc_dev,
> +                                     "changing  GTM378 STOR modem to
> modem mode\n");
> +               u3gstub_BBB_cmd(sc, gtm3782005stor_cmd);
> +               break;
>          case U3GINIT_CMOTECH:
>                  if (bootverbose || u3gdebug)
>                          device_printf(sc->sc_dev,
>

Have you checked the 3GPP specification for AT commands which report which 
carrier you are connected at?

Possibly your modem is using GPRS because it doesn't find any HSDPA or 
whatsoever faster carrier.

Also check for any stall printouts (not likely) when setting u3g debugging.

--HPS


More information about the freebsd-usb mailing list