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
  • Just looking at the command listing for that module, are you sure you are in text mode and not PDU mode?

    Also, looks like all AT commands need to terminate with (0x0D), so I'm assuming the last bytes in an SMS command would be {0x1A, 0x0D}

    I'm no expert, but that is what I see after spending 5 minutes with the AT command sheet that seem like red flags.

Reply
  • Just looking at the command listing for that module, are you sure you are in text mode and not PDU mode?

    Also, looks like all AT commands need to terminate with (0x0D), so I'm assuming the last bytes in an SMS command would be {0x1A, 0x0D}

    I'm no expert, but that is what I see after spending 5 minutes with the AT command sheet that seem like red flags.

Children
No Data
Related