Bad State on UART2

Hello,

Looking at your code, it seems to me you would like to do a lot of things together which shouldn’t be done together. Please note, when you call an AT command it is not effective immediately, they are just queued up to be processed later by the OS. Why do you close the UART2 and after it you open? You don’t have to close it for setting up the parameters. I think that just can cause trouble.

Anyway i think the nicest solution should look like this:

  1. Check the UART parameters with AT commands like AT+IPR? on UART2 and so on…
  2. If something has to be changed, change it with setup commansd
  3. If something has been changed save it with AT&W command, so you don’t have to issue the setup parameters after a reboot
  4. After you finished with the AT settings, handlers received OK , you can start with adl_fcmSubscribe()…

Cheers,
tom