This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Scanning for BLE Devices with CC2540 and C#

Other Parts Discussed in Thread: CC2540

I am trying to develop an application with C# to receive advertising packets only. Could someone point me to what is the best way to talk to the CC2540 USB Dongle? I have seen the Health Demo, but is it possible to use the Windows Driver as the Packet Sniffer Software does? But as I can see the code is not released...

Thanks.

  • Hi Luk,

    I think the best way is to look at the BTool and the way it send the commands to setup the CC2540 USB Dongle. You could mimic that behaviour.

    BTool is part of the BLE SDK, www.ti.com/ble-stack

    Best Regards

    Joakim 

  • Hello Luk,

    Another suggestion would be to use one of the serial program examples for C# with the USB dongle as a COM port.

    You could set up the C# code so that sending 's' executes some code, 'r' reads a value of something, etc.  This way you don't have to worry about BLE commands, you are just executing functions based on what is read into the USB port on the CC2540.

    Thanks,

  • I would like that, is there C# sample code we can use to adopt simple application?

  • There's a C# example at processors.wiki.ti.com/.../CC254X_PC_Examples and maybe you can revise it to serve your purpose.
  • Hi

    Just to note these C# code are outdated for Window 10 and VS15, VS17, they have change something in Window 10 that previous code that you have in website no longer works. We know Window 7 is obsleted out as well as Window 8 in due time. We no longer support these window.

    My company already adopting Window 10 and already in process of discontining the older window.

    Was is possible to try some effort to update C# code in particular SPP and HID example, I have tried your example code and it crashed the VS15 in window 10, I'm unsure what causing the problem. However, I'm having difficulties finding suitable C# demo code to get me into window platform easily, even microsoft website has not made clear working solution.

    There lot of C# code that are old Window 7,8 which would not work on Window 10 and modern .NET frameworks.

    Also there is no demo code for android OS from your website, although there already an written app for android that refuse to provide source code. I have not yet working on android app but certain should be easier to implement than window (I hope).

    If you desired to stay ahead the competitor, would it also important to extend support to window/android/apple platform level associated with your wondeful wireless devices?

    Best wishes

    R