Your attempt to correct the baud rate by combining AT+IPR and AT&W correct, but unfortunately this does not necessarily work.
The AT&W command is not actually specified in any standard (see my question What standard does the AT & W AT command indicate? ), So this means that exactly what AT&W stores is completely dependent on manefacturer, and you (unfortunately) you can’t take anything regarding the preservation of the baud rate.
Of course, if manefacturer clearly indicates that AT&W does maintain transmission speed, then you should go (for this particular device), but the document associated with it does not even include AT&W in the list of commands ... Therefore, when you check and find that your Since the modem does not save the data transfer rate, this is an unfortunate fact that you must accept.
When you say that it is not possible to change the baud rate, I assume that you mean that the problem is that 8MHz is not easy to divide up to 115200, so the error marker becomes carelessly large, as shown in the 8 MHz table with WormFood AVR Ba Rate Rate Calculator , right?
The table shows the error of 7.8% for 8 MHz, but is the modem tolerant to reception? If one of the X attempts succeeds, that’s all you need, as the speed will be set as you need, for example. try AT+IPR=19200 on 115200, and then check AT on 19200. If successful, do this, try again. Maybe it will be good enough and will be resolved after a resonant time? I think it's worth a try.
Alternatively, you could try writing an interrupt routine to send the start + data + stop bit for "AT+IPR=19200\r" at 115200 at the GPIO pin and connect only to see if it is possible to speed up the speed modem (see http://www.fpga4fun.com/SerialInterface2.html for calculations with lower frequencies). You will probably need additional adaptation of the electrical signal for this, as well as find a way to multiplex GPIO and UART.
source share