LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using sbrio to transmit signal via bluetooth module /(RS232?)

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. 

 

http://forums.ni.com/t5/Real-Time-Measurement-and/How-to-connect-to-sbRIO-with-bluetooth/td-p/197041...

 

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!

 

 

Download All
0 Kudos
Message 1 of 6
(3,212 Views)

You really should connect to grounds as well for the serial communications.  Nothing else is making any sense in my head.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 6
(3,203 Views)

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?

BT_error.PNG

0 Kudos
Message 3 of 6
(3,198 Views)

@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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 6
(3,189 Views)

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....

0 Kudos
Message 5 of 6
(3,186 Views)

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 😞

0 Kudos
Message 6 of 6
(3,153 Views)