<![CDATA[Latest posts for the topic "D-Com 3G E173Eu-1 trên Gentoo"]]> /hvaonline/posts/list/24.html JForum - http://www.jforum.net D-Com 3G E173Eu-1 trên Gentoo Code:
Local path is: /usr/local/Mobile_Partner

Installing D-com 3G...TEMP_FILE IS /tmp/temp_desktop_cache_8042
akonadi-quanta.zN68aF  D-com_3G_install_8042  kde-kdm	  ksocket-kdm	  orbit-quanta
D-com_3G_9454	       excelsior-jet-root     kde-quanta  ksocket-quanta
                                                                                              [ done ] 

Installing Driver...

/usr/local/Mobile_Partner/driver/ndis_driver
Usage: modinfo [-0][-F field][-k kernelversion][-b basedir]  module...
 Prints out the information about one or more module(s).
 If a fieldname is given, just print out that field (or nothing if not found).
 Otherwise, print all information out in a readable form
 If -0 is given, separate with nul, not newline.
 If -b is given, use an image of the module tree.
ERROR: Removing 'cdc_ether': No such file or directory
ERROR: Removing 'usbnet': No such file or directory
ERROR: Removing 'mbb_cdc_driver': No such file or directory
make -C src/ clean
make[1]: Entering directory `/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src'
rm -rf *.o *.ko *~ core* .dep* .*.d .*.cmd *.mod.c *.a *.s .*.flags .tmp_versions Module.symvers Modules.symvers *.order
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/add_header.sh  "clean" "/lib/modules/2.6.31-gentoo-r10/build/include/linux/usb"
rmmod -f mbb_cdc_driver
ERROR: Removing 'mbb_cdc_driver': No such file or directory
make[1]: *** [clean] Error 1
make[1]: Leaving directory `/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src'
make: *** [clean] Error 2
make -C src/ modules
make[1]: Entering directory `/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src'
#/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/add_header.sh  "modules" "/lib/modules/2.6.31-gentoo-r10/build/include/linux/usb"
make -C /lib/modules/2.6.31-gentoo-r10/build SUBDIRS=/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src modules
make[2]: Entering directory `/usr/src/linux-2.6.31-gentoo-r10'
  CC [M]  /usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/mbb_cdc_driver.o
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/mbb_cdc_driver.c: In function ‘rx_tlp_parse’:
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/mbb_cdc_driver.c:602:7: warning: ISO C90 forbids mixed declarations and code
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: "mii_ethtool_gset" [/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/mbb_cdc_driver.ko] undefined!
WARNING: "mii_ethtool_sset" [/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/mbb_cdc_driver.ko] undefined!
WARNING: "mii_link_ok" [/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/mbb_cdc_driver.ko] undefined!
WARNING: "mii_nway_restart" [/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/mbb_cdc_driver.ko] undefined!
  CC      /usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/mbb_cdc_driver.mod.o
  LD [M]  /usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/mbb_cdc_driver.ko
