LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with HC-05 bluetooth module and LABVIEW + LINX- doesn't work

Good morning,

 

I have created (copying it) a labview file using LINX to turn on and off a led through a HC-05 bluetooth module and arduino uno.

Unfortunately it doesn't work.

Below the steps I have followed.

1- Create an association with HC-05 module.

2 - Created VI and set the COM7 (one of the two bluetooth port) as serial port and set the baud rate to 9600 (i have checked is the correct working baud rate of the HC-05)

3 - Uploaded the firmware (Click Tools»MakerHub»LINX»Firmware Wizard…) unplugging in the meanwhilearduino tx and rx pins (i have tried also with these pins plugged)

The firmware has been uploaded using bluetooth (no error displayed)

5- Reconnect tx and rx pins.

6 - If I try to click the stop button an error pop up.

 

When I launch the VI the HC-05 seems to be connected (1 blink every 2 seconds).

I have also checked in notification and seems to be connected.

 

Thanks 

 

Kind regards

0 Kudos
Message 1 of 11
(5,639 Views)

Good evening,

in attachement the file .vi

0 Kudos
Message 2 of 11
(5,539 Views)

Was this question every addressed. Can the HC-05 be initialized with LabView and Linx? 

0 Kudos
Message 3 of 11
(4,292 Views)

The HC-05 needs to be configured using any standard terminal program like Tera-Term. You need to set up things like master/slave mode, paring, serial parameters, paring pin, etc. 

 

Here's a link to a good HC-05 Wiki 

 

Once an HC-05 is properly configured and paired with your computer. You computer should install a virtual com port and the Bluetooth part becomes transparent. Communicating through the VCP/BT/HC-05 will be no different than communicating through any other serial connection.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 5 of 11
(4,246 Views)

in this youtube video they didn't do any master/slave configuration   https://www.youtube.com/watch?v=vqr7M266u6U 

I couldn't recreate this project as in this youtube video.

I am getting following error whenever I try executing the operation exactly as in this youtube video

Error -1073807246 occurred at Property Node (arg 1) in VISA Configure Serial Port (Instr).vi->LMH-LINX.lvlib:Device.lvlib:Serial Open.vi->LMH-LINX.lvlib:Device.lvlib:Initialize Device.vi->LMH-LINX.lvlib:Initialize.vi->LMH-LINX.lvlib:Open Serial.vi->LINX - Blink (Simple).vi



Error 5003 occurred at :

Open Serial.vi >>
Initialize.vi >>
Initialize Device.vi >>
Synchronize.vi

 

Possible reason(s):

LabVIEW was unable to connect to the LINX device using the following settings:

Interface: Serial
COM Port: COM11

Please make sure that the LINX firmware is loaded on the device (Tools>>MakerHub >>LINX>>Firmware Wizard) that there are no other open connections to the device, then check the configuration settings, and try again.

If this error persists please search, then post on the LINX forums at 



mivytech_0-1657722791642.pngmivytech_1-1657722800415.png

 

mivytech_2-1657722812400.pngmivytech_3-1657722819579.pngmivytech_4-1657722827714.png

 

 

 

0 Kudos
Message 6 of 11
(4,240 Views)

It assumes the HC-05 has been properly configured prior to setting up LabVIEW and LINX.

 

You will find most of these homemade videos and tutorials for using the HC-05 and HC-06 with an Arduino are crap.

 

Case in point: I did an Arduino project with them years ago and every tutorial I saw made it look like the HC-05 was a 3.3 volt device that needed level shifting. While sure the actual HC-05 module is a 3.3 volt device the carrier board they put them on has a 3.3 volt regulator and level shifting on it so they can work directly with 5 volt Arduinos .

 

Try this https://www.instructables.com/How-to-Configure-HC-05-Bluetooth-Module-As-Master-/

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 7 of 11
(4,234 Views)

Thank you RTSLVU (Trusted Enthusiast) for your prompt response, the clarification and the resources.

Since I just have one HC-05, should it be master or slave configured?

0 Kudos
Message 8 of 11
(4,224 Views)

@mivytech wrote:

Thank you RTSLVU (Trusted Enthusiast) for your prompt response, the clarification and the resources.

Since I just have one HC-05, should it be master or slave configured?


If you are paring the HC-05 to your computer then your computer will be the master and the HC-05 will be the slave.

 

The only difference I can recall between master and slave is the master can initiate BT paring but a slave can not.

 

Here's my old document from when I was playing with these 

========================
=== Engineer Ambiguously ===
========================
Message 9 of 11
(4,214 Views)

@RTSLVU wrote:

@mivytech wrote:

Thank you RTSLVU (Trusted Enthusiast) for your prompt response, the clarification and the resources.

Since I just have one HC-05, should it be master or slave configured?


If you are paring the HC-05 to your computer then your computer will be the master and the HC-05 will be the slave.

 

The only difference I can recall between master and slave is the master can initiate BT paring but a slave can not.

 

Here's my old document from when I was playing with these 





I did configure the HC-05 successfully but still I was unable to communicate with it via linx.

NI VISA package can successfully communicate with HC-05 but not Digilent Linx.

For example I was able to re-create this project: https://www.youtube.com/watch?v=Kw4eOkq1B4k 

But failing to recreate this one: https://www.youtube.com/watch?v=vqr7M266u6U 

mivytech_0-1657835032779.png

 



0 Kudos
Message 10 of 11
(4,165 Views)