- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
this is my 2nd discussion and as I asked a bit too unprecisely in my 1st one, I want to make it better now.
I am trying to implement a lux sensor on my psoc 4 ble kit but I just don't understand how to implement the services and how to start the main.c program.
At the moment I am trying to understand the API's for the BLE module but some are just unclear and not really documented in the documents where they should be.
So can some please give some advice and help on my way to get this thing done.
I am currently putting 6-7 hours a day into this project but without help I am lost.
Thanks
Chris
Solved! Go to Solution.
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Chris,
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).
Thanks,
PSYU.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Chris,
Can you please send me the document specifications of your LUX Sensor.
Please refer the document Getting Started with PSoC 4 BLE for more information on BLE.
And also refer the section BLE Component APIs in this document for more information on different APIs.
Thanks & Regards,
PSYU.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is the link for the specifications.
http://www.blehome.com/SensorBug%20Interface%20Specification%20v1.3.0.0a.pdf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Chris,
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.
http://www.cypress.com/file/140826/download
Thanks,
PSYU.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
thank you.
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.
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Chris,
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.
Thanks,
PSYU.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
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?
Thanks
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Chris,
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).
Thanks,
PSYU.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
https://github.com/cypresssemiconductorco/PSoC-4-
BLE/tree/master/100_Projects_in_100_Days/Day003_Custom_Profile_CapSense_RGB_LED
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".