3

I am having issues with receiving the response to the AT commands from the NINA after switching from data mode to back to command mode. I used the "ATS2?" command to check the escape character and received just a single 43(DEC) as a response which is basically '+' in ASCII. The section 2.5 of the "NINA-B1 Getting Started" manual states the following:

"By default, NINA-B1 will enter command mode and has to be reconfigured to start up in data mode or extended data mode. From the data mode or extended data mode, it is possible to enter the command mode by transmitting escape sequence to the module. By default, the escape sequence is:

1. Silence 1 second
2. +++
3. Silence 1 second"

Here is the NINA-B1 AT commands Manual

I did the above in my program and also get an "OK", but for some reason after switching from the data mode to command mode, the NINA does not respond to the AT commands. Below is my code snippet for switching from Data Mode to Command Mode.

void TS_NinaDataModeToCommandMode(void){
  _delay_ms(1000);
  UART_write('+');
  UART_write('+');
  UART_write('+');
 _delay_ms(1000);
}

Any insights would be helpful.

1 Answer 1

3

After a while of repetitively going through the code and my logic with no luck, I finally decided to probe the signals and check the timing of the 1-second silence preceding and succeeding the escape sequence. After checking the timing, it looked like the silence was less than 1-second, don't remember exactly how much. So I just changed the above code to the following and it started to work.

void TS_NinaDataModeToCommandMode(void){
  _delay_ms(1050);
  UART_write('+');
  UART_write('+');
  UART_write('+');
 _delay_ms(1050);
}

I am going to further reduce the delay 1050 ms to lower and check what is the optimal value I can use since these are not accurate delays. I hope this helps!

For more details please visit the forum discussion thread here

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.