Can I use the CY8CKIT-042-BLE-A kit to write a peripheral on the PC

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

cross mob
BrRe_4481111
Level 1
Level 1
5 replies posted First reply posted Welcome!

This is a very basic question. Can I call methods on the CY8CKIT from the PC such that my peripheral application RUNS ON THE PC and uses the CY8CKIT like a Bluetooth dongle? Our needs are to write a large battery of automated (black-box) tests that test a BLE health collector. We do not want to have to load a test onto the chip, run, erase, and load the next, etc. and repeat that task 1000 times. The RL78 BLE from Renesas allows you to do this but they have a major short coming in their implementation, the chip APIs do not signal the peripheral when the collector is making a characteristic read. This shortcoming is severe enough for the implementation of a stand-alone peripheral, forget any test application.

Clearly for a test application we need the low level control that the CY8CKIT would normally bring. Is there a better alternative for our use case?

Thanks,

Brian

0 Likes
7 Replies
VenkataD_41
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi Brian,

Cypress provides pre-programmed BLE solutions called "EZ-Serial" for BLE and BT modules. Using this application, you can configure PSoC through AT commands through Serial terminal. I think this is what you are looking for at high level. Please go through EZ-Serial from the link below:

https://www.cypress.com/documentation/software-and-drivers/ez-serial-ez-ble-module-firmware-platform

"The RL78 BLE from Renesas allows you to do this but they have a major short coming in their implementation, the chip APIs do not signal the peripheral when the collector is making a characteristic read."

--> In the above sentence do you mean "Central" by the word "collector"? If yes, do you want to know when the peripheral is being read/

Thanks

Ganesh

0 Likes

Yes I mean 'Central'. Same function as 'collector' depending upon which world of jargon you come from.

I am looking to call all the APIs on the Cypress as if I were writing code on the Cypress, but call them from the PC. So when the BLE chip signals an event I get the event in the PC application and handle the event in the PC application.

0 Likes

After taking a look at https://www.cypress.com/documentation/software-and-drivers/ez-serial-ez-ble-module-firmware-platform

It does not seem what I need. I need to write C code on the PC and compile the application using Visual Studio. The application needs to access the BLE APIs on the Cypress. Looking at the documentation is says no Bluetooth stack knowledge needed and it looked like one did the work by sending AT commands. This application needs to control all the functionality a BLE server would need; getting signaled GATT and GAP events, (including GATT read operations) handling pairing, advertisement configuration, etc.

I may have misunderstood as I have not made a deep dive. Seeing the 'no Bluetooth stack knowledge' and send 'AT commands' sounds more like scripting with no control over the actual server.

Am I misunderstanding? Do I have full control over the BLE functionality via a C application?

0 Likes

Hi Brian,

I now understood your requirement. EZ-Serial doesn't serve your purpose because EZ-Serial devices runs application on top of stack and access the external world AT commands which are not actual stack events.

For your application you need to use only BLE controller part of the chip and the host should be your PC. The host controller interface (HCI) can be UART.

Tools like BlueLiteCommander or Bluetool can be used to send HCI commands to the BLE controller directly through GUI. You can probably look at the source code of that tool and can develop your application accordingly.

Please look at the HCI documentation section Volume 4 of the BLE core spec.

Cypress have a code example that tells how to configure the PSoC in controller mode and interface it to external host through UART interface. Please refer Day_018 code example and the corresponding documentation from the PSoC BLE example projects GitHub page.

PSoC-4-BLE/100_Projects_in_100_Days at master · cypresssemiconductorco/PSoC-4-BLE · GitHub 

Thanks

Ganesh

0 Likes

It is possible to interface at a higher level like GATT and GAP? That usually provides sufficient control to do what the application needs to do (if the GATT level supports eventing the application when the client attempts a read of a characterisitc).

0 Likes

Hello Brain,

Apologize for the late response. Could you please refer to the CySmart Windows host tool in this link which is used to enable custom GAP-Central application development on windows PC using CySmart APIs, but the source code for it is confidential. Please refer to the below thread for a sample code for using CySmart C# APIs which might be helpful.

Thread link: CySmart API C# example

Please let me know if this helps.

Thanks,

P Yugandhar.

0 Likes

P Yugandhar,

I have long since moved to the Nordic. There I can do what I need to do. Thanks for your response.

Brian

0 Likes