Android Question BluetoothAdmin - Connection closed after each sent message


Active Member
Licensed User

I can more or less successfully communicate with the Python service on my Raspberry from this example:

Unfortunately I get after every send the message "Astream_Error 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:
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


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.


Well-Known Member
Licensed User