LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to interface Labview with smart phones(android) via Bluetooth?

Hi everyone, 

I am new to Labview and i am trying to use Labview interface with android's smart phones via Bluetooth. my program is a timing system, i wan to use smart phones to control my program like turn on and off the switch,start, stop and reset state in my program. I have no idea how to start. has anyone know how to do ?  

 

Thanks,

Sam

Download All
0 Kudos
Message 1 of 5
(13,433 Views)

Hi Sam.

 

I'd suggest you check out this article which explains how we can make use of the Bluetooth Palette in order to perform basic Bluetooth Read and Write processes from within LabVIEW.

 

You can access the Bluetooth Palette by right clicking on the Block Diagram and navigating to Data Communication » Protocols » Bluetooth.

 

The key requirements for setting up a general Bluetooth connection is firstly making sure that we can detect and acquire the appropriate Bluetooth address for your device from within LabVIEW. You'll be able to configure the device address from within the Android OS Settings. To get started, try making use of the Bluetooth Discover VI; this will immediately have you detecting devices within range.

 

For actually communicating custom Bluetooth data from your smartphone, you could either take advantage of one of the apps that are freely available from the Android market or create your own Android Application for transmitting Bluetooth. The benefit of the latter is that you'll have direct control on the amount of data that you transmit from your phone and therefore minimise the overall transmission overhead. This gives you the foreknowledge of how many bytes to read when you're communicating your data via Bluetooth.

 

Within the Bluetooth Palette, you also have access to something called Listeners. These are used when we want avoid a polling-based solution, and therefore only continue with Bluetooth communication upon the asynchronous receipt of data. Consider using these if you're interested in developing an elegant solution!

 

Best of luck!


Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)

Message 2 of 5
(13,406 Views)

Sam,

 

I have been working for the past few months interfacing Android and LabVIEW specifically. From the LabVIEW perspective it's fairly straight forward but to open a continous stream between the two does take some effort. The links that have already been provided were the exact same resources that I used when developing my application so they are very good starting point.

 

I would recommend utilizing a good deal of the Bluetooth Chat tutorial Android provides in order to develop a more slick and nice looking program. This will, however, take some understanding of Java and the Android APIs in order to grab what you need and scrap what you don't. All of this being said if you don't have any experience with Android already...

 

If you do, great! LabVIEW makes it very easy to implement a communication thread and you can almost copy the server example NI provides block for block, throw a while loop around the read/write combo so it continuously tries to read and write and voila! You can send custom messages over the Bluetooth channel to then run to a case structure where you can then run controls off of there or any way that you really want. Once communication is established it is simply to take the controls sent and utilize them.

 

Unfortunately, I am not on a computer that has LabVIEW; however, I'll try to check back and look at your VIs that you posted to see if I can help you with them.

 

Happy programming!

 

Daniel Revier

Message 3 of 5
(13,326 Views)

I was wondering if you have any more updates on this?


@Daniel Revier wrote:

Sam,

 

I have been working for the past few months interfacing Android and LabVIEW specifically. From the LabVIEW perspective it's fairly straight forward but to open a continous stream between the two does take some effort. The links that have already been provided were the exact same resources that I used when developing my application so they are very good starting point.

 

I would recommend utilizing a good deal of the Bluetooth Chat tutorial Android provides in order to develop a more slick and nice looking program. This will, however, take some understanding of Java and the Android APIs in order to grab what you need and scrap what you don't. All of this being said if you don't have any experience with Android already...

 

If you do, great! LabVIEW makes it very easy to implement a communication thread and you can almost copy the server example NI provides block for block, throw a while loop around the read/write combo so it continuously tries to read and write and voila! You can send custom messages over the Bluetooth channel to then run to a case structure where you can then run controls off of there or any way that you really want. Once communication is established it is simply to take the controls sent and utilize them.

 

Unfortunately, I am not on a computer that has LabVIEW; however, I'll try to check back and look at your VIs that you posted to see if I can help you with them.

 

Happy programming!

 

Daniel Revier


 

0 Kudos
Message 4 of 5
(13,230 Views)

Hi i am praveen, i want to access my labview fp with my android mobile by webpublishing . i have tried datadashboard also i can only able to see the indicators i could'nt able to control from datadashboard to labview prog in my pc ..

 

plase suggest some ideas .....

 

thanks...

0 Kudos
Message 5 of 5
(8,746 Views)