how to use 0x0D and 0X0A instead of Both CR & NL in serial port?

hi
my own board is uno, os is mac os x 10.8.5

i get a OK response when i send string "AT" to my AT chips by serial port and use Both NL& CR. model

i'd like to know how to use 0x0D and 0X0A to instead of Both CR & NL in serial port no line ending model

someone could kindly reply a correct way for it ?
tks!

Your question doesn't make a great deal of sense - CR/LF are the names for the ASCII codes 0x0d and 0x0a

dear groove
thanks for reply,
i knew it is not a big deal, but i don't know why it could not response "OK" when i send AT0x0d0x0a in no line ending model?
(in normal case, it will be response "OK" when i send AT in Both NL&CR model)

hi
i try another way ,

but still dose not work.

next.... i'd like to try another way.....

but i don't know why it could not response "OK" when i send AT0x0d0x0a in no line ending model?

Because "0x0d" and 0x0d are different things. There is NO way for you to send a binary value from the Serial Monitor application. What it does is append either 0x0A, 0x0D, both, or neither, depending on the option selected.

thanks for reply,

Because "0x0d" and 0x0d are different things. There is NO way for you to send a binary value from the Serial Monitor application. What it does is append either 0x0A, 0x0D, both, or neither, depending on the option selected.

do you know what should i need to input after AT then press "send" button to get the response OK(model-no line ending ) instead of input AT then press "send" button (model-Both NL& CR)?

Read the replies again. There is nothing you can type to give you a CR and LF. It has to come from the settings.

It has to come from the settings.

thanks for reply,
so, you mean that we can not do any thing to instead of the setting "Both NL& CF" in serial port of the Arduino IDE Tools?

so, you mean that we can not do any thing to instead of the setting "Both NL& CF" in serial port of the Arduino IDE Tools?

Boy, you catch on slowly. Yes, that is what we mean. Now, if you use a different tool, then you might be able to mix binary data and ASCII data together.

The problem seems to be, not at the computer end, but at the arduino end.

You need to check your arduino sketch, to see why it is not responding to the serial characters which it receives.

michinyon:
The problem seems to be, not at the computer end, but at the arduino end.

No it is not. he wants to type something in the serial monitor that sends a CR and LF instead of choosing it as an option from the drop down menu.

Dear ALL
thanks for your reply,

so far, i know that i could send after AT by setting the option Both NL & CR,
and Pauls tell me that is no way to do this use any code to instead of in arduino serial port ,
and Pauls's idea is mix using two kinds of tools.

though there are no easy answer to me, but i still figure out something interest here.

tks!

and Pauls tell me that is no way to do this use any code to instead of in arduino serial port ,

No in the arduino serial monitor not port.

If you would only say what your are trying to do instead of asking some half backed question about what you think your soloution might be.

If you want to send things out from a serial port it is very easy to add a CR and LF to it. If you want to send CR and LF by typing from the serial monitor then it is impossible. If you want to send CR and LF automatically from the serial monitor then just enable that option.

hi mike
tks for reply

f you want to send things out from a serial port it is very easy to add a CR and LF to it.

Serial.write(0x0D);
Serial.write(0x0A);
it's work!

If you want to send CR and LF by typing from the serial monitor then it is impossible.

yes, it is my question here.

If you want to send CR and LF automatically from the serial monitor then just enable that option.

tks!