zhuxiaoge888 Member Licensed User Apr 1, 2016 #1 Hallo, Sometimes i can get the information in a row , sometimes i cant get the information in a row . what can i do??
Hallo, Sometimes i can get the information in a row , sometimes i cant get the information in a row . what can i do??
zhuxiaoge888 Member Licensed User Apr 1, 2016 #3 After i change the baud from 115200 to 460800, it works. But i dont understand why.. Upvote 0
DonManfred Expert Licensed User Longtime User Apr 1, 2016 #4 zhuxiaoge888 said: Sometimes i can get the information in a row , sometimes i cant get the information in a row Click to expand... From the asyncstream tutorial (i´ve marked the message in there): Erel said: In other cases you should use AsyncStreams in regular mode. This means that there is no guarantee that each sent message will be received as a single message. In fact it is more or less guaranteed not to happen. So your code is responsible for correctly collecting and receiving the message. Click to expand... Upvote 0
zhuxiaoge888 said: Sometimes i can get the information in a row , sometimes i cant get the information in a row Click to expand... From the asyncstream tutorial (i´ve marked the message in there): Erel said: In other cases you should use AsyncStreams in regular mode. This means that there is no guarantee that each sent message will be received as a single message. In fact it is more or less guaranteed not to happen. So your code is responsible for correctly collecting and receiving the message. Click to expand...
zhuxiaoge888 Member Licensed User Apr 1, 2016 #5 DonManfred said: From the asyncstream tutorial (i´ve marked the message in there): Click to expand... But after i changed the baud of Bluetooth , i can get the information in a row . i didnt change the my code. so i dont think the code is wrong. Upvote 0
DonManfred said: From the asyncstream tutorial (i´ve marked the message in there): Click to expand... But after i changed the baud of Bluetooth , i can get the information in a row . i didnt change the my code. so i dont think the code is wrong.
Erel B4X founder Staff member Licensed User Longtime User Apr 3, 2016 #6 This is how network communication works. You cannot rely on the messages to be received as a single "packet". If each line ends with an end of line character (or any other specific character) then you can use AsyncStreamsText. zhuxiaoge888 said: @Erel Click to expand... Please don't make such posts in the future. Upvote 0
This is how network communication works. You cannot rely on the messages to be received as a single "packet". If each line ends with an end of line character (or any other specific character) then you can use AsyncStreamsText. zhuxiaoge888 said: @Erel Click to expand... Please don't make such posts in the future.