1

Actually I'm working with SIM900, I have a problem with Reception character, so I can't receive an "OK" for each message that I send to the chip. I would like to send an SMS or make call.
I use STM32F429 waveshare board and below and the functions that I implemented for the communication:

void SIM900_Init(void)
{
  HAL_UART_Transmit(&huart3, (uint8_t*)aTxBuffer1, sizeof(aTxBuffer1), 1000);
  HAL_Delay(50);
  HAL_UART_Transmit(&huart3, (uint8_t*)aTxBuffer2, sizeof(aTxBuffer2), 1000);
  HAL_Delay(50);
}
void SIM900_SendSMS(void)
{
  HAL_UART_Transmit(&huart3, (uint8_t*)aTxBuffer3, sizeof(aTxBuffer3), 1000);
  HAL_Delay(50);
  HAL_UART_Transmit(&huart3, (uint8_t*)aTxBuffer4, sizeof(aTxBuffer4), 1000);
  HAL_Delay(50);
  HAL_UART_Transmit(&huart3, message, sizeof(message), 1000);
  HAL_Delay(50);
  HAL_UART_Transmit(&huart3, (uint8_t*)CtrlZ, sizeof(CtrlZ), 1000);
  HAL_Delay(50);
}

In the main, I call these two functions like this:

  uint8_t aRxBuffer[255];
.......
SIM900_USART3_UART_Init();
  SIM900_Init();
  SIM900_SendSMS();


  /* Infinite loop */
  while (1)
  {    
    // Start receiving the data via USART3
    HAL_UART_Receive(&huart3, (uint8_t *)aRxBuffer, 255, 1000);

    .........
Dave2e
  • 22,192
  • 18
  • 42
  • 50
zinhom69
  • 5
  • 2

0 Answers0