顯示具有 wvdial 標籤的文章。 顯示所有文章
顯示具有 wvdial 標籤的文章。 顯示所有文章

2015年1月10日 星期六

[ppp][wvdial][Raspberry Pi][ArchLinux] No ppp module error (exit code = 4)

Error message
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Fri Jan  9 02:48:28 2015
--> Pid of pppd: 478
--> pppd: [10]�?[01]h�?[01]��?[01]
--> Disconnecting at Fri Jan  9 02:48:28 2015
--> The PPP daemon has died: No ppp module error (exit code = 4)
--> man pppd explains pppd error codes in more detail.
--> I guess that's it for now, exiting
--> The PPP daemon has died. (exit code = 4)
Check out error code by using man to check ppp.

EXIT STATUS
       The exit status of pppd is  set  to  indicate  whether  any  error  was
       detected, or the reason for the link being terminated.  The values used
       are:

       0      Pppd has detached, or otherwise the connection was  successfully
              established and terminated at the peer's request.

       1      An  immediately  fatal  error  of some kind occurred, such as an
              essential system call failing, or running out of virtual memory.

       2      An error was detected in processing the options given,  such  as
              two mutually exclusive options being used.

       3      Pppd is not setuid-root and the invoking user is not root.

       4      The  kernel  does  not  support PPP, for example, the PPP kernel
              driver is not included or cannot be loaded.
Solve problem:

Before insert ppp must insert slhc, otherwise will miss some module.
insmod /lib/modules/3.12.35-1-ARCH/kernel/drivers/net/slip/slhc.ko.gz

Insert ppp module.
Find ppp module –> find . -name “ppp
insmod /lib/modules/3.12.35-1-ARCH/kernel/drivers/net/ppp/ppp_generic.ko.gz

Reference
Loading and unloading modules in Linux

2014年12月9日 星期二

[wvdial][Archlinux][ubuntu] How to install wvdial and use it to 3g network

Ubuntu :
1. Install required software
sudo apt-get update
sudo apt-get install ppp usb_modeswitch wvdial

2. lsusb
Bus 001 Device 010: ID 0424:9512 Standard Microsystems Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 011: ID 0424:ec00 Standard Microsystems Corp. 
Bus 001 Device 013: ID 12d1:1436 Huawei Technologies Co., Ltd.

Archlinux :
1. Install required software
sudo pacman -Syu
sudo pacman -S ppp usb_modeswitch wvdial

2. lsusb
Bus 001 Device 010: ID 0424:9512 Standard Microsystems Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 011: ID 0424:ec00 Standard Microsystems Corp. 
Bus 001 Device 013: ID 12d1:1436 Huawei Technologies Co., Ltd.

E173:
  1. check 12d1:1436 at configPack.tar.gz
    tar -xzvf /usr/share/usb_modeswitch/configPack.tar.gz 12d1:1436
  2. Edit usb_modeswitch.conf
    sudo vim /etc/usb_modeswitch.conf
  3. DefaultVendor=0x12d1
    DefaultProduct=0x1436
    
    TargetVendor=0x12d1
    TargetProduct=0x1436
    
    MessageContent="55534243123456780000000000000011062000000101000100000000000000"
  4. Edit /etc/wvdial.conf
    User can make wvdial.conf automatically by using wvdialconf
  5. [Dialer 3g]
    Init = ATZ
    Init1 = ATZ
    Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
    Init3 = AT+CGDCONT=1,"IP","internet"
    stupid mode = 1
    Modem Type = Analog Modem
    ISDN = 0
    Phone = *99#
    Modem = /dev/ttyUSB0
    Username = blank
    Password = blank
    Baud = 9600
    
  6. Modem start
    sudo usb_modeswitch -c /etc/usb_modeswitch.conf
  7. Connect to the internet
    sudo wvdial 3g

ZTE MF110/MF627/MF636:
  1. check 19d2:2000 at configPack.tar.gz
    tar -xzvf /usr/share/usb_modeswitch/configPack.tar.gz 19d2:2000
  2. Edit usb_modeswitch.conf
    sudo vim /etc/usb_modeswitch.conf
  3. DefaultVendor=0x19d2
    DefaultProduct=0x2000
    
    TargetVendor=0x19d2
    TargetProduct=0x0031
    
    MessageContent="55534243123456702000000080000c85010101180101010101000000000000"
    
  4. Edit /etc/wvdial.conf
    User can make wvdial.conf automatically by using wvdialconf
  5. [Dialer 3g]
    Init = ATZ
    Init1 = ATZ
    Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
    Init3 = AT+CGDCONT=1,"IP","internet"
    stupid mode = 1
    Modem Type = Analog Modem
    ISDN = 0
    Phone = *99#
    Modem = /dev/ttyUSB1
    Username = blank
    Password = blank
    Baud = 9600
    
  6. Modem start
    sudo usb_modeswitch -c /etc/usb_modeswitch.conf
  7. Connect to the internet
    sudo wvdial 3g
Reference: