LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

apparently "Bluetooth Write" does not write

Hi Keith,

The device is a Bluetooth 16-Channel 8-Bit/12-Bit Analog to Digital Converter, part # ZAD1216ProXR_ZBT from www.controlanything.com. It works as expected when I send strings to it with a regular terminal. 

I am a bit confused about the link you posted, it described tricks on how to install drivers for an external Bluetooth adapter. The computer I am running LabView on has an internal adapter which I have used successfully multiple times.

It would be dissapointing not to be able to intergrate he device with Labview. All that has to be done is open a connection and then send strings, nothing fancier than that.

Thanks,

C

0 Kudos
Message 11 of 20
(1,078 Views)

Codrin,

 

I completely understand where you are coming from.  The reason I had asked about whether or not you are using the Standard Windows Bluetooth driver was because that is the only driver that allows LabVIEW to work with your Bluetooth device.  Even if you had gotten it to work before with the computer, it will not be accessible from LabVIEW unless that particular driver is being used.  What I am trying to determine is what might be happening in this particular VI that you have written that keeps you from being able to communicate (write) with your device.  To verify a few things: You have successfully managed to communicate with your device using the example code in LabVIEW, correct?  Both the Simple Server and Simple Client sample codes have worked successfully for you?  

 

Secondly, because you are accessing your device via Serial commands, have you tried communicating with your device via a virtual serial port?  This utilizes serial commands as opposed to the bluetooth commands, but works in a similar fashion.  A link to how to do this can be found here:

 

http://zone.ni.com/reference/en-XX/help/372508C-01/lvpdagsm/pda_bluetooth_vserial/

 

If you keep having issues with Bluetooth Write, it could provide a valid workaround for you to try.  Please let me know as far as the first questions are concerned and we can see if there is a way to determine if LabVIEW is successfully communicating.  Something else you could try would be trying to run the Advanced Bluetooth examples, as those will utilize more of your device's functionality and may be better to help us determine if you are fully able to communicate with your device in LabVIEW.

 

Regards,

 

Keith M.

Applications Engineering

0 Kudos
Message 12 of 20
(1,068 Views)

Keith,

Thanks again for your feedback. I am tempted to say that the system uses the manufacturer drivers and this may indeed be the issue. How can you actually tell whether the Windows Standard Driver is installed? I have attached a couple of screenshots with my BT hardware profile to help with the question.

 

As far as testing the A/D device with the Simple Client/Simple Server is concerned, I was able to recognize the device and the available services. I was not, however, able to exchange data with the A/D board. On the other side, these examples do not query the device with the right strings. Just to confirm, is this a successful test? On the other side, my code emulates very well the examples and the device does not respond even when the right query. There seem to be a problem with strings not being send through the port, though. 
Cheers,
C
Download All
0 Kudos
Message 13 of 20
(1,054 Views)
Are you doing this in an XP VM on Mac hardware/MacOS host?
0 Kudos
Message 14 of 20
(1,047 Views)

The screenshots were taken from an XP VM. I have tested the code on a native Windows 7 machine with exactly the same symptoms.

Thanks,

C

0 Kudos
Message 15 of 20
(1,036 Views)

Codrin,

 

I can verify that LabVIEW bluetooth only works with devices that are compatible with the Microsoft Bluetooth drivers.  Refer to the Microsoft Web site for Bluetooth devices that are supported by the Microsoft Bluetooth driver. Most Bluetooth devices come packaged with a proprietary Bluetooth driver. To use the device with LabVIEW, the Bluetooth adapter must be using a driver that comes from the Microsoft Bluetooth driver stack.  The drivers from Windows XP SP2 can be found in the following link (I was unable to find those that come with SP3):

 

http://support.microsoft.com/kb/841803

 

It does not appear that your device is using a driver from those listed on the following link.  What I would suggest doing is going to the Windows help page to determine if your device could potentially work with the Windows drivers. 

 

Keith M.

Applications Engineer

0 Kudos
Message 16 of 20
(1,029 Views)

With regards to the XP VM... I've tried bluetooth through the internal BT module in a Win2K VM without much success (targeting bluetooth serial port CAN/OBDII adapters).  Had much better luck with an external USB adapter, I've used IOGear and BlueAnt adapters both with good results.  Install the drivers and bind the device to the VM so windows treats it as if its plugged in, rather than going through the VM layers into the Mac's BT stack.

 

But as with anything hardware, it's usually a lot easier/less headaches to do the interface on the actual metal box rather than in a VM.  They're good, but not *that* good yet.

0 Kudos
Message 17 of 20
(1,026 Views)

Hello,

I've connected the Simple Client to the Simple Server using two different machines and they ran flawlessly. That pretty much gets the drivers off the hook, both on the VM XP and the native Windows 7 that were part of the test.

I have also learned that the Portmon test is not relevant, either. On some BT adapters it captures the communication, on some it doesn't. This is something do not understand but I am old enough to accept that there are puzzles I can leave unsolved.

It seems that everything boils down to string formatting. Any suggestions?

Cheers,

C

0 Kudos
Message 18 of 20
(1,008 Views)

Ultimately, I have to send two bytes: the DEC value of the first byte is 254, the value for of the second is 197. Ultimately, the question is whether "Bluetooth Send" does anything to the strings provided as input.

Thanks,

C

0 Kudos
Message 19 of 20
(1,001 Views)

I had some problems using the BT serial profile and com port running on a Windows 7 VmWare.

 

I think the issue is related to BT automatic powerdown, that casues the VmWare serial port to enter some sort of stale irrecoverable state.

Try first unpairing, then pairing the device as fast as possible after poweron (before the BT device goes into low power mode) run the program in LV.

Once things are up and running it usually works.

 

Not sure if this fixes your TX issue, though.

 

Br,

 

/Roger

 

0 Kudos
Message 20 of 20
(992 Views)