LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Bluetooth Serial Adapters

This question may be rather obscure, but here goes...

LabWindows/CVI 6.0
EOS Mobile Crusier Tablet PC running Win2K.
COM 9 = Socket Communications CF Bluetooth Connection Kit installed (PC Type I).
COM 5 = USB to RS232 Adapter followed by an RS232 to Bluetooth Adapter.
Remote device = Oscilloscope with RS232 to Bluetooth Adapter.

My LabWindows/CVI application communicates fine with the scope using COM 5. When COM 9 is used, the application locks up and is declared "Not Responding" by the task panel.

Using a simple terminal emulator, communications works fine on COM 9.

Any clues as to why the CVI application would hang, while the other doesn't?

Thanks.

Scott T.
0 Kudos
Message 1 of 8
(4,716 Views)
Additional Info:

The CVI serial sample application locks up as soon as the last byte is read from the input queue.

If serial data has never been received, then the application times out as expected. Once data is received, the application will lock up when the input queue is empty.
0 Kudos
Message 2 of 8
(4,688 Views)
Hi Scott:

What string are you sending to COM9 and how is the Socket Communcations device expected to respond to it? Also, how does this Bluetooth kit interface with the COM port? Are you running the exact same application with both set ups (COM9 and COM5)?

Thank you,

Emilie S.
National Instruments
0 Kudos
Message 3 of 8
(4,663 Views)
Hi Emile,

The string being sent to COM 9 is "ID?" The Tektronix TDS2024 scope then responds with a long configuration string, (about 40 bytes as a rough guess). Other commands with shorter responses have the same problem.

When the Socket Communications PCMCIA card is installed in the PC (EOS Mobile Cruiser with Win2K), the Bluetooth link is assigned to COM 6. The virtual COM 9 serial port then rides on top of the bluetooth link. The scope has an RS232 to Bluetooth passive adapter. Ideally this should appear as just another serial port to the application.

The CVI application is the same for both setups. The only difference is the COM port selection. For testing I'm using the NI serial sample program, with the port selection expanded from 8 to 20. The application hangs when ComRdTerm() is called from ReadCallBack. (My original application did the same thing).

The data is received into the input queue. If I read one byte at a time, ComRdTerm works fine until the queue is empty. If I read the queue prior to transmitting anything, I get the time out pop up as expected. If I occasionally transmit in order to receive more data, things keep working until the queue is empty.

I tried installing and running everything on an IBM Thinkpad (XP Pro) with the same results.

Any insights are greatly appreciated.

Scott T.
0 Kudos
Message 4 of 8
(4,654 Views)
Hi Scott,

This really sounds like it is a problem with the Socket Communications drivers. This doesn't seem to be a VISA error. It is possible that the state the device is in changes after some amount of time or some event, and when VISA then tries to communcate the resource is closed which causes the program to crash. You may want to contact the manufacturer to find out what state the device goes to when the queue is empty, or if there are any other issues to note with their drivers.

Thank you,

Emilie S.
National Instruments
0 Kudos
Message 5 of 8
(4,624 Views)
Hi Emilie,

I forwarded the concerns to Socket Comm's support team. They've always responded to past inquiries, but it takes a couple days. Will wait and see.

The one lingering question is why do CVI created applications crash, but others don't?

Scott
0 Kudos
Message 6 of 8
(4,600 Views)
End of story:

I gave up on the Socketcom RS-232 to Bluetooth adapters and tried a pair from Brainboxes (Liverpool,UK). These worked fine with CVI.

I now have a Brainboxes PCMCIA card using virtual COMM ports to communicate with two instruments with RS-232 to Bluetooth adapters. Again working fine with CVI.
0 Kudos
Message 7 of 8
(4,413 Views)

Hello,

I have used a Palm OS, Blue2i Bluetooth RS232 Adapter (TDK - Ezurio), a PC and an Oscilloscope. I have written a short code to test the functions but the program has no worked because I should do a short-circuit between the CTS/RTS pins on DB9. This DB9 connector should be connected to Bluetooth Adapter. If I do not this, the program can not send bytes over the 232. They will be stored on the output buffer.

Good lucks,

Marcelo.

0 Kudos
Message 8 of 8
(4,147 Views)