make[2]: Leaving directory `/usr/src/linux-2.6.31-gentoo-r10'
strip --strip-debug mbb_cdc_driver.ko
make[1]: Leaving directory `/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src'
make -C src/ install
make[1]: Entering directory `/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src'
#install -m 744 -c mbb_cdc_driver.ko /lib/modules/2.6.31-gentoo-r10/kernel/drivers/usb/net
#depmod -a
#modprobe mbb_cdc_driver
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/add_header.sh  "install"
chmod: cannot access `/lib/modules/2.6.31-gentoo-r10/kernel/drivers/net/usb/mbb_cdc_driver.ko': Not a directory
modprobe mbb_cdc_driver
WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/.
FATAL: Module mbb_cdc_driver not found.
make[1]: *** [install] Error 1
make[1]: Leaving directory `/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src'
make: *** [install] Error 2

Install NDIS driver failed.
The compiling environment is not all ready.
Please check gcc, make and kernel buid(/lib/modules/2.6.31-gentoo-r10/build) to be all installed?
Now please enter any key to finish other installations.

NDIS is disabled, and only Modem can be used.

AUTORUNPATH=/home/test/.kde4/Autostart
AUTORUNPATH=/home/quanta/.kde4/share/autostart
AUTORUNPATH=/home/quanta/.kde4/Autostart
AUTORUNPATH=/home/quanta/.config/autostart

Finished, press any key to exit
]]>
/hvaonline/posts/list/39002.html#238687 /hvaonline/posts/list/39002.html#238687 GMT
D-Com 3G E173Eu-1 trên Gentoo

quanta wrote:
Code:
...
ERROR: Removing 'cdc_ether': No such file or directory
ERROR: Removing 'usbnet': No such file or directory
ERROR: Removing 'mbb_cdc_driver': No such file or directory
 
Chắc mấy cái kernel modules này của mình làm gì đã có mà remove: Code:
# cd /usr/src/linux
# ./scripts/extract-ikconfig arch/i386/boot/bzImage > /tmp/2.6.31-gentoo-r10.config

decompression OK, trailing garbage ignored
# egrep -i 'usbnet|cdc' /tmp/2.6.31-gentoo-r10.config 
# CONFIG_USB_USBNET is not set
# CONFIG_USB_NET_CDCETHER is not set
# CONFIG_USB_NET_CDC_EEM is not set
# CONFIG_USB_NET_CDC_SUBSET is not set
OK, tiến hành compile luôn: `make menuconfig` và chọn như sau: Code:
Device Drivers  --->
    [*] Network device support  --->
        USB Network Adapters  --->
            <M> Multi-purpose USB Networking Framework                     
            < >   ASIX AX88xxx Based USB 2.0 Ethernet Adapters             
            <M>   CDC Ethernet support (smart devices such as cable modems)
rồi `make`, `make modules_install`, `make install`. Reboot, load module và thử lại: Code:
gentoo ~ # modprobe cdc_ether
gentoo ~ # lsmod | grep cdc
cdc_ether               4048  0 
usbnet                 13576  1 cdc_ether
Code:
Installed version: 16.001.09.16.439
Installing version: 16.001.09.16.439

The software is exist. Do you want overwrite it? ([Y]/N):Y

Local path is: /usr/local/Mobile_Partner

Installing D-com 3G...TEMP_FILE IS /tmp/temp_desktop_cache_3153
akonadi-quanta.hFVIH6  D-com_3G_5455  D-com_3G_install_3153  kde-kdm  kde-quanta  ksocket-kdm  ksocket-quanta  orbit-quanta
                                                                                              [ done ] 

Installing Driver...

/usr/local/Mobile_Partner/driver/ndis_driver
Usage: modinfo [-0][-F field][-k kernelversion][-b basedir]  module...
 Prints out the information about one or more module(s).
 If a fieldname is given, just print out that field (or nothing if not found).
 Otherwise, print all information out in a readable form
 If -0 is given, separate with nul, not newline.
 If -b is given, use an image of the module tree.
ERROR: Removing 'mbb_cdc_driver': No such file or directory
make -C src/ clean
make[1]: Entering directory `/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src'
rm -rf *.o *.ko *~ core* .dep* .*.d .*.cmd *.mod.c *.a *.s .*.flags .tmp_versions Module.symvers Modules.symvers *.order
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/add_header.sh  "clean" "/lib/modules/2.6.31-gentoo-r10/build/include/linux/usb"
rmmod -f mbb_cdc_driver
ERROR: Removing 'mbb_cdc_driver': No such file or directory
make[1]: *** [clean] Error 1
make[1]: Leaving directory `/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src'
make: *** [clean] Error 2
make -C src/ modules
make[1]: Entering directory `/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src'
#/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/add_header.sh  "modules" "/lib/modules/2.6.31-gentoo-r10/build/include/linux/usb"
make -C /lib/modules/2.6.31-gentoo-r10/build SUBDIRS=/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src modules
make[2]: Entering directory `/usr/src/linux-2.6.31-gentoo-r10'
  CC [M]  /usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/mbb_cdc_driver.o
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/mbb_cdc_driver.c: In function ‘rx_tlp_parse’:
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/mbb_cdc_driver.c:602:7: warning: ISO C90 forbids mixed declarations and code
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/mbb_cdc_driver.mod.o
  LD [M]  /usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/mbb_cdc_driver.ko
make[2]: Leaving directory `/usr/src/linux-2.6.31-gentoo-r10'
strip --strip-debug mbb_cdc_driver.ko
make[1]: Leaving directory `/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src'
make -C src/ install
make[1]: Entering directory `/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src'
#install -m 744 -c mbb_cdc_driver.ko /lib/modules/2.6.31-gentoo-r10/kernel/drivers/usb/net
#depmod -a
#modprobe mbb_cdc_driver
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/add_header.sh  "install"
modprobe mbb_cdc_driver
WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/.
make[1]: Leaving directory `/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src'

The Linux NDIS driver is installed successfully.
AUTORUNPATH=/home/test/.kde4/Autostart
AUTORUNPATH=/home/quanta/.kde4/share/autostart
AUTORUNPATH=/home/quanta/.kde4/Autostart
AUTORUNPATH=/home/quanta/.config/autostart

Finished, press any key to exit
Chạy thử thì nút "Kết nối" lại bị disabled:
]]>
/hvaonline/posts/list/39002.html#238703 /hvaonline/posts/list/39002.html#238703 GMT
D-Com 3G E173Eu-1 trên Gentoo Code:
Device Drivers  --->
    [*] Network device support  --->
        <*>   PPP (point-to-point protocol) support [code]
            [ ]     PPP multilink support (EXPERIMENTAL)
            [ ]     PPP filtering                       
            <*>     PPP support for async serial ports  
            <*>     PPP support for sync tty ports      
            <*>     PPP Deflate compression             
            <*>     PPP BSD-Compress compression        
    [*] USB support  --->
        <M>   USB Modem (CDC ACM) support
        <M>   USB Serial Converter support  --->
            [*]   USB Generic Serial Driver
            <M>   USB driver for GSM and CDMA modems
Compile, reboot, load module: Code:
# lsmod | grep usb
usbnet                 13576  1 cdc_ether
mii                     4012  1 usbnet
usbserial              28468  3 option
và thử lại:

Đợi vài phút và nó cứ "Đang kết nối" mãi. Thử chuyển sang loại mạng khác cũng không ăn thua:
]]>
/hvaonline/posts/list/39002.html#238768 /hvaonline/posts/list/39002.html#238768 GMT
D-Com 3G E173Eu-1 trên Gentoo /hvaonline/posts/list/39002.html#238984 /hvaonline/posts/list/39002.html#238984 GMT D-Com 3G E173Eu-1 trên Gentoo

hotdog019 wrote:
Bác cài trên máy ảo pk bác? 
Không, máy "thật" bạn à.]]>
/hvaonline/posts/list/39002.html#238986 /hvaonline/posts/list/39002.html#238986 GMT
D-Com 3G E173Eu-1 trên Gentoo /hvaonline/posts/list/39002.html#238994 /hvaonline/posts/list/39002.html#238994 GMT D-Com 3G E173Eu-1 trên Gentoo Code:
# lsusb | grep -i huawei
Bus 001 Device 010: ID 12d1:14b5 Huawei Technologies Co., Ltd.
hoặc kỹ hơn với `lsusb -v`: Code:
Bus 001 Device 011: ID 12d1:14b5 Huawei Technologies Co., Ltd. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x12d1 Huawei Technologies Co., Ltd.
  idProduct          0x14b5 
  bcdDevice            0.00
  iManufacturer           3 Technology
  iProduct                2 Mobile Connect
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           55
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          1 Configuration
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Các bạn để ý chỉ có 2 interfaces 0, 1 và InterfaceClass là "Mass Storage". Sau khi cài driver: Code:
# lsusb
Bus 001 Device 012: ID 12d1:14a8 Huawei Technologies Co., Ltd.
Product ID đã khác: 14a8 thay vì 14b5. Code:
# lsusb -v
Bus 001 Device 012: ID 12d1:14a8 Huawei Technologies Co., Ltd. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x12d1 Huawei Technologies Co., Ltd.
  idProduct          0x14a8 
  bcdDevice            0.00
  iManufacturer           3 Technology
  iProduct                2 Mobile Connect
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          131
    bNumInterfaces          5
    bConfigurationValue     1
    iConfiguration          1 Configuration
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               5
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        4
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x05  EP 5 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x86  EP 6 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
3 InterfaceNumber 0, 1, 2 đã là: "Vendor Specific Class". Vậy là USB 3G đã hoạt động như một modem. Confirm với dmesg (hoặc cấu hình /var/log/kern.log để có timestamp dễ đọc): Code:
2011-06-04T19:08:14.244110+07:00 gentoo kernel: [ 6730.652803] usbcore: registered new interface driver mbb_ether
2011-06-04T19:08:53.284509+07:00 gentoo kernel: [ 6769.682467] usb 1-1: USB disconnect, address 11
2011-06-04T19:08:57.722958+07:00 gentoo kernel: [ 6774.131643] usb 1-1: new high speed USB device using ehci_hcd and address 12
2011-06-04T19:08:57.838938+07:00 gentoo kernel: [ 6774.247929] usb 1-1: New USB device found, idVendor=12d1, idProduct=14a8
2011-06-04T19:08:57.838970+07:00 gentoo kernel: [ 6774.247934] usb 1-1: New USB device strings: Mfr=3, Product=2, SerialNumber=0
2011-06-04T19:08:57.838977+07:00 gentoo kernel: [ 6774.247938] usb 1-1: Product: Mobile Connect
2011-06-04T19:08:57.838984+07:00 gentoo kernel: [ 6774.247941] usb 1-1: Manufacturer: Technology
2011-06-04T19:08:57.838990+07:00 gentoo kernel: [ 6774.248054] usb 1-1: configuration #1 chosen from 1 choice
2011-06-04T19:08:57.867916+07:00 gentoo kernel: [ 6774.276757] scsi20 : SCSI emulation for USB Mass Storage devices
2011-06-04T19:08:57.903927+07:00 gentoo kernel: [ 6774.312740] usb-storage: device found at 12
2011-06-04T19:08:57.903961+07:00 gentoo kernel: [ 6774.312743] usb-storage: waiting for device to settle before scanning
2011-06-04T19:08:57.903968+07:00 gentoo kernel: [ 6774.312860] scsi21 : SCSI emulation for USB Mass Storage devices
2011-06-04T19:08:57.903974+07:00 gentoo kernel: [ 6774.313046] usb-storage: device found at 12
2011-06-04T19:08:57.903980+07:00 gentoo kernel: [ 6774.313049] usb-storage: waiting for device to settle before scanning
2011-06-04T19:08:59.397489+07:00 gentoo kernel: [ 6775.806545] option 1-1:1.0: GSM modem (1-port) converter detected
2011-06-04T19:08:59.398484+07:00 gentoo kernel: [ 6775.807415] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
2011-06-04T19:08:59.398499+07:00 gentoo kernel: [ 6775.807448] option 1-1:1.1: GSM modem (1-port) converter detected
2011-06-04T19:08:59.400227+07:00 gentoo kernel: [ 6775.808307] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
2011-06-04T19:08:59.400250+07:00 gentoo kernel: [ 6775.808339] option 1-1:1.2: GSM modem (1-port) converter detected
2011-06-04T19:08:59.401482+07:00 gentoo kernel: [ 6775.810177] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
Check thử `ls /dev/ttyUSB*`: Code:
# ls /dev/ttyUSB*
/dev/ttyUSB_utps_diag  /dev/ttyUSB_utps_modem  /dev/ttyUSB_utps_pcui
Không phải là ttyUSB0, 1, 2 như thường thấy. Lý do là khi cài, udev rules đã rename thành như vậy, các bạn có thể mở `/etc/udev/rules.d/10-Huawei-Datacard.rules` ra để xem. Nếu phần mềm đi kèm không có driver cho Linux thì các bạn có thể dùng usb_modeswitch để chuyển thành modem.]]>
/hvaonline/posts/list/39002.html#239035 /hvaonline/posts/list/39002.html#239035 GMT
D-Com 3G E173Eu-1 trên Gentoo Code:
# eix wvdial
[I] net-dialup/wvdial
     Available versions:  1.61
     Installed versions:  1.61(05:38:47 PM 06/04/2011)
     Homepage:            http://alumnit.ca/wiki/?WvDial
     Description:         Excellent program to automatically configure PPP sessions

# eix -I ppp
[I] net-dialup/ppp
     Available versions:  2.4.4-r25 (~)2.4.5 (~)2.4.5-r1 {activefilter atm dhcp eap-tls gtk ipv6 mppe-mppc pam radius}
     Installed versions:  2.4.5-r1(10:33:48 AM 06/03/2011)(ipv6 pam -activefilter -atm -dhcp -eap-tls -gtk -radius)
     Homepage:            http://www.samba.org/ppp
     Description:         Point-to-Point Protocol (PPP)
Tạo file cấu hình với `wvdialconf`: Code:
# wvdialconf 
Editing `/etc/wvdial.conf'.

