GSM\GPRS A6 module at 115200 bps

A forums to allow bugs and problems with Flowcode v7 to be reported and resolved.

Moderator: Benj

Post Reply
AMADI
Posts: 4
Joined: Fri Dec 22, 2017 11:19 am
Contact:

GSM\GPRS A6 module at 115200 bps

Post by AMADI »

Hi..
Hope some one can help me with this strange error.
I am using Arduino mega and GSM\GPRS A6 MODUL ..
it works fine with all baud rate under 115200. just when I switch the baud rate for 115200 then modul can not be initialise and stop working.
the problem is the GSM A6 module standars baud rate speed is 115200 and can not be permanently changed for other baud rate speed .
I mean every time I reset the module it will switch back to 115200 bps.
I do not know if is it bug in F7 or something i missed ?. please help
Thanks.

EtsDriver
Posts: 444
Joined: Tue Apr 15, 2014 4:19 pm
Location: Kajaani, Finland
Has thanked: 345 times
Been thanked: 227 times
Contact:

Re: GSM\GPRS A6 module at 115200 bps

Post by EtsDriver »

Hi and welcome to forums!

Could you attach your Flowcode file for us to take a look?
Ill just keep the good work up!

AMADI
Posts: 4
Joined: Fri Dec 22, 2017 11:19 am
Contact:

Re: GSM\GPRS A6 module at 115200 bps

Post by AMADI »

HI EtsDriver...
Thank you very much for your reply and interest of my problem.
the attached program work very well on all baudrate lower than 115200bps .
Attachments
GSM_SPEED_TEST_2.fcfx
(13.54 KiB) Downloaded 288 times

AMADI
Posts: 4
Joined: Fri Dec 22, 2017 11:19 am
Contact:

Re: GSM\GPRS A6 module at 115200 bps

Post by AMADI »

yesterday I tried other GSM/GPRS module-- A7 from AI thinker.
got the same result as GSM A6. at HIGH SPEED 115200 won't work...
all other baudrates work just fine.
I believe (NOT SURE) its a bug in (GSM/GPRS) component in this speed ... because the same HARDWARE and same connections in ARDUINO IDE (Compiler)do the Job (works) perfect without any error.
Hope some one can help.....
thanks.

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: GSM\GPRS A6 module at 115200 bps

Post by LeighM »

Hi,
The Arduino Mega is going to have quite an inaccurate baud rate at 115200.
Our code would calculate the clock divider at a value of 8 for this baud rate.
You could try forcing this to a different value, say 7, and see if that works any better.
Try adding this C code just after the GSM Initialize ...

Code: Select all

// Reconfigure UART Channel 2 Baud Rate
UBRR1L = 7;
UBRR1H = 0;
Or try a slightly more accurate setting at double speed ...

Code: Select all

// Reconfigure UART Channel 2 Baud Rate using double speed
set_bit(UCSR1A, U2X1);
UBRR1L = 15;
UBRR1H = 0;

AMADI
Posts: 4
Joined: Fri Dec 22, 2017 11:19 am
Contact:

Re: GSM\GPRS A6 module at 115200 bps

Post by AMADI »

Happy New year for all.

HI LeighM...
Thank you very much for your respond .I have tried both code you sent me,still have the same problem. at 115200bps not working.
I am not hardware expert .But I believe its a bug in GSM/GPRS component.
when I use the UART component in FLOWCODE there is no problem at all, work fine at any speed.even at 115200 bps, if its clock divider matter as you say ,then I cannot use any UART at 115200 bps speed, but this is not the case.

As I mentioned before, there is no problem if I use Arduino IDE(compiler)or any other compiler.
hope you can help me .
sorry for my English.
Many thanks.

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: GSM\GPRS A6 module at 115200 bps

Post by LeighM »

Thanks for the further information.
Does your GSM modem support Flow Control (RTS/CTS) ?

Post Reply