I am using a gsm shield I purchased from ebay. Everything is going well, I am sending AT and getting OK back and so on. I can get to the point where I type in the message but cannot send the correct character to let the device know that I am finished typing the message and that it may send it now. I believe the character is ctrl+z or 0x26. How would I send this in the monitor or what program could I use to do this. I have tried telnet and I can't get that to work for the life of me.
Conventionally, an ampersand is used at the start of a command to indicate that an extended command follows, and commands and responses are terminated by a carriage return.
I just looked, it was actually 0x1a. Looking at the ascii table, it is a substitute character? Never heard of it. But apparently that's what I need to be able to send through the serial monitor. Any ideas?
If it isn't a type-able character, you might need a more feature-robust terminal that allows sending raw bytes. Or use your operating system's method for typing ASCII characters and try sending it that way.
Wanted to do the same thing - send ctrl+z using Arduino serial monitor to escape the text string for a GSM message. Couldn't find a way with Arduino serial monitor, however the following works.
Download Tera Term (a free terminal emulator, maybe others too). Very simple to use.
Startup Tera Term, choose 'Serial' radio button at bottom of dialog window; your Arduino COM port may already be showing in the dropdown menu, if not choose the right COM port. And thats it.
Now use this terminal instead of Arduino serial monitor, especially if you want to send control characters. After sending all your AT commands and typing your text message, just pres CTRL & z key in the input window.
Basically, you just have to type the CTRL sequence in the input window and the corresponding control character will be sent on the serial interface.
ctrl-z is used for an end-of-file marker in text files on unix (windows uses a ctrl-d). Its possible that the serial monitor itself treats its input as a text stream, so a ctrl-z makes it close the connection.
gorek:
Hello!
There is a working solution, about sending ctrl+z using serial monitor.
Open new file in most popular text editor - Notepad++
Press CTRL-Z
Copy (CTRL-C) formed symbol (its may display in Notepad++ as "SUB")
Paste (CTRL-V) in commandline of Serial monitor and press ENTER
Did you actually try this? Because I did. It doesn't work. Ctrl z in Windows, and notepad++ for that matter, resolves to the default action which is undo. If I could down vote you I would.
gorek:
Hello!
There is a working solution, about sending ctrl+z using serial monitor.
Open new file in most popular text editor - Notepad++
Press CTRL-Z
Copy (CTRL-C) formed symbol (its may display in Notepad++ as "SUB")
Paste (CTRL-V) in commandline of Serial monitor and press ENTER
Almost, except, instead of pressing CTRL-Z you write ALT+026
That will output a small character saying "SUB" with a black background, copy that into your serial monitor (it will be pasted as a square), and send that.
What do you get after typing ALT+026? should you press enter in order to get some character? And ALT+026 is not command right? its just you type as text in Notepad
Notepad++ not Notepad.
Hold Ctrl, press Z, release Ctrl OR Hold Alt, press 0, press 2 press 6, release Alt.
You can then paste the "SUB" thingy that appears Serial Monitor and save this .txt file.
If you open this file with Notepad, it will look like a rectangle! Notepad++ shows the "SUB" thingy.
Works 100%
Hello,
Perhaps I am slightly late in answering the question. Just type Serial.print(char(26)); at the end of your message string. You can send your complete SMS code and I would be willing to check the same.
Cheers.