cancel
Showing results for 
Search instead for 
Did you mean: 

nucleoL432KC + sim800H - no response to AT commands

CeliaCJ
Associate

Hello everyone,

I'm currently trying to send and receive SMS with the "Adafruit FONA GSM SIM800H" module and a Nucleo-L432KC board. Initially, I tested the module with an Arduino UNO as described in the Adafruit FONA documentation, and everything worked fine—I was able to send and receive SMS messages. However, now I want to use the STM32 board.

I created a new project using STM32CubeMX and configured HUART1 for the GSM module and HUART2 for serial print. The issue I'm facing is: when I send "AT\r\n" with HAL_UART_Transmit, my rx_buffer remains empty. I initially thought it could be a logic level issue, as the Arduino UNO operates at 5V and the STM32 board uses 3.3V, but even after adding a logic level converter, there is still no response to the AT command.

I have connected the module’s RX to D5 and TX to D4, and I've enabled interrupts for D4.

Does anyone have any ideas on what could be causing this issue or suggestions on what I could try? 

CeliaCJ_0-1733064133756.png

CeliaCJ_1-1733064178387.pngCeliaCJ_2-1733064200055.png

 

3 REPLIES 3
SofLit
ST Employee

Hello @CeliaCJ ,

You need to check if the UART sends frame to SIM module on Tx pin correctly. Check that by probing Tx pin with an oscilloscope or Logic analyzer. If you don't have a such equipment try to find someone who have it.

PS: kindly, please don't share screenshots of your code but use </> button to paste it.

Thank you for your understanding.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

@CeliaCJ wrote:

The issue I'm facing is: when I send "AT\r\n" with HAL_UART_Transmit, my rx_buffer remains empty.


So how do you know if your STM32 is actually transmitting anything at all ?

That's the first thing you need to test.

Some tips here 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

 

BTW: The terminator for AT commands is just Carriage Return (CR, \r) - no need for a linefeed (LF, \n).

 

PS:

Pease see the Posting Tips for how to properly post source code - not as images:

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


@SofLit wrote:

You need to check if the UART sends frame to SIM module on Tx pin correctly. Check that by probing Tx pin with an oscilloscope or Logic analyzer. If you don't have a such equipment try to find someone who have it.


Absolutely.

@CeliaCJ As a simple test, without needing a scope or analyser, just user a terminal app - as described here:

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