J jobykpaul Member Licensed User Longtime User Jul 10, 2014 #1 Hi, I am doing a bluetooth serial project. In that there is exchange of hex data between android and external SPP based bluetooth device. I can send data to the device using: Code: TextWriter1.Write(Chr(0x05)& Chr(0x78) & Chr(0x32)) But I cannot receive data to android.. when I use Code: dat = TextReader1.Readline , it works.. but the device need to send a CR LF after each set of hex numbers. But in our device, it cannot send CR LF, So I have to use something else.... I tried with TextReader1.ReadAll, but when it is called, the phone is not responding I need to kill the app from settings... Also the TextReader1.Read is not working... Please help. I just need to receive a set of hex numbers (without CR LF) from the device to the phone... Please send me the code for that. Thank you Joby
Hi, I am doing a bluetooth serial project. In that there is exchange of hex data between android and external SPP based bluetooth device. I can send data to the device using: Code: TextWriter1.Write(Chr(0x05)& Chr(0x78) & Chr(0x32)) But I cannot receive data to android.. when I use Code: dat = TextReader1.Readline , it works.. but the device need to send a CR LF after each set of hex numbers. But in our device, it cannot send CR LF, So I have to use something else.... I tried with TextReader1.ReadAll, but when it is called, the phone is not responding I need to kill the app from settings... Also the TextReader1.Read is not working... Please help. I just need to receive a set of hex numbers (without CR LF) from the device to the phone... Please send me the code for that. Thank you Joby
Erel B4X founder Staff member Licensed User Longtime User Jul 10, 2014 #2 You should not use TextReader with a network connection. You need to use AsyncStreams instead. Upvote 0