Question 1:
When you send a text message through the AT CMGS, it is quite slow when the mobile phone returns to Error, or it is quite slow when it becomes OK, how to solve it to remain stable and maintained in 3 seconds / each.
Question 2:
Put the SMS content into the SIM card through the AT CMGW, then send it, the result is slower than it is sent directly from the PC. Is it very slow to read the SIM card? Is it a problem with my experiment? Do you have a message to save SMS? Mobile phone memory is not a SIM card?
-------------------------------------------------- -------------
Set a transmission timeout variable, for example, 3 seconds, send AT CMGS through the serial port, and the transmission thread is also ended in 3 seconds.
-------------------------------------------------- -------------
Your two questions are the same.
OK and ERROR have to wait for SMS to return after sending, this time is not your problem, but a network problem. To remain stable in 3 seconds / a current network is impossible! The general transmission will be between 3-17 seconds, the short message is slower or time-out, do not believe you try with your mobile phone.
Slow from SIM, but that milliseconds, two differences are due to the uncertainty of the network, there is no direct difference.
-------------------------------------------------- -------------
I tried it, the problem is here, if you don't have to wait for cmgs return, the data sent by the back will be as part of the PDU coding, so it will not return OK and Error, you try this, if he does not respond You first send a CTRL Z directive, indicating the end of the PDU, it will tell you Error, you will try it again, I will try it with Wavecom, you try it, if you don't return, then It's really dead, only shutdown or power off.
-------------------------------------------------- -------------
Temporary COM and test programs, placed in the following address, after decompression, can be installed directly;
If you have any questions during installation, please contact me: nlnc@163.com
Http://user.7host.com/nlnccn/smscom/smscom.rar
-------------------------------------------------- -------------
Question 1:
When you send a text message through the AT CMGS, it is quite slow when the mobile phone returns to Error, or it is quite slow when it becomes OK, how to solve it to remain stable and maintained in 3 seconds / each.
Is it an infrared connection or a data cable connection?
I have also encountered this problem, the test environment is Win98 VB6, Cyrix 5x86, infrared connections. When the number of senders is below 300, it is not obvious. If there is no run before running VB, it is not slow.
When the test environment is changed, the mobile phone exchange data rate is different from the PC, and the mobile phone has not responded to the PC. The highest rate of different mobile phones is different, with an AT command to test the rate of mobile phones, and set the rate at the MSCOMM control to match. About one second each. The top five is faster, and then it is stable.
You can test the AT CMGS =
Question 2:
Put the SMS content into the SIM card through the AT CMGW, then send it, the result is slower than it is sent directly from the PC. Is it very slow to read the SIM card? Is it a problem with my experiment? Do you have a message to save SMS? Mobile phone memory is not a SIM card? To write the information to the phone, select the memory for the phone, then save.
SMS seems to not be stored in your phone.
Regardless of whether the memory is a mobile phone or a SIM card, the information they store is discontinuous. For example, the mobile phone book has 2 records, stored in 1st and 5th positions, usually he saved in the second position when new phones are added. If the second location is deleted, the record of the third position will not move forward, and the second position is still empty.
When I read the SIM card's phone book, I have not encountered a slower rate, which is a smooth rate.
-------------------------------------------------- -------------
So I always feel that in the GSM network, it is unlikely to reach an average of 1 second / bar. Some people say that the speed of CDMA is fast, I don't know if it is, maybe CDMA's SMS network is not the same. But even if it is speed There will be another problem, that is, "Internet interoperability" problem, send it out, but movement does not have to receive, do not pay, huh, huh.
There is another problem, I don't know if you pay attention, when you send a lot of time, you will have a few hundred, you will have failed, you have to stop the operation for a long time, for example, 1 hour can continue to send Otherwise it will continue to return Error!
-------------------------------------------------- -------------
NLNC (No. 8 Wind):
> "AT CMGS Directive PDU Coding must be encoded in" "
No, if you set the SMSC in the PDU, you can send it directly with the number set in your phone, and the encoding length is short.
ZHHUANG2002 (veteran):
Ctrl-z problem, or instructions such as AT CMGS and AT CMGW, so after encounter communication, Ctrl-Z is then first, but not return, it is finished, huh, huh.
In addition, if you want to return information, you can open an error prompt, you will give the code, such as 512, you check the error, you know the error reason.
The transmission speed can only depend on the network. 3 seconds / strip is the limit.
-------------------------------------------------- -------------
I am doing the fastest 3 seconds to send a text message; if the text message is longer, then it may send a 5 to 6 seconds
Since the reaction speed of the module is slow, if the interval is too short, the module is dead; general interval is 4 to 5 seconds to compare insurance
One second is sent a surprise, what module is it? ?
-------------------------------------------------- -------------
3S basic
I have done a multi-thread to achieve
Setting the flag bit to the continuous transmission to send a MN layer link will not be broken immediately, and can reduce the time of continuous transmission.
-------------------------------------------------- -------------
Zhhuang2002 (veterans): My error code, not complete, but enough.
Long cmobile :: Parseerror (CString Strresult)
{
Long lcode = 0;
CString Strtemp;
IF (Strresult.Find ("OK")> = 0)
Return Err_Succeed;
IF (Strresult.isempty ())
m_llasterror = err_no_respond;
ELSE IF (Strresult.Find (" CME Error:")> = 0 | | StrRRRESULT.FIND (" CMS Error:")> = 0 | | | CEER ERROR: ")> = 0) {
IF (Strresult.Find (" CME Error:")> = 0)
{
Strtemp = " CME Error:";
Parsresult (strRRRESULT, STRTEMP);
IF (rc> = 1)
{
LCODE = ATOI (RD [0]);
IF (3 == Lcode | | 4 == LCODE)
M_LLASTERROR = Err_not_support;
ELSE IF (5 == Lcode | | 6 == Lcode)
M_LlasTerror = Err_SIM_PIN_REQUIRED;
ELSE IF (7 == Lcode)
M_Llasterror = Err_SIM_PUK_REQUIRED;
Else IF (lcode == 10)
M_Llasterror = Err_SIM_NOT_INSERTED;
Else IF (11 == Lcode)
M_LlasTerror = Err_SIM_PIN_REQUIRED;
Else IF (12 == Lcode)
M_Llasterror = Err_SIM_PUK_REQUIRED;
Else IF (13 == Lcode | |14 == Lcode | | 15 == LCODE)
M_Llasterror = Err_SIM_COMMUNICATION;
Else IF (16 == LCODE)
M_Llasterror = Err_incorRect_Password;
ELSE IF (17 == Lcode)
M_Llasterror = Err_SIM_PIN2_REQUIRED;
Else IF (18 == Lcode)
M_Llasterror = Err_SIM_PUK2_REQUIRED;
Else IF (20 == Lcode)
M_Llasterror = Err_Memory_Full;
Else IF (21 == Lcode)
M_Llasterror = Err_INVALID_INDEX;
Else IF (22 == Lcode)
M_Llasterror = Err_Location_empty;
ELSE IF (23 == Lcode)
M_Llasterror = Err_Memory_Fail;
ELSE IF (24 == Lcode)
m_llasterror = err_text_too_long;
ELSE IF (25 == Lcode)
M_Llasterror = Err_INVALID_CHARACTERS;
ELSE IF (26 == Lcode)
m_llasterror = err_number_too_long;
ELSE IF (27 == Lcode)
M_Llasterror = Err_INVALID_CHARACTERS;
ELSE IF (30 == Lcode)
M_Llasterror = Err_Network_Service;
ELSE IF (31 == Lcode) m_llasterror = err_network_timeout;
ELSE IF (32 == Lcode)
M_Llasterror = Err_Network_Service;
ELSE IF (42 == Lcode | | 44 == Lcode | | 46 == Lcode)
M_LlasTerror = Err_SIM_PIN_REQUIRED;
Else IF (43 == Lcode | | 45 == Lcode | | 47 == Lcode)
M_Llasterror = Err_SIM_PUK_REQUIRED;
Else
M_LLASTERROR = Err_Unknown_code;
}
}
ELSE IF (Strresult.Find (" CMS Error:")> = 0)
{
Strtemp = " CMS Error:";
Parsresult (strRRRESULT, STRTEMP);
IF (rc> = 1)
{
LCODE = ATOI (RD [0]);
IF (LCODE <128)
m_llasterror = err_network_rp;
ELSE IF (Lcode <256)
m_llasterror = err_network_tp;
Else IF (lcode == 301)
M_Llasterror = Err_SMS_Service;
Else IF (lcode == 302 | |lcode == 302)
M_LLASTERROR = Err_not_support;
Else IF (Lcode = 304 |lcode == 305)
M_LlasTerror = Err_SMS_PDU_PARAMETER;
ELSE IF (Lcode == 310)
M_Llasterror = Err_SIM_NOT_INSERTED;
Else IF (lcode == 311 | |lcode == 312)
M_LlasTerror = Err_SIM_PIN_REQUIRED;
Else IF (Lcode == 313 | |lcode == 314 | |lcode == 314)
M_Llasterror = Err_SIM_COMMUNICATION;
Else IF (lcode == 316)
M_Llasterror = Err_SIM_PUK_REQUIRED;
ELSE IF (Lcode == 317)
M_Llasterror = Err_SIM_PIN2_REQUIRED;
Else IF (lcode == 318)
M_Llasterror = Err_SIM_PUK2_REQUIRED;
Else IF (lcode == 320)
M_Llasterror = Err_Memory_Fail;
Else IF (lcode == 321)
M_Llasterror = Err_INVALID_INDEX;
Else IF (lcode == 322)
M_Llasterror = Err_Memory_Full;
Else IF (lcode == 330)
M_Llasterror = Err_smsc_not_found;
Else IF (lcode == 331)
M_Llasterror = Err_Network_Service; Else IF (Lcode == 332)
m_llasterror = err_network_timeout;
Else
M_LLASTERROR = Err_Unknown_code;
}
}
Else IF (Strresult.Find (" CEER ERROR:")> = 0)
{
Strtemp = " CEER ERROR:";
Parsresult (strRRRESULT, STRTEMP);
IF (rc> = 1)
{
LCODE = ATOI (RD [0]);
IF (ATOI (RD [0]) <128)
m_llasterror = err_network_rp;
Else
m_llasterror = err_network_tp;
}
}
}
Else IF (Strresult.Find ("Error")> = 0)
M_LLASTERROR = Err_not_support;
Else
m_llasterror = m_con.m_llasterror;
Retu. . .