cancel
Showing results for 
Search instead for 
Did you mean: 

How to check the GPRS HTTP commands in stm32 using UART

MS.11
Associate III

Hi,

May I know how to check the GPRS HTTP commands are continuously working or not in stm32f103c8T6 using UART and How to put those HTTP commands in while loop. Plz help me how to do this.

Thank you

8 REPLIES 8
Andrew Neil
Evangelist III

Not sure what you're asking here?

AT Commands are just text strings - so your first step must be to get sending & receiving text strings working.

You should do that without the GPRS unit; that's just an unnecessary unknown to start with - instead, work with a terminal app on a PC.

To find what AT commands are available, and how to use them, you will need to study the documentation for your particular GPRS module.

Again, spend time with just the module and a terminal app on a PC to get to know and understand the AT commands and how they work.

Don't move on to the microcontroller until you have that firmly understood.

See: https://community.st.com/s/question/0D53W00000eu8lFSAQ/quectel-gsmgprs-at-command

Thank You

I checked and studied how AT commands are working on SIM800C module . I checked those commands by connecting UART and checked the responses from those commands in the Hyper Terminal(for eg. AT is the command and I got OK as a response in the terminal). How to write those AT commands in while loop for the repetitive process in stm32 controller.

for eg. AT is the command

OK is the response.

OK

OK

OK

Like this I want to do. Plz help me how to do this.

  1. Send the command;
  2. Receive the response;
  3. Handle the response;
  4. repeat from 1.
MS.11
Associate III

Thank you

MS.11
Associate III

Hi,

But I don't have idea how to do in stm32f103c8 Controller. Just I tried to initialize the UART pins and next HAL_TRANSMIT and HAL_RECIEVE I did. But I don't know how to enter the AT command in that lines and how to get the response from that AT command in stm32f103c8 Controller. Plz if u know help me how to get rid out of this.

Thank you

It sounds like you really haven't covered the basics of how to send & receive strings using the UART yet.

You really need to have that thoroughly understood before moving on to AT commands.

"I don't know how to enter the AT command in that lines"

Again, an AT Command is just a string.

The STM32F1 HAL documentation is here:

https://www.st.com/resource/en/user_manual/dm00154093-description-of-stm32f1-hal-and-lowlayer-drivers-stmicroelectronics.pdf

HAL_UART_Transmit is on page 556. Note that it takes a buffer pointer and length, rather than just a C string. You can use strlen() to get the length.

Similarly HAL_UART_Receive.

ST have a load of training & reference materials:

http://www.st.com/content/st_com/en/support/learning/stm32-education.html

http://www.st.com/content/st_com/en/support/learning/stm32-education.html

http://www.st.com/content/st_com/en/support/learning/stm32-education/stm32-moocs.html

http://www.youtube.com/user/STonlineMedia

There's also many 3rd-party tutorials; eg

https://www.waveshare.com/wiki/STM32CubeMX_Tutorial_Series:_USART

MS.11
Associate III

Thank you