Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

Bluetooth connection on myRIO

Hello,

Can someone help me with bluetooth interfacing with myRIO? I am using NI myRIO 1900 along with Bluetooth module RN-42 PmodBT2 provided by Digilent, I would like to establish BT connection between the Shimmer -sensing device- and the myRIO for streaming signals to LabVIEW in real time, and I have not found any proper documentation to assist my application.

 

Thank you!

0 Kudos
Message 1 of 12
(9,723 Views)

The device is a UART connection, have you figured out how to connect it to the UART/serial pins on the myRIO? As for the interfacing, have you read the documentation for the device from the manufacturer about the protocol you need to use with NI-VISA on the myRIO?

 

Also, a quick google search throws up this: http://www.instructables.com/id/Controlling-Servos-via-Bluetooth-RN-42-and-LabVIEW/


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 2 of 12
(9,719 Views)

I believe that with myRIO things are different. I read that I should install a bluetooth driver like Bluez, however, when I try to install it using putty, an endless loop of dependencies appear, such that bluez requires Glib, and Glib requires zlib and libffi. I successfully installed zlib but I failed installing libffi since makeinfo command is missing, which directed me to install Texinfo that misses aclocal and needs automake, also automake can't locate aclocal!!  

 

Any sugestions?

0 Kudos
Message 3 of 12
(9,691 Views)

Where did you read that you would need to install that driver? I haven't found anything about those dependency issues, but there have been other forum posts about trying to install Bluez. I would look into those to see if anybody else encountered that.

 

You may also have luck posting your question in the Linux RT User Group on the forums. Since you're using a bunch of third party devices, we don't really have the documentation on configuring this set up. Hopefully one of them has worked with third party bluetooth devices on myRIO and could let you know what worked for them!

 

NI Linux Real-Time Community

https://decibel.ni.com/content/groups/ni-linux-real-time

Eden K
Applications Engineer
0 Kudos
Message 4 of 12
(9,656 Views)

Where did you read that you need to install something like Bluez to use the PmodBT2? The datasheet/reference manual says it has a 'simple UART interface' which implies you can communicate with it using one of the myRIO UART ports and then use NI-VISA. The difficulty will be with implementing the serial protocol the device uses - you should be able to find documentation on this from the manufacturer. I found some information here: 

 

 

https://reference.digilentinc.com/pmod:pmod:BT2
https://reference.digilentinc.com/_media/pmod:pmod:pmodbt2_rm.pdf

 


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 5 of 12
(9,646 Views)

I have successfully connected my RN-42 module to the myRIO and to the Shimmer sensing device. I also managed to start streaming data all using NI VISA and following Shimmer framework code. Now when I try to read data from the sensor I recieve awkward hexadecimal stack of data as attached files show.

I tried using Shimmer library example in LabVIEW "Shimmer Plot and Write" but instead of inserting the COM port, establishing the connection using NI VISA as attached but it did not work. 

How can I extract acceptable data from it?

Download All
0 Kudos
Message 6 of 12
(9,490 Views)

What commands are you sending to the device? Did you find a list of commands that the device accepts?

Eden K
Applications Engineer
0 Kudos
Message 7 of 12
(9,461 Views)
Yes I did, through the frameworks source code provided by Shimmer sensing company. For the time being I am using 0x07 is written to start streaming and 0x20 is used to stop streaming.
0 Kudos
Message 8 of 12
(9,458 Views)

So is it that you want to read the data back in a non hexadecimal format? Or is it that the data you're getting back doesn't seem to be accurate or valid data?

Eden K
Applications Engineer
0 Kudos
Message 9 of 12
(9,443 Views)
Both. The shimmer device is a multi sensor that acquires different types of signals (the one needed for my application is low noise tri-axial acceleration and ECG), the data also includes signals names and number of received and missed packets.
This link includes in its "readme.txt" file some details on the data packets:
LogAndStream firmware :https://github.com/ShimmerResearch/shimmer3/tree/master/apps/LogAndStream
BtStream firmware: https://github.com/ShimmerResearch/shimmer3/tree/master/apps/BtStream
0 Kudos
Message 10 of 12
(9,432 Views)