Android Question BluetoothAdmin - Connection closed after each sent message

ernschd

Active Member
Licensed User
Hello,

I can more or less successfully communicate with the Python service on my Raspberry from this example:
https://github.com/levifuksz/raspibt

Unfortunately I get after every send the message "Astream_Error java.io.IOException: bt socket closed, read return: -1", but the server is sending the correct answer before.

No error is shown on the server side. After a reconnect everything works as before.

I catch the error like this:
B4X:
Private Sub AStream_Error
   Log("Astream_Error " & LastException.Message)
   ...

The connection setup works with serial.Connect as well as with the UID (serial.Connect2(...))

What is the problem here?

Thanks and greetings
 

ernschd

Active Member
Licensed User
AsyncStreams is not in prefix mode.

I'm using python because I'm familiar with it (more or less). With B4J I would first have to learn how to run a program as a service.
 
Upvote 0

techknight

Well-Known Member
Licensed User
Upvote 0
Top