This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Sending CTRL-Z over UART

Hi, I have a SIM800L GSM/GPRS module that I can successfully talk to via the UART on the nRF51.

I can tell it to dial numbers etc and that all works fine.

My problem is that to send an SMS, the final character (after inputting the message) needs to be a CTRL-Z sequence. (Dec 26 - Hex 1A)

If I enter the AT commands via a terminal and an FTDI cable, everything is working. But when I try sending the sequence from the nRF51's UART, everything 'looks' good apart from the CTRL-Z character which shows itself as a '.' on my terminal and the SIM800L module ignores it.

I have tried placing the CTRL-Z sequence within my string via sprintf and also I have tried manually sending it at the very end directly via app_uart_put as follows...

err_code = app_uart_put((uint8_t)0x1A);  // CTRL-Z

But this doesn't work.

What am I doing wrong?

Thanks in advance!

Parents
  • Good thinking... I checked in the Hex view and 0x1A IS getting sent so the problem is elsewhere.... My thinking is now that I need to wait for the success/error messages before sending the actual text message body... Simply adding an nrf_delay_ms (YUK!) is not enough as the data is getting buffered and then sent in one burst...

    Just writing properly some code to handle the responses and will let you know what happens...

    Thanks!

Reply
  • Good thinking... I checked in the Hex view and 0x1A IS getting sent so the problem is elsewhere.... My thinking is now that I need to wait for the success/error messages before sending the actual text message body... Simply adding an nrf_delay_ms (YUK!) is not enough as the data is getting buffered and then sent in one burst...

    Just writing properly some code to handle the responses and will let you know what happens...

    Thanks!

Children
Related