Hello
I have question about sending ASCII codes over BT in SPP mode.
I have an application written in VS(for PC) and Im using simply (my own)protocol for giving some instructions for AVR processor.
I have modificated Serial Example script for testing it - and I have below results:
1) I need to send "#100" to AVR and Chr(13)(end of line) char.
When I modificated this line:
TextWriter1.WriteLine(txtSend.Text & Chr(13))
TextWriter1.Flush
txtSend.Text = ""
by adding & Chr(13) - it is working when I putting #100 to text box.
But I want to use it without text box and manual putting value - so I tried to use
TextWriter1.WriteLine("#100" & Chr(13))
but it not work. What Im doing wrong?
Thank you.
Regards
P.
@Update
Ok, Its working - I forgot about adding :
TextWriter1.Flush
Next question - when this string is sent to AVR - application is hanged on - its waiting for something for few seconds - and after that I have prompt window + with question about waiting or force closing application.
How it should be resolved + that after sending this string application will come back to main activity?
I have question about sending ASCII codes over BT in SPP mode.
I have an application written in VS(for PC) and Im using simply (my own)protocol for giving some instructions for AVR processor.
I have modificated Serial Example script for testing it - and I have below results:
1) I need to send "#100" to AVR and Chr(13)(end of line) char.
When I modificated this line:
TextWriter1.WriteLine(txtSend.Text & Chr(13))
TextWriter1.Flush
txtSend.Text = ""
by adding & Chr(13) - it is working when I putting #100 to text box.
But I want to use it without text box and manual putting value - so I tried to use
TextWriter1.WriteLine("#100" & Chr(13))
but it not work. What Im doing wrong?
Thank you.
Regards
P.
@Update
Ok, Its working - I forgot about adding :
TextWriter1.Flush
Next question - when this string is sent to AVR - application is hanged on - its waiting for something for few seconds - and after that I have prompt window + with question about waiting or force closing application.
How it should be resolved + that after sending this string application will come back to main activity?
Last edited: