05-04-2016 06:28 AM
My goal here is to use sbrio (sbrio9606) to transmit signal via bluetooth to another bluetooth module (For testing: I use Tere Term to receive signal)
As there is no specific port for bluetooth transmission in sbrio9606, I guess it would be the same to connect my bluetooth module (HC-06) to the RS232 port of sbrio9606. So I did this, and ran the Basic Serial Write and Read.vi as the following post of the forum that I refered to.
So here is the case:
My computer connects sbrio9606 with enternet cable, sbrio9606's RS232 connects with HC-06, HC-06 is paired with my computer. (Like a loop)
Also, only 2 pins of RS232 I used:
RXD to HC-6's TXD
TXD to HC-6's RXD
And the results... I would say it is a success? But whatever the signal received is not the same as transmitted. I captured and made as pdf
On the left is the transmitting signal, and you could see what i receive on the right
Like
Tx: #6 Rx: n
Tx: 1f Rx: g
Tx: 19 Rx: g
Is that some kind of code? ASCII or whatever but it does not look like any code to me. Seems that only at least two char as input could result in one char as output, and the second char is irrevalent (Same output obtained when Tx = 1f or 19
Anyone could me about this please? Or tell me the alternative way to connect bluetooth module to sbrio in a right way. Thanks a millions!
05-04-2016 06:42 AM
You really should connect to grounds as well for the serial communications. Nothing else is making any sense in my head.
05-04-2016 06:49 AM - edited 05-04-2016 06:51 AM
Oh yes forgot to mention.. when I connect the ground of RS232 to the ground of the bluetooth module(HC-06), the following error popped out. To eliminate the error, I have no choice but either disconnect the ground, or the RXD of RS232. Anyway, same nonsense output received.
I know it is not making any sense of not connecting the ground...
PS: 2 bytes read when the error popped out, the read string is \00. Does it mean anything?
05-04-2016 07:07 AM
@chifai wrote:PS: 2 bytes read when the error popped out, the read string is \00. Does it mean anything?
Actually, that is just a single 0x00 byte.
At this point, I would try to get it to work with a Windows serial port. Slightly easier to debug that way. You could also try with another terminal session on Windows to see if the data gets outputted correctly there.
05-04-2016 07:12 AM
I have tried to use window's bluetooth to pair with the HC-06 connected to Arduino UNO first. Also tere term as serial terminal, it works. Which I transmit a signal and I get the same signal back.
Then I tried to use labview, the Basic Seria Write and Read.vi as serial terminal to transmit signal to HC-06 connected to Arduino, it works as well.
And now it did not work when I connect HC-06 to the RS232 port of sbrio9606....
05-05-2016 07:36 AM
I reckon the weird message received is due to the different bits of data transmitted from RS232 and received by bluetooth? But I am doing fine with the Arduino. I am a mechanical guy and dont know much about data communications.. so desperated here right now 😞