B4J Question [Solved] Bluetooth connection lost event?

Mark Read

Well-Known Member
Licensed User
Longtime User
When using a RPi connected to another device via bluetooth, is there a way to detect the loss of bluetooth connection from the RPi side? Maybe ChangeOfState or similar?

Many thanks.
 

Mark Read

Well-Known Member
Licensed User
Longtime User
Okay. I can imagine that the Astream_Error would be called if data cannot be sent to the client but when is Astream_Terminated called?
 
Upvote 0

Mark Read

Well-Known Member
Licensed User
Longtime User
So to sum up:

RPi sends data continuously to a tablet. Tablet listens for data.

RPi cannot send data over bluetooth - AStreams_Error will be called on RPi.
Tablet closes bluetooth - AStreams_Terminated is called on RPi.
Correct?

What error deos the tablet generate?

Thanks Erel.
 
Upvote 0

Mark Read

Well-Known Member
Licensed User
Longtime User
Thanks for the clear explanation Erel. Have added the two subs on my tablet and RPi. Now I can reconnect if the bluetooth connection is lost, without restarting both Apps!

 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…