Hi.
I have a BT communication using async stream with prefix mode to communicate with microntroller control box.
I took me a while to "HACK" the commucation. After a while i totally gave up to fix any async stream errors they might pop up. Communication is now runs in separate process and whenever i expierence any problem, i just simply kill the process, restart control box streaming and start communication process again.
When i am killing the process i try to clean and sweep after myself. e,g,
Asyx.Close
Ser.StopListening
TimSer.Enabled = False
Ser.Disconnect
Problem is, from time to time my app stops in serial.connect command returns error
whenever this happens, i can not start my application again, sometimes i can not even turn off bluetooth.
It looks like SERIAL still hangs on BT connetion and never release it.
Only solution is to reboot the tablet, and my app happily starts again.
Anybody expierenced similar problem or might enlighten me and send me the right way ?
Trouble is this error is very hard to reproduce when i try on purpose. It is one of those errors they start with SOMETIMES ....
I woudnt be bothered if it is some stupid chat app, but this should control the big seeding machine out on fields.
Thank you
San
I have a BT communication using async stream with prefix mode to communicate with microntroller control box.
I took me a while to "HACK" the commucation. After a while i totally gave up to fix any async stream errors they might pop up. Communication is now runs in separate process and whenever i expierence any problem, i just simply kill the process, restart control box streaming and start communication process again.
When i am killing the process i try to clean and sweep after myself. e,g,
Asyx.Close
Ser.StopListening
TimSer.Enabled = False
Ser.Disconnect
Problem is, from time to time my app stops in serial.connect command returns error
at android.bluetooth.BluetoothAdapter.createNewRfcommSocketAndRecord(BluetoothAdapter.java:1035)
whenever this happens, i can not start my application again, sometimes i can not even turn off bluetooth.
It looks like SERIAL still hangs on BT connetion and never release it.
Only solution is to reboot the tablet, and my app happily starts again.
Anybody expierenced similar problem or might enlighten me and send me the right way ?
Trouble is this error is very hard to reproduce when i try on purpose. It is one of those errors they start with SOMETIMES ....
I woudnt be bothered if it is some stupid chat app, but this should control the big seeding machine out on fields.
Thank you
San