2016-10-01 65 views
2

我正在開發一個使用GSM調制解調器的VB6應用程序。目前我正在使用Wavecome Fastrack M1306B GSM調制解調器。我收到+CME ERROR: 4錯誤消息。Visual Basic 6,gsm調制解調器錯誤「+ CME ERROR:4」

下面是我目前的代碼。

VB6代碼:

MSComm1.Output = "AT+CMEE=1" & vbCrLf 
    Delay (1) 
    MSComm1.Output = "AT+WIND=15" & vbCrLf 
    Delay (1) 
    MSComm1.Output = "AT+CPAS" & vbCrLf 
    Delay (1) 
    MSComm1.Output = "AT+STSF?" & vbCrLf 
    Delay (1) 
    MSComm1.Output = "AT+STSF=1" & vbCrLf 
    Delay (1) 
    MSComm1.Output = "AT+STGI=0" & vbCrLf 
    Delay (1) 
    MSComm1.Output = "AT+STGR=0,1,128" & vbCrLf 
    Delay (1) 
    MSComm1.Output = "AT+STGI=6" & vbCrLf 
    Delay (1) 
    MSComm1.Output = "AT+STGR=6,1,7" & vbCrLf 
    Delay (1) 
    MSComm1.Output = "AT+STGI=6" & vbCrLf 
    Delay (1) 
    MSComm1.Output = "AT+STGR=6,1,0" & vbCrLf 
    Delay (1) 
    MSComm1.Output = "AT+STGI=3" & vbCrLf 
    Delay (1) 
    MSComm1.Output = "AT+STGR=3,1" & vbCrLf 
    Delay (1) 
    MSComm1.Output = 1212 & Chr(26) & vbCrLf 
    Delay (1) 
    MSComm1.Output = "AT+STGR=1,1" & vbCrLf 

輸出:

AT+CSQ 
+CSQ: 29,0 
OK 
AT+CSCS="GSM" 
OK 
AT+COPS? 
+COPS: 0,2,47004 
OK 
AT+CMEE=1 
OK 
AT+WIND=15 
OK 
AT+CPAS 
+CPAS: 0 
OK 
AT+STSF? 
+STSF: 1,"5FFFFFFF7F",3,0 
OK 

AT+STSF=1 
OK 
AT+STGI=0 
+STGI: "Teletalk STK" 
+STGI: 128,3,"Tele Charge",0 
+STGI: 129,3,"Teletalk 3G World",0 
+STGI: 130,3,"General Services",0 
OK 
AT+STGR=0,1,128 
OK 
+STIN: 6 
AT+STGI=6 
+STGI: 0,"Tele Charge" 
+STGI: 1,10,"Recharge",0 
+STGI: 2,10,"Transfer",0 
+STGI: 3,10,"Last Recharge",0 
+STGI: 4,10,"Last Transfer",0 
+STGI: 5,10,"Change PIN",0 
+STGI: 6,10,"Send PIN",0 
+STGI: 7,10,"Stock Balance",0 
+STGI: 8,10,"Suspend",0 
+STGI: 9,10,"Activate",0 
+STGI: 10,10,"Help Line",0 
OK 
AT+STGR=6,1,7 
OK 
+STIN: 6 
AT+STGI=6 
+STGI: 0,"Stock Balance" 
+STGI: 1,2,"Own Account",0 
+STGI: 2,2,"Down Stream Account",0 
OK 
AT+STGR=6,1,0 
OK 
+STIN: 3 
AT+STGI=3 
+STGI: 0,1,4,4,0,"Please Enter PIN (4 digit)" 
OK 
AT+STGR=3,1 
> 1212 
+CME ERROR: 4 

回答

1

此語句:

MSComm1.Output = 1212 & CHR(26)& vbCrLf

想要將(隱含)字符串「1212」分配給輸出,然後是控制字符ANSI 26.

您的調制解調器不喜歡此功能,並顯示錯誤(操作不支持)。這裏有所有相關的錯誤代碼:http://www.micromedia-int.com/en/gsm-2/73-gsm/669-cme-error-gsm-equipment-related-errors

不知道你爲什麼給調制解調器控制字符。不知怎的,它看起來像複製/粘貼錯誤,請評論如果你的調制解調器確實需要這個。請嘗試以這種方式替代您的PIN碼:

MSComm1.Output =「1212」& vbCrLf