J jimseng Active Member Licensed User Longtime User May 23, 2023 #1 Hello When sending a string from python on a raspberry pi via bluetooth to the chat example the message is always 1 character followed by the rest of the characters. For instance ser.write('hello'.encode('utf-8')) from the pi gives two AStream_NewData events. So what is output is: h ello And it doesn't seem to matter what length the string I send is, or if it contains a carriage return. Any ideas?
Hello When sending a string from python on a raspberry pi via bluetooth to the chat example the message is always 1 character followed by the rest of the characters. For instance ser.write('hello'.encode('utf-8')) from the pi gives two AStream_NewData events. So what is output is: h ello And it doesn't seem to matter what length the string I send is, or if it contains a carriage return. Any ideas?
J jimseng Active Member Licensed User Longtime User May 23, 2023 #2 I think I have got it. AsyncStreamsText seems to be the answer. Still. Not sure why I get 1 byte then the rest. An explanation might help me but at least it is working with AsyncStreamsText Upvote 0
I think I have got it. AsyncStreamsText seems to be the answer. Still. Not sure why I get 1 byte then the rest. An explanation might help me but at least it is working with AsyncStreamsText
B Brian Dean Well-Known Member Licensed User Longtime User May 23, 2023 #3 Don't worry about it. Asynchronous streams normally arrive in bursts - that is how they got their name. The length of the bursts depends on the characteristics of the transmission path. Upvote 0
Don't worry about it. Asynchronous streams normally arrive in bursts - that is how they got their name. The length of the bursts depends on the characteristics of the transmission path.