Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

To check response of AT+CIPSTART command

Status
Not open for further replies.

sanket.joshi

Member level 3
Member level 3
Joined
Jun 27, 2013
Messages
65
Helped
8
Reputation
16
Reaction score
8
Trophy points
8
Location
Mumbai,India
Visit site
Activity points
386
i m trying to establish GPRS connection through sim300 modem using 8051 microcontroller.
till AT+CIPSTART command i m getting right response from modem through c code i have written...

response of AT+CIPSTART="TCP","XXX.XXX.XXX.XXX","XX" is
OK
CONNECT OK

i m not getting how to check this response using c for 8051??
kindly help me...its urgent...
 

Read the response into a array using UART interrupt. Formatting of data is needed to discard unwanted data like '>', "OK", '"', etc... Post an example of response.

respone of AT+CIPSTART command is
OK
CONNECT OK

first OK comes then after sometime CONNECT OK comes....so how to check this?
 

Read OK and CONNECT OK into an array. Terminate the array with null character to make it a string. The final string will be "OKCONNECT OK". Confirm by printing this string on UART or LCD. Then declare a similar string and use strcmp(str1, str2). If both strings match function returns 0. If 0 you can take that right response is received else response is wrong.
 
Last edited:

Read OK and CONNECT OK into an array. Terminate the string with null character to make it a string. The final string will be "OKCONNECT OK". Confirm by printing this string on UART or LCD. Then define a similar string and use strcmp(str1, str2). If both strings match functions returns 0. If 0 you can take that right response is received else response is wrong.

i hv now handled response of AT+CIPSTART
now i want to handle response of AT+CIPSEND
Please help..
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top