I want to send BLE service data to Aduino. Please help me with the source code.

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

cross mob
Anonymous
Not applicable

Hello.

I am a student using PSOC4 BLE KIT. I'd like to apply a simple LED operation.

If I send you a data using Cysmart app by adding a service to BLE, I would like to send a to Aduino via UART to operate in Aduino. How could it not proceed in the source code?

Can you give me a hand?

I have attached a photo to make it easier to understand.

0 Likes
1 Solution

Hello,

    You have not added BLE functionality in your project.

I have attached a modified project here.

Steps for Testing->

1) Program the device.

2) Open the Teraterm/Putty.

3) Open CySmart and Connect to the device named as  "Test".

4) Discover the attributes.

5) Select the characteristics handle " 0x0012"

6)  Write any uint8 value to the characteristics handle " 0x0012" and click on 'Write value'

7) You can see the value on serial terminal.

-Gyan

View solution in original post

0 Likes
9 Replies
GyanC_36
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

Hello,

   Your Arduino code looks okay.

Please check if your UART TX pin from the PSOC4 BLE KIT is connected to correct RX pin on Arduino board.

Also, before connecting the PSOC4 BLE KIT to Arduino board , you can use any serial terminal ( Tera-term /Putty) and can see if you are sending the data correctly over UART ( From CySmart-> PSoC BLE kit -> Serial Terminal).

You need to connect the UART Tx pin to p1.5 to send the data over serial terminal when using PSoC 4 BLE Kit.

-Gyan

0 Likes
Anonymous
Not applicable

The rx and tx pins are in place. I wonder if psoc source code is correct.

0 Likes

Check the PSoC Code with serial terminal before connecting to Arduino.

You can attach your PSoC source Code here as well so that everyone can look into it.

-Gyan

0 Likes
Anonymous
Not applicable

The only code in the picture. Is there any code to refer to?

0 Likes
Anonymous
Not applicable

If all of the design is only within the .cysch image file, then you can attach a minimum archive bundle using the file-toolbar to a post to the forum for others to view the schematic file that you made.

0 Likes
Anonymous
Not applicable

I want to add a custom service to the Cysmart app, so the condition is met in Aduino. I took the letter a as an example. But I don't know how to put data in psoc in Cysmart app.

0 Likes

Hello,

    You have not added BLE functionality in your project.

I have attached a modified project here.

Steps for Testing->

1) Program the device.

2) Open the Teraterm/Putty.

3) Open CySmart and Connect to the device named as  "Test".

4) Discover the attributes.

5) Select the characteristics handle " 0x0012"

6)  Write any uint8 value to the characteristics handle " 0x0012" and click on 'Write value'

7) You can see the value on serial terminal.

-Gyan

0 Likes
Anonymous
Not applicable

It is true that it has been resolved.

However, you can not understand the source code, so please explain the source code.

0 Likes

Hello aoscjw_3264286 ,

     You can find the definition of all APIs used in the Source code from the BLE component datasheet ( Right Click on the BLE component -> Open Datasheet).

-> To understand the BLE protocols ,please refer the below document.

                http://www.cypress.com/file/141171/download

-> Also, you can refer some more code examples from the below link. All projects have their associated documents which describes the particular project functionality.

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

-Gyan

0 Likes