1 of 1 people found this helpful
For LUX Sensor to be interface with PSoC 4 BLE we need to create a Custom Profile for that sensor where we can define different Services and Characteristics.
Please refer the document for more information on how to Create BLE Custom Profile.
I read the document and now I understand a bit more.
But now I have some more questions on which I can't find help in all the example projects.
As we want to connect our Psoc with the sensor -> the psoc has to be a GATT Client and a GAP Central
How do I implement the new services from the sensor.
I tried it with the BR Light Service -> there I have 1 service called BR Light Service and 4 Service under it.
That's a bit confusing, as well as I don't understand where I have to put these services.
There is no example project that does anything like this and I have no other sources than your example projects.
Please refer the project Day020_BLE_UART in the GitHub for more information on how two devices are communicated with each other. It has two projects one is Central and other is Peripheral LUX sensor will be peripheral and PSoC is Central.
i read through the document and looked at the project.
But how could me this in any way.
I need to establish a connection from my sensor to my psoc ble baseboard.
I can't do it over UART.
The thing I asked for was, how I implement the services from my Sensor on the board -> the right way because there is no example project for thir.
Also I wanted to know if there is a project where a button triggers the scan function?
Please refer the attached Zip file which has two projects one is Central and otherone is Peripheral project.
In the Peripheral project, BLE component is configured with custom service which has two characteristics. One characteristic has Notify which will Enable/Disable the PWM and other characteristic has Write property where we can write from central device.
In the Central project, if we know the Attribute Handle for a particular Attribute of peripheral (where we write the data) then we can write data to Peripheral without discovering of Attributes. In this project, when we press the switch scanning is started and compares the scanreport with the device(peripheral) scan response data. Once the Peripheral is found connection will be established. If we press the switch second time Central will write the data continuously to the Peripheral (Where we can see the breathing LED in Peripheral side).
A couple of years back Cypress created a list of 100 ble projects in 100 days and these can be found on github: https://github.com/cypresssemiconductorco/PSoC-4-BLE/tree/master/100_Projects_in_100_Days
In my opinion, the day003 project is probably another good option to look at, as that example transfers capsense data to an app using the "notify" option. You can ignore the RGB part.
The BLE code is mostly handled in bleapplication.c
Here you will find a function "SendCapSenseNotification". This is probably a good starting point as you basically want to replicate as a "SendLUXdataNotification".