E ernschd Active Member Licensed User Longtime User Feb 20, 2019 #1 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: Code: 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
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: Code: 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
Erel B4X founder Staff member Licensed User Longtime User Feb 21, 2019 #2 Why not use B4J to program the RPi? Make sure not to use AsyncStreams in prefix mode. Upvote 0
E ernschd Active Member Licensed User Longtime User Feb 22, 2019 #3 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
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.
techknight Well-Known Member Licensed User Longtime User Feb 22, 2019 #4 ernschd said: With B4J I would first have to learn how to run a program as a service. Click to expand... Which is super easy, I do it all the time. This isnt the exact method I used as its a bit newer, but it would still work fine: https://gist.github.com/GuySawyer/fae11b0efefd20927ef029c6b3c6fd4e The "wrapper" script I used was here: https://stackoverflow.com/questions/11203483/run-a-java-application-as-a-service-on-linux And it worked fine. Upvote 0
ernschd said: With B4J I would first have to learn how to run a program as a service. Click to expand... Which is super easy, I do it all the time. This isnt the exact method I used as its a bit newer, but it would still work fine: https://gist.github.com/GuySawyer/fae11b0efefd20927ef029c6b3c6fd4e The "wrapper" script I used was here: https://stackoverflow.com/questions/11203483/run-a-java-application-as-a-service-on-linux And it worked fine.