My project is to send some data to http server from zedboard via GSM module(through AT commands). I have designed the hardware connection in vivado (conected rx,tx,vcc and gnd pins in JB connector) . I have set the baudrate to 115200(for module hilo) and I think I am sure that the tx and rx pins are perfectly working.
Now my question is how to send AT commands to GSM module. For those who dont know about GSM module , I ll just brief about its working.
Basically in GSM modules, if some characters(AT COMMANDS) are typed and sent , the GSM module will respond with some characters. For example,
1. If I type 'A','T' (2 characters in this case) , the response from GSM module will be OK('O','K')
2. If I type 'A','T','+','C','P','I','N','?' (7 characters), the response will be 'C','P','I','N',':','R','E','A','D','Y' (CPIN:READY)
So basically I have to send some commands from tx pin of zedboard to rx pin of GSM module. And I have to receive some response from tx pin of GSM to rx pin of zedboard. Hope everybody gets the basic idea.(only for those who doesnt know abt GSM module. Not for pros?)
So I have wrote some code, which will send the commands to the baseaddress of UARTLITE ( I have used AXI UARTLITE for this module). The problem is that I m sending the data to the UARTLITE address and searching for the response from the same UARTLITE baseaddres. But I dont know from which address to read the response back.. Hope all got my question. For your convenience, I will post some part of the code.
Question
Sridhar Prasath Aruppukottai Ganesan
Greetings,
My project is to send some data to http server from zedboard via GSM module(through AT commands). I have designed the hardware connection in vivado (conected rx,tx,vcc and gnd pins in JB connector) . I have set the baudrate to 115200(for module hilo) and I think I am sure that the tx and rx pins are perfectly working.
Now my question is how to send AT commands to GSM module. For those who dont know about GSM module , I ll just brief about its working.
Basically in GSM modules, if some characters(AT COMMANDS) are typed and sent , the GSM module will respond with some characters. For example,
1. If I type 'A','T' (2 characters in this case) , the response from GSM module will be OK('O','K')
2. If I type 'A','T','+','C','P','I','N','?' (7 characters), the response will be 'C','P','I','N',':','R','E','A','D','Y' (CPIN:READY)
So basically I have to send some commands from tx pin of zedboard to rx pin of GSM module. And I have to receive some response from tx pin of GSM to rx pin of zedboard. Hope everybody gets the basic idea.(only for those who doesnt know abt GSM module. Not for pros?)
So I have wrote some code, which will send the commands to the baseaddress of UARTLITE ( I have used AXI UARTLITE for this module). The problem is that I m sending the data to the UARTLITE address and searching for the response from the same UARTLITE baseaddres. But I dont know from which address to read the response back.. Hope all got my question. For your convenience, I will post some part of the code.
unsigned char Sender1[] = {'A','T','\0'};
unsigned char Sender2[] = {'A','T','D','+','4','9','1','7','6','3','0','1','7','4','8','1','4',';','\0'};
int Index =0;
int i = 0;
int u=0;
SendBuffer[Index]='\0';
RecvBuffer[Index]='\0';
while(Sender != '\0'){
for (Index = 0; Index < TEST_BUFFER_SIZE; Index++) {
SendBuffer[Index] = Sender[i+Index];
XUartLite_SendByte(UARTLITE_BASEADDR, SendBuffer[Index]);
}
for (Index = 0; Index < TEST_BUFFER_SIZE; Index++) {
RecvBuffer[Index] = XUartLite_RecvByte(UARTLITE_BASEADDR);
Receiver[i+Index] = RecvBuffer[Index];
}
i = i + TEST_BUFFER_SIZE;
u++;
Link to comment
Share on other sites
12 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.