Denyo
(Denyo)
March 20, 2020, 4:31pm
#1
Hello everyone.
I’m working with Kodular since a couple of weeks. I really like the way it works!
But now, I’m having some trouble with the bluetooth client.
Connecting and data exchange works fine.
But it happens that the other device (ESP32) is offline/disconnected.
To find out, I used a block with a timer, see picture. But it won’t work:
It always says, ‘Bluetooth-Client1.IsConnected = true’, although it is false.
Can anyone help?
Thank you!
Taifun
March 21, 2020, 1:02pm
#2
yes, this is correct
to find out, if the connection is broken, you have to send something and if the connection is broken, you will get the following error back
Error 516: Unable to write: Connection reset by peer
you can catch that error in the Screen.ErrorOccurred event, see also A simple Bluetooth Chat with App Inventor 2
Taifun
2 Likes
Denyo
(Denyo)
March 21, 2020, 3:13pm
#3
Hi Taifun,
thank you for your solution!
Using the ErrorHandler will work.
Denyo
system
(system)
Closed
April 20, 2020, 3:13pm
#4
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.