2019-11-01 12:46 PM
I have checked the PIN they connected in the correct order and on the correct pins. I have checked the GSM module on hyperterminal and it is functioning as intended. I am using the HAL drivers and Kiel IDE.
I am trying to get the response from the command AT which returns
AT
OK
////////////This is for starting up the GSM module ///////////
HAL_GPIO_TogglePin(GPIOA,GPIO_PIN_6);
HAL_GPIO_TogglePin(GPIOA,GPIO_PIN_5);
HAL_Delay(500);
HAL_GPIO_TogglePin(GPIOA,GPIO_PIN_5);
HAL_GPIO_TogglePin(GPIOA,GPIO_PIN_6);
///////////command//////////////////////////
uint8_t at_test[]="AT\r\n";
uint8_t at_gpsinfo[]="AT+CGPSINFO\r\n";
uint8_t answer[100]="";
while (1)
{
HAL_UART_Transmit(&huart3,at_test,6,10);
HAL_Delay(500);
HAL_UART_Receive(&huart3,answer,100,100);
HAL_Delay(500);
HAL_UART_Transmit(&huart2,answer,100,100);
HAL_Delay(500);
}
both the GSM and STM32F446RE are set to 115200
2019-11-01 01:11 PM
Perhap learn to use strlen() so you get the character length correct.
The system doesn't buffer while you ignore it for half a second.
Use a scope, check the signals.
Diagram the actual connectivity, you dismissing it doesn't convince me the voltage levels are compatible, nor if you have the rx/tx senses correct, the this compounded by "not working"
2019-11-01 01:29 PM
2019-11-01 01:30 PM
2019-11-01 01:31 PM
Thank you, I will look up and use strlen().