I am trying to use the low cost Bluetooth RS232 adapters type BT 232B E
1. Using the serial example program by Erel, the unit connects at both ends (Galaxy S2 to Terminal program on PC) but as soon as data is typed at either end, the B4A hangs up with "stopped responding" error.
2. I have tried Erel's B4A program on other BT devices (GPS) and the data flow is ok so the prog and h/w are in order.
3. I have tried the PC end communicating with another PC with a second BT-232B-E and it is ok too, in both directions, and set as Master/Slave and Slave/Master. I have also communicated with a GPS on the PC. So the BT232BE's are ok
4. I have tried scenario 1. with a different BT terminal program (Sena BT Term) and "voila" it works! I can type keys at both ends and the data is transferred.
5. Suspecting that there was some specific problem with compatibility between the serial demo program and the BT232BE, I started trying different things without success....
commenting out the lines,
'Else
' Serial1.Listen
Unpairing and Pairing with the BT232BE
Adding
Dim bt As BluetoothAdmin
to the Process_Globals
and
Serial1.StopListening
to the Disconnect Sub
Using different Connect commands,
Serial1.ConnectInsecure(bt,PairedDevices.Get(l.Get(res)),1)
Serial1.Connect2.........
Serial1.Connect3.........
Each of these connected, at both ends, but no data could be transferred and the Android device hung as soon as a key was pressed at either end.
An annoying thing is that when it hangs, the remote RS232BE remains "connected", with the led lit, and stays in this state as long as the Android BT is switched on. I have to switch off BT, wait for the RS232BE to drop back to discover mode, then switch on BT again before I can test another software change.
Does anyone have any ideas? I have run out and am just looking for suggestions.
1. Using the serial example program by Erel, the unit connects at both ends (Galaxy S2 to Terminal program on PC) but as soon as data is typed at either end, the B4A hangs up with "stopped responding" error.
2. I have tried Erel's B4A program on other BT devices (GPS) and the data flow is ok so the prog and h/w are in order.
3. I have tried the PC end communicating with another PC with a second BT-232B-E and it is ok too, in both directions, and set as Master/Slave and Slave/Master. I have also communicated with a GPS on the PC. So the BT232BE's are ok
4. I have tried scenario 1. with a different BT terminal program (Sena BT Term) and "voila" it works! I can type keys at both ends and the data is transferred.
5. Suspecting that there was some specific problem with compatibility between the serial demo program and the BT232BE, I started trying different things without success....
commenting out the lines,
'Else
' Serial1.Listen
Unpairing and Pairing with the BT232BE
Adding
Dim bt As BluetoothAdmin
to the Process_Globals
and
Serial1.StopListening
to the Disconnect Sub
Using different Connect commands,
Serial1.ConnectInsecure(bt,PairedDevices.Get(l.Get(res)),1)
Serial1.Connect2.........
Serial1.Connect3.........
Each of these connected, at both ends, but no data could be transferred and the Android device hung as soon as a key was pressed at either end.
An annoying thing is that when it hangs, the remote RS232BE remains "connected", with the led lit, and stays in this state as long as the Android BT is switched on. I have to switch off BT, wait for the RS232BE to drop back to discover mode, then switch on BT again before I can test another software change.
Does anyone have any ideas? I have run out and am just looking for suggestions.