NUCLEO-G491RE communication with SIMCom SIM800A - Problems
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-09 4:36 AM - last edited on ‎2024-07-09 7:00 AM by Andrew Neil
Hi,
Hope you are doing good.
I am trying to transmit "AT" command using USART communication to SIM800A(SIM.COM).
I am facing errors, should I write a separate GSM module.
Thank you.
Solved! Go to Solution.
- Labels:
-
Bug-report
-
STM32CubeIDE
-
STM32CubeMX
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-09 4:49 AM - edited ‎2024-07-09 4:50 AM
@abhishek1991 wrote:communication with GSM 800A - Steps Needed
Simple:
- Send valid AT command to the SIM800A;
- Receive reply from the SIM800A;
- Determine success/failure from the response, and proceed as appropriate.
@abhishek1991 wrote:I am facing errors.
What "errors", exactly?
@abhishek1991 wrote:should I write a separate GSM module.
Modular software is generally accepted as A Good Thing.
However, putting code which "has errors" into a separate module will just give you a module which "has errors" - it won't, in itself, solve your errors.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-09 4:49 AM - edited ‎2024-07-09 4:50 AM
@abhishek1991 wrote:communication with GSM 800A - Steps Needed
Simple:
- Send valid AT command to the SIM800A;
- Receive reply from the SIM800A;
- Determine success/failure from the response, and proceed as appropriate.
@abhishek1991 wrote:I am facing errors.
What "errors", exactly?
@abhishek1991 wrote:should I write a separate GSM module.
Modular software is generally accepted as A Good Thing.
However, putting code which "has errors" into a separate module will just give you a module which "has errors" - it won't, in itself, solve your errors.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-09 5:58 AM
Hi,
My main code goes like this and below that is my usart code. I just want to transmit "AT" string get back OK from SIM800A. Can you please help me how to proceed further ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-09 6:37 AM
You've marked my previous post as The Solution - but it seems this is not solved yet?
You still haven't said what were the "errors" you mentioned:
- compiler errors in your code ?
- "ERROR" replies from the SIM800A ?
- other ?
@abhishek1991 wrote:I just want to transmit "AT" string get back OK
Forget about the SIM800A for now - just connect your UART to a terminal.
Can you see anything being sent from your STM32?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-09 9:39 AM - edited ‎2024-07-09 9:49 AM
Hi Andrew,
No, Not yet, I am working on it after usart is accomplished. Appreciate it. Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-09 10:00 AM
@abhishek1991 wrote:No, Not yet
You mean not solved yet?
Then please un-mark the solution:
What are you doing here:
/* USER CODE END WHILE */
HAL_UART_Transmit(&huart2, txBuffer-1, size, HAL1TIMEOUT);
Why txBuffer-1 ??
Why are you trying to transmit the character before the start of the buffer ?!?
Similarly:
rxBuffer[20]=HAL_UART_Receive(&huart2, rxBuffer-1, 20, HAL1TIMEOUT);
