Using Cy5677 USB dongle with LabVIEW

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable
        Hi, I have a cy5677 USB dongle which I have to use to collect data from one of the BLE device. My aim is to read the data from BLE device to a LabVIEW program. For this I have to control the dongle from LabVIEW software. I have the CySmart API DLL's. LabVIEW will allow calling the Cysmart .net c# api DLLs. Being a newbie yo c# , I don't really understand which all functions/methods has to be used to establish the connection to dongle and to BLe and read the data. I have read through the API manuals. But not sure about the steps to achieve this. Can some one just list out the sequence functions/classes/methods to be used from the API DLL. It will be really helpful if someone has already done this using LabVIEW and is willing to share some code. I look forward to the replies. Regards Deepu   
0 Likes
1 Solution
Anonymous
Not applicable

I haven't seen anyone using labview with a cypress chip yet, but there are multiple C# threads about implementing BLE connections and sending/receiving data.

View solution in original post

0 Likes
9 Replies
Anonymous
Not applicable

I haven't seen anyone using labview with a cypress chip yet, but there are multiple C# threads about implementing BLE connections and sending/receiving data.

0 Likes
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hi Deepu,

   

 

   

Please find Cysmart API example project from the following forum , post 5: http://www.cypress.com/forum/proc-ble/cysmart-api-c-example

   

Thanks,

   

Anjana

0 Likes
Anonymous
Not applicable

Hi Anjana,

   

I already had a look at it. I'm not an expert in C#, but i could still understand the code. If i'm not wrong new classes are created within C# code. Unfortunately LabVIEW won't allow creating classes directly in its environment from a .net API DLL. However LabVIEW allows creating instances of objects/classes defined in the .net dll and then operates on the properties or methods.

   

I believe the best workaround is to create a wrapper code in C# embedding the CySmart api dll and then create a .net library/assembly from it and then calling the wrapper dll/assembly in labview. But i don't know how to create  work on C# to create wrapper code.

   

If you haven't understood well, please have a look at this post on NI forms which discusses the issue.

   

https://forums.ni.com/t5/LabVIEW/BLE-Bluetooth-NET-API/m-p/3307221

   

 

   

Thanks
​Deepu

0 Likes
Anonymous
Not applicable

Hi,

   

Any updates on this?

   

 

   

Thanks

0 Likes
Anonymous
Not applicable

Are you confused on creating a class in C#? Or on specifics of the implementation? I should imagine the all powerful internet has examples on creating C# classes, and thus you can wrap the functions into the class yourself. It writes similar to C++ and .net code if you are familiar with those languages.

0 Likes
Anonymous
Not applicable

Well, I'm more used to C. of course i did search the internet for C# examples. But i don't have any C# IDE like visual studio on my pc at the moment. Anyway i will install it and try to make the wrapper myself. I'm not that clear about implementation also. But would it be possible for someone to list out the sequence of operations/methods required to connect to dongle. An insight into what i'm trying to achieve is given below.

   

1. Connect to USB Dongle.

   

2. Connect to BLE Device/sensor

   

3. Enable Transmission of a certain data from BLE sensor.

   

4. Continuously read data from BLE sensor.

   

5. When the user decides to stop, close all connection and exit.

   

Note: I have the UUID for various steps that are specific to the BLE sensor

   

Thanks

0 Likes
Anonymous
Not applicable

If I find time this weekend I'll try to give a shot at making a sequence of API calls for you. No promises though 🙂

0 Likes
Anonymous
Not applicable

Thank you. That would be a lot helpful. I'm also working in parallel

0 Likes
Anonymous
Not applicable

Here's a link to a post that contains CySmart examples that should help, at least with some basics 🙂

   

http://www.cypress.com/forum/proc-ble/cysmart-api-c-example

   

​Since the two examples demonstrate: scanning, connecting, accessing the USB dongle, and writing to a characteristic I figure you should be able to get going from this 🙂

0 Likes