How to add alarm notification in app when Bluetooth sending data finish?
There are reserved ASCII codes you might consider, like EOT.
could you explain more ??
look I receiving multiple data from Bluetooth module on text box and I want when finishing the app reading the file give me a short alarm because the file size is big
See How do you send csv file via bluetooth? - #4 by ChrisWard
for maximum amount you can transmit or receive at a time.
Does your data come as text?
For more on EOT, see
https://www.ascii-code.com/character/␄
yes the data comes as text
look that's my blocks all i want is where to put the alarm notification or how to do it I tried many ideas but not work the app crash as when bytes = 0 in the same timer block ...
Can you post the code for the device that's sending the text?
It should coordinate with the receiving end, to not swamp it.
Posting text is better than posting screen shots.
In general, the receiving end should receive more often that the sending end sends.
There are several ways to know if you have received all the data you expect:
-
Send a message with the expected total text length ahead of time, and compare cumulative length to that number (good for visual progress displays too)
-
Set some limit to the number of consecutive Clock.Timer events that come up empty on the receiving end, and signal an alarm when you reach that limit
-
Send a special message like '[o^o]' after your text, to signal the end, and watch for that.
look that part of the code the project is a data logger I store this data in sd card and using the app to receive this data from Bluetooth module and share it as a text file by what'sup.
i have two problems I know there is a buffer limit and I exceed it every line so the data sometimes came not good and the other i want the user of my project (its a PCB card) know when the file is received by short message
i used here end as a text but where can I put the received block ....
when I put it in the same timer block the app crash
TIP: If you right click in your block editor you can save an image of your blocks. That is much easier on the eyes then posting photo's of your screen.
I circumvented this problem and put the alarm at the timer, so when it finishes, it will not appear on the screen again, and so I know that the transmission process is over.
My problem now is how to receive the data well as I posted it above.
this is a screen shot of how the data come to the app
You do not show your chunksize.
Try a much smaller one.
Also, you can upload your .ino file here.