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
  • Thanks for your quick reply Andrew... Yes I am using it in text mode ( AT+CMGF=1 )... Here's what I am sending...

    AT
    AT+CMGF=1
    AT+CMGS="+447123456789"
    This is a test message from SIM800L.
    

    Notice the full stop ( . ) added to the end in the terminal (Where CTRL-Z is sent)... Maybe this is just CoolTerm (OSX) showing this instead of the control character although it doesn't do this when I type it direct into the terminal to the SIM800L via an FTDI cable... (That works just fine).

Reply
  • Thanks for your quick reply Andrew... Yes I am using it in text mode ( AT+CMGF=1 )... Here's what I am sending...

    AT
    AT+CMGF=1
    AT+CMGS="+447123456789"
    This is a test message from SIM800L.
    

    Notice the full stop ( . ) added to the end in the terminal (Where CTRL-Z is sent)... Maybe this is just CoolTerm (OSX) showing this instead of the control character although it doesn't do this when I type it direct into the terminal to the SIM800L via an FTDI cable... (That works just fine).

Children
No Data
Related