alex2911
Joined: 23 Apr 2008 Posts: 2
|
Posted: Thu Apr 24, 2008 8:50 am Post subject: PHP / Demo-Toolkit - Not able to recieve SMS |
|
|
Hi @ all
I am not able to recieve SMS. Get no error-messages and the demo-app says "Success" but no sms are there. On my phone i have unread messages.
PHP:
| Code: |
$objGsmIn = new COM("ActiveXperts.SmsProtocolGsm");
$obj2gsm = new COM("ActiveXperts.SmsConstants");
$objGsmIn->Device = "HUAWEI Mobile Connect - 3G Modem";
$objGsmIn->MessageStorage = $obj2gsm->asSTORAGE_ALL;
$numMessages = $objGsmIn->Receive();
echo $numMessages . '<br />';
for ($a=0;$a<(int)$numMessages;$a++){
$objSmsMessage = $objGsmIn->GetFirstMessage();
if ($objGsmIn->LastError == '33060'){
echo 'keine eingehenden Nachrichten';
} else {
echo $objSmsMessage->Sender;
echo $objSmsMessage->Data;
}
}
$objGsmIn->Clear();
|
I know that the code isn't 100% because i still missing the "nextmessage" but as soon as i don't geta at least 1, it haven't sense to work on.
My Mobile is a Nokia 6288 (and a vodafone Datacard "HUAWEI E220 HSDPA USB MODEM")
best regards from austria
Alex
----------------------------
Edit: Here the log-files:
| Quote: |
[11:25:06] OPEN DEVICE [SMS and MMS Toolkit Build 5.0.8.0401], device=[Nokia 6288 USB Modem], baudrate=[115200], result=[Success]
[11:25:06] WRITE STRING, string=[ATE0]
[11:25:06] READ STRING, string=[OK]
[11:25:06] WRITE STRING, string=[AT+CMEE=1]
[11:25:06] READ STRING, string=[OK]
[11:25:06] WRITE STRING, string=[AT+CPMS=?]
[11:25:07] READ STRING, string=[+CPMS: (),(),()]
[11:25:07] READ STRING, string=[OK]
[11:25:07] WRITE STRING, string=[AT+CMGF=?]
[11:25:07] READ STRING, string=[+CMGF: (0,1)]
[11:25:07] READ STRING, string=[OK]
[11:25:07] CLOSE DEVICE
|
| Quote: |
[11:26:21] OPEN DEVICE [SMS and MMS Toolkit Build 5.0.8.0401], device=[HUAWEI Mobile Connect - 3G Modem], baudrate=[115200], result=[Success]
[11:26:21] WRITE STRING, string=[ATE0]
[11:26:21] READ STRING, string=[OK]
[11:26:21] WRITE STRING, string=[AT+CMEE=1]
[11:26:21] READ STRING, string=[OK]
[11:26:21] WRITE STRING, string=[AT+CPMS=?]
[11:26:21] READ STRING, string=[+CPMS: ("ME","MT","SM","SR"),("ME","MT","SM","SR"),("ME","MT","SM","SR")]
[11:26:21] READ STRING, string=[OK]
[11:26:21] WRITE STRING, string=[AT+CMGF=?]
[11:26:21] READ STRING, string=[+CMGF: (0-1)]
[11:26:21] READ STRING, string=[OK]
[11:26:21] WRITE STRING, string=[AT+CMGF=0]
[11:26:21] READ STRING, string=[OK]
[11:26:21] WRITE STRING, string=[AT+CPMS="MT"]
[11:26:21] READ STRING, string=[+CPMS: 0,255,0,20,0,20]
[11:26:21] READ STRING, string=[OK]
[11:26:21] WRITE STRING, string=[AT+CMGL=1]
[11:26:21] READ STRING, string=[OK]
[11:26:21] WRITE STRING, string=[AT+CMGL=0]
[11:26:21] READ STRING, string=[OK]
[11:26:22] CLOSE DEVICE
|
|
|