Scanning your serial ports for a modem.

Modem Port Scan<*1>: S0   S1   S2   S3   
WvModem<*1>: Cannot get information for serial port.
ttyUSB_utps_diag<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyUSB_utps_diag<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 9600 baud
ttyUSB_utps_diag<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
WvModem<*1>: Cannot get information for serial port.
ttyUSB_utps_modem<*1>: ATQ0 V1 E1 -- OK
ttyUSB_utps_modem<*1>: ATQ0 V1 E1 Z -- OK
ttyUSB_utps_modem<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyUSB_utps_modem<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
ttyUSB_utps_modem<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttyUSB_utps_modem<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
ttyUSB_utps_modem<*1>: Modem Identifier: ATI -- Manufacturer: Technologies
ttyUSB_utps_modem<*1>: Speed 9600: AT -- OK
ttyUSB_utps_modem<*1>: Max speed is 9600; that should be safe.
ttyUSB_utps_modem<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
WvModem<*1>: Cannot get information for serial port.
ttyUSB_utps_pcui<*1>: ATQ0 V1 E1 -- OK
ttyUSB_utps_pcui<*1>: ATQ0 V1 E1 Z -- OK
ttyUSB_utps_pcui<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyUSB_utps_pcui<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
ttyUSB_utps_pcui<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttyUSB_utps_pcui<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
ttyUSB_utps_pcui<*1>: Modem Identifier: ATI -- Manufacturer: Technologies
ttyUSB_utps_pcui<*1>: Speed 9600: AT -- OK
ttyUSB_utps_pcui<*1>: Max speed is 9600; that should be safe.
ttyUSB_utps_pcui<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK

Found a modem on /dev/ttyUSB_utps_modem.
/etc/wvdial.conf<Warn>: Can't open '/etc/wvdial.conf' for reading: No such file or directory
/etc/wvdial.conf<Warn>: ...starting with blank configuration.
Modem configuration written to /etc/wvdial.conf.
ttyUSB_utps_modem<Info>: Speed 9600; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
ttyUSB_utps_pcui<Info>: Speed 9600; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
Mở `/etc/wvdialconf` ra chỉnh lại Phone thành *99#, còn Username, Password có thể để trống: Code:
[Dialer Defaults]
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
Phone = *99#
ISDN = 0
Username = ''
Init1 = ATZ
Password = ''
Modem = /dev/ttyUSB_utps_modem
Baud = 9600
OK, thử kết nối xem nào: Code:
# wvdial
--> WvDial: Internet dialer version 1.61
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
--> Carrier detected.  Waiting for prompt.
--> Don't know what to do!  Starting pppd and hoping for the best.
--> Starting pppd at Sat Jun  4 19:35:05 2011
--> Pid of pppd: 10831
--> Using interface ppp0
--> pppd: `[08]5[08]P[0c]5[08]
--> pppd: `[08]5[08]P[0c]5[08]
--> pppd: `[08]5[08]P[0c]5[08]
--> pppd: `[08]5[08]P[0c]5[08]
--> pppd: `[08]5[08]P[0c]5[08]
--> local  IP address 10.199.135.14
--> pppd: `[08]5[08]P[0c]5[08]
--> remote IP address 10.64.64.64
--> pppd: `[08]5[08]P[0c]5[08]
--> primary   DNS address 203.113.131.1
--> pppd: `[08]5[08]P[0c]5[08]
--> secondary DNS address 203.113.188.2
--> pppd: `[08]5[08]P[0c]5[08]
He he, đã lấy được IP: Code:
# ifconfig ppp0
ppp0      Link encap:Point-to-Point Protocol  
          inet addr:10.199.135.14  P-t-P:10.64.64.64  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:135 errors:0 dropped:0 overruns:0 frame:0
          TX packets:175 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:17443 (17.0 KiB)  TX bytes:17254 (16.8 KiB)
Giờ thì thử lướt web thôi.]]>
/hvaonline/posts/list/39002.html#239041 /hvaonline/posts/list/39002.html#239041 GMT
D-Com 3G E173Eu-1 trên Gentoo $ eix gnokii app-mobilephone/gnokii Available versions: 0.6.27-r2 (~)0.6.27-r4 (~)0.6.28.1 0.6.29 **9999 {X bluetooth debug ical irda linguas_cs linguas_de linguas_et linguas_fi linguas_fr linguas_it linguas_nl linguas_pl linguas_pt linguas_sk linguas_sl linguas_sv linguas_zh_CN mysql nls postgres sms usb} Installed versions: 0.6.29(10:22:24 PM 06/04/2011)(X bluetooth mysql nls usb -debug -ical -irda -linguas_cs -linguas_de -linguas_et -linguas_fi -linguas_fr -linguas_it -linguas_nl -linguas_pl -linguas_pt -linguas_sk -linguas_sl -linguas_sv -linguas_zh_CN -postgres -sms) Homepage: http://www.gnokii.org/ Description: user space driver and tools for use with mobile phones  Copy file cấu hình mẫu vào $HOME: Code:
$ cp /usr/share/doc/gnokii/sample/gnokiirc ~/.config/gnokii/config
Các bạn chỉ cần sửa lại port cho tương ứng, model = ATconnection = serial là OK: Code:
[global]
port = /dev/ttyUSB_utps_modem
model = AT
connection = serial
Check permission của serial port: Code:
$ ll /dev/ttyUSB_utps_*
crw-rw---- 1 root uucp 188, 1 Jun  6 22:08 /dev/ttyUSB_utps_diag
crw-rw---- 1 root uucp 188, 0 Jun  6 22:08 /dev/ttyUSB_utps_modem
crw-rw---- 1 root uucp 188, 2 Jun  6 22:09 /dev/ttyUSB_utps_pcui
Thêm user vào group uucp: Code:
$ sudo usermod -a -G uucp quanta
Thử kết nối và lấy các thông tin như IMEI, model, firmware, ... xem nào: Code:
$ gnokii --identify
GNOKII Version 0.6.29
IMEI         : 354810042907018
Manufacturer : Technologies
Model        : E173Eu-1
Product name : E173Eu-1
Revision     : 11.126.15.22.439
Nếu có trục trặc gì các bạn có thể bật debug bằng cách thêm đoạn sau vào file cấu hình: Code:
[logging]
debug = on
Lấy thêm vài thông tin khác nữa: Code:
$ gnokii --monitor
GNOKII Version 0.6.29
Entering monitor mode...
Network: unknown, Viet Nam (452 04)
LAC: 0a03 (2563), CellID: 00119f00 (1154816)
RFLevel: 11
Battery: 0
Power Source: No battery
SIM: Used 0, Free 250
EN: Used 2, Free 48
ON: Used 0, Free 2
CALL0: IDLE
CALL1: IDLE
RFLevel: 12
Battery: 0
[i](Hì, chưa lấy được thông tin mạng - Vịt teo)
Giờ thử gửi SMS xem: Code:
$ echo "testing sms" | gnokii --sendsms +8491xxxxxxx
GNOKII Version 0.6.29
Send succeeded with reference -1!
]]>
/hvaonline/posts/list/39002.html#239515 /hvaonline/posts/list/39002.html#239515 GMT
D-Com 3G E173Eu-1 trên Gentoo /hvaonline/posts/list/39002.html#243012 /hvaonline/posts/list/39002.html#243012 GMT D-Com 3G E173Eu-1 trên Gentoo /hvaonline/posts/list/39002.html#251624 /hvaonline/posts/list/39002.html#251624 GMT D-Com 3G E173Eu-1 trên Gentoo

soidamientrung wrote:
Vậy là mình có thể dùng USB 3G để gửi SMS tự động trên linux đúng không anh quanta? 
Đúng rồi. Với kinh phí hạn hẹp, bạn có thể dùng nó để tích một với một hệ thống monitoring như Nagios chẳng hạn.]]>
/hvaonline/posts/list/39002.html#251674 /hvaonline/posts/list/39002.html#251674 GMT