Modem
與 wvdial 建立連接時出現問題
我有一個華為手機調製解調器 EM680,我可以用它在我的 Ubuntu 13.10 機器上建立連接。我將其插入,我可以使用 Connections Manager 建立連接。
我有一個沒有 X 伺服器的盒子,我想在那個盒子上與同一個調製解調器建立連接。我可以得到一個串列連結,
/dev/ttyUSB1
如果我使用screen /dev/ttyUSB1 460800
和 send連接到它AT
,它的響應OK
就很好——所以調製解調器可以工作了!之後,我嘗試使用wvdial
我的/etc/wvdial.conf
配置建立連接,如下所示:[Dialer Defaults] Init1 = ATZ Init2 = AT+CFUN=1 Init3 = AT+CGDCONT=1,"IP","m2mstatic.apn" Modem = /dev/ttyUSB1 Phone = *99***1# Modem Type = USB Modem Username = "blank" Password = "blank" Stupid Mode = yes New PPPD = yes Baud = 460800 ISDN = 0
我嘗試在
wvdial
沒有任何選項或使用wvdial eap-interval 1 require-chap
因為在我的連接管理器視窗中,在選項卡
PPP
下選中了以下複選框:
- 亞太經合組織
- MSCHAP
- 人民行動黨
- MSCHAPv2
- 章
- 使用 BSD 數據壓縮
- 使用 Deflate 數據壓縮
- 使用 TCP 標頭壓縮
但是在發佈時我只是得到
# wvdial eap-interval 1 require-chap --> WvDial: Internet dialer version 1.61 --> Warning: section [Dialer eap-interval] does not exist in wvdial.conf. --> Warning: section [Dialer 1] does not exist in wvdial.conf. --> Warning: section [Dialer require-chap] does not exist in wvdial.conf. --> Cannot get information for serial port. --> Initializing modem. --> Sending: ATZ ATZ OK --> Sending: AT+CFUN=1 AT+CFUN=1 OK --> Sending: AT+CGDCONT=1,"IP","m2mstatic.apn" AT+CGDCONT=1,"IP","m2mstatic.apn" OK --> Modem initialized. --> Sending: ATDT*99***1# --> Waiting for carrier. ATDT*99***1# CONNECT 14000000 --> Carrier detected. Starting PPP immediately. --> Starting pppd at Mon Jan 22 03:26:56 2007 --> Pid of pppd: 4295
在這裡等待大約一分鐘,然後:
--> pppd: H�[02] --> pppd: H�[02] --> Disconnecting at Mon Jan 22 03:27:57 2007 --> The PPP daemon has died: Connect script failed (exit code = 8) --> man pppd explains pppd error codes in more detail. --> Try again and look into /var/log/messages and the wvdial and pppd man pages for more information. --> Auto Reconnect will be attempted in 5 seconds --> Cannot get information for serial port. --> Initializing modem. --> Sending: ATZ --> Sending: ATQ0 --> Re-Sending: ATZ --> Modem not responding. --> Cannot get information for serial port. --> Initializing modem. --> Sending: ATZ --> Sending: ATQ0 --> Re-Sending: ATZ --> Modem not responding. --> Disconnecting at Mon Jan 22 03:28:19 2007 #
但我永遠無法真正訪問網際網路。頁面中的退出程式碼 8
pppd man
說:The serial port could not be opened.
這很荒謬,因為我剛剛打開(並用**關閉(!)**它
screen
)。有什麼想法我會出錯或我錯過了什麼嗎?編輯
我剛剛找到了連接管理器的配置文件,它看起來像這樣:
[connection] id=Rogers uuid=5c4ed6f8-9ece-4888-a129-65ed5c741502 type=gsm permissions=user:ron:; [gsm] number=*99# password-flags=1 apn=m2mstatic.apn pin-flags=1 [ipv4] method=auto
首先,您需要查看您的硬體是否在列表中:
lsusb
然後你可以安裝和配置
usb_modeswitch
,因為 Linux 將你的硬體辨識為 USB 驅動器而不是調製解調器(我假設你使用的是 Arch Linux):pacman -S usb_modeswitch
最後,您只需檢查您的 APN 設置是否正確:
wvdialconf vim /etc/wvdial.conf
一個使其自動化的簡單腳本:
usb_modeswitch sleep 2 modprobe usbserial vendor=0xVVVV product=0xMMMM maxSize=4096 sleep 2 wvdial 'your profile