无法通过wvdial发送短信(无运营商!请重试) [英] Failed to send sms through wvdial (No Carrier! Trying again)

查看:315
本文介绍了无法通过wvdial发送短信(无运营商!请重试)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题



    pi@raspberrypi:/~ $ sudo wvdial

    --> WvDial: Internet dialer version 1.61
    --> Initializing modem.
    --> Sending: ATZ
    ATZ
    OK
    --> Sending: ATQ0 V1 E1 S0=0 &C1 &D2
    ATQ0 V1 E1 S0=0 &C1 &D2
    OK
    --> Modem initialized.
    --> Sending: ATDT07********
    --> Waiting for carrier.
    ATDT07********
    NO CARRIER
    --> No Carrier!  Trying again.
    --> Sending: ATDT07********
    --> Waiting for carrier.
    ATDT07********
    NO CARRIER
    --> No Carrier!  Trying again.
    --> Sending: ATDT07********
    --> Waiting for carrier.
    ATDT07********
    NO CARRIER
    --> No Carrier!  Trying again.

sudo wvdialconf



    pi@raspberrypi:/~ $ sudo wvdialconf
    Editing `/etc/wvdial.conf'.

    Scanning your serial ports for a modem.

    ttyUSB0: ATQ0 V1 E1 -- OK
    ttyUSB0: ATQ0 V1 E1 Z -- OK
    ttyUSB0: ATQ0 V1 E1 S0=0 -- OK
    ttyUSB0: ATQ0 V1 E1 S0=0 &C1 -- OK
    ttyUSB0: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
    ttyUSB0: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- ERROR
    ttyUSB0: Modem Identifier: ATI -- Manufacturer: huawei
    ttyUSB0: Speed 9600: AT -- OK
    ttyUSB0: Max speed is 9600; that should be safe.
    ttyUSB0: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
    ttyUSB1: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
    ttyUSB1: ATQ0 V1 E1 -- failed with 9600 baud, next try: 9600 baud
    ttyUSB1: ATQ0 V1 E1 -- and failed too at 115200, giving up.
    ttyUSB2: ATQ0 V1 E1 -- OK
    ttyUSB2: ATQ0 V1 E1 Z -- OK
    ttyUSB2: ATQ0 V1 E1 S0=0 -- OK
    ttyUSB2: ATQ0 V1 E1 S0=0 &C1 -- OK
    ttyUSB2: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
    ttyUSB2: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- ERROR
    ttyUSB2: Modem Identifier: ATI -- Manufacturer: huawei
    ttyUSB2: Speed 9600: AT -- OK
    ttyUSB2: Max speed is 9600; that should be safe.
    ttyUSB2: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK

    Found a modem on /dev/ttyUSB0.
    Modem configuration written to /etc/wvdial.conf.
    ttyUSB0: Speed 9600; init "ATQ0 V1 E1 S0=0 &C1 &D2"
    ttyUSB2: Speed 9600; init "ATQ0 V1 E1 S0=0 &C1 &D2"

上面的详细信息说我可以使用ttyUSB0或ttyUSB2发送短信

Above details says that i can use ttyUSB0 or ttyUSB2 to send sms

lsusb 在这里,软件狗被检测为调制解调器

lsusb Here the dongle is detected as modem



    pi@raspberrypi:/~ $ lsusb
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 009: ID 12d1:1001 Huawei Technologies Co., Ltd. E161/E169/E620/E800 HSDPA Modem
    Bus 001 Device 003: ID 09da:054f A4Tech Co., Ltd. 
    Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

/etc/wvdial.conf



    [Dialer Defaults]
    Init1 = ATZ
    Init2 = ATQ0 V1 E1 S0=0 &C1 &D2
    Modem Type = Analog Modem
    ISDN = 0
    New PPPD = yes
    Phone = 07********
    Modem = /dev/ttyUSB0
    Username = etisalat
    Password = etisalat
    Baud = 9600

推荐答案

要通过调制解调器发送短信,需要切换到gsm文本模式. wvdial.conf属性必须进行如下更新:

To send sms through modem, it is required to switch to gsm text mode. wvdial.conf properties have to updated like following:



    [Dialer Defaults]
    Init1 = AT
    #
    Init2 = AT+CSCS="GSM"
    # Set the GSM modem in SMS Text Mode
    Init3 = AT+CMGF=1
    # Get info about the current operator.
    Init4 = AT+COPS?
    # To check whether the GSM/GPRS modem or mobile phone supports SMS text mode, 
    Init5 = AT+CMGF=?
    # Display the currently active modem mode.
    Init6 = AT^GETPORTMODE
    # : 1,1,1  : SMS text mode send, receive, boradcast supported
    Init7 = AT+CSMS=1
    # Device model Number
    Init8 = AT+GMM
    # 31, 3207880  : First number is signal strength, 0...31 where 31 is maximum possible. 2nd number  = ?
    Init9 = AT+CSQ
    # 0,0  : means the modem i snot connected to the network
    Init10 = AT+CREG?
    # 1 : means CDMA digital service available(0=no service, 2=TDMA, 3=analog)
    Init11 = AT+CAD?
    # should have said what storage memory is available for SMS
    Init12 = AT+CPMS=?

    # Type of the modem.
    Modem Type = Analog Modem
    # The location of the device that wvdial should use as your modem.
    Modem = /dev/ttyUSB0
    ISDN = 0
    Baud = 9600
    Dial Attempts = 3

当您保存以上属性时,wvdial将可以正常工作...

when you save above properties, then wvdial will work fine...

在以下文件中,您将看到所有属性的详细说明 https://github.com/morfikov/files/blob/master/configs/etc/wvdial.conf

In following file you will see the detailed explanation of all properties https://github.com/morfikov/files/blob/master/configs/etc/wvdial.conf

https://www.developershome.com/sms/cmgsCommand3.asp

这篇关于无法通过wvdial发送短信(无运营商!请重试)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