cancel
Showing results for 
Search instead for 
Did you mean: 

Problem interfacing gsm module with stm32h747 disco board

KiruV
Associate II

We're working a camera based person fall detection device with STM32H747 and B-CAMS-OMV camera module, we want to interface GSM module with it to make alert calls in case of fall being detected but we're facing issues with the same.

 

We're not able to interface the GSM module properly with the board,

the GSM module is being powered up and getting connected to cellular network but it's not responding to commands from the board. 

 

We're trying to set up USART communication between the board and the GSM module but the GSM module is not responding to the commands.

 

Kindly help us with the same.

 

10 REPLIES 10
Mike_ST
ST Employee

Hello,

Check baurate/parity/stop bit configuration.


@Mike_ST wrote:

Check whether your module expects "\r\n" or just "\n" at the end of each AT command.


The AT command terminator should be just CR.

Andrew Neil
Evangelist III

@KiruV wrote:

We're trying to set up USART communication between the board and the GSM module but the GSM module is not responding to the commands.


So what testing/investigation/debugging have you done to find what's going on?

  • Is your code actually transmitting anything at all?
  • Is your wiring correct & complete - eg, does the module require just TX/RX, or does it also need other lines?
  • Is your code transmitting at the correct voltage, with correct baud rate, etc?
  • If all the above are correct, is your code actually sending valid commands?
  • Are the commands actually reaching the GSM module? 

Before getting into embedded code, have you manually tested your interactions with the GSM module using a terminal?

In the Posting Tips are some hints on debugging serial comms:

https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/tac-p/706966/highlight/true#M49

Try those to see what's actually happening between your STM32 abd the GSM module...

liaifat85
Senior III

Some GSM modules can echo back sent characters. Try sending simple AT commands like AT\r\n and see if you get an OK response.


@liaifat85 wrote:

 Try sending simple AT commands like AT\r\n .


The command terminator is just CR:

AndrewNeil_0-1725463392058.png

https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=323

AndrewNeil_1-1725463785397.png

https://www.itu.int/rec/T-REC-V.250 (supersedes the https://www.itu.int/rec/T-REC-V.25ter referenced in GSM07.07)

 

 

Yes, i have checked it again, yet it is not working

First in order to debug, I tried manually testing USART communication separately:
        * I've separately tried USART communication between PC terminal and STM32 board- it works,
        * Separately tried communication between GSM Module and Arduino-it works.
The GND of both the STM32 and GSM has been connected commonly.

the GSM is still not responding to the AT commands, I sent a simple AT command for which the module is supposed to reply with OK but it is not doing so.

 

Screenshot 2024-09-06 143035.png

 

Code:

KiruV_3-1725613531535.png

 

KiruV_2-1725613477582.png

Is there anything I could be doing wrong? What can i try to do now

I tried to do so, but it's not giving an OK response.

Screenshot 2024-09-06 143035.png

I tried another debugging, I connected PD5(which is the USART2 Tx) to PD6(Rx) directly and tried a loopback test just to see if the channel is working.....it is not, the loopback test itself fails..

so i think the mistake is in the configuration and initialization itself,
but I can not tell what is wrong with the configurations, everything seems to be correct.

KiruV_0-1725645550436.png

KiruV_1-1725645555745.png

KiruV_2-1725645593015.png