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

PSoC™ 6 Forum Discussions

aliissa02
Level 4
Level 4
5 likes given 25 replies posted 50 sign-ins

Hello

I am using PSOC 6 and I want to establish a BLE connection and send data to mobile device. Please note that I have my own mobile app and wont be using cysmart. I have attached my project. I have already used 

https://github.com/Infineon/mtb-example-psoc6-ble-throughput-freertos

but it didnt work. Can you please help?

 

0 Likes
18 Replies
Yugandhar
Moderator
Moderator
Moderator
1000 replies posted 5 likes given First comment on blog

Hello @aliissa02 ,

The project which you are referring from the Github is MTB based project. For PSoC Creator, you can refer to the code examples (CE222046_GATT_OUT, CE215119_BLE_Battery_level) from the PSoC Creator. Please note that C++ is not supported by PSoC Creator.

Thanks,
P Yugandhar.

0 Likes
aliissa02
Level 4
Level 4
5 likes given 25 replies posted 50 sign-ins

 

Hello,

Your example only works with psoc 4 and not 6.

Thank you

0 Likes
Yugandhar
Moderator
Moderator
Moderator
1000 replies posted 5 likes given First comment on blog

Hello @aliissa02 , 

Please refer to the attached GATT_OUT code example from the PSoC Creator. You can check this code example with your application. In the mobile app, when you click on the 'Notify' then it will send the data to the mobile.

Thanks,

P Yugandhar. 

0 Likes
aliissa02
Level 4
Level 4
5 likes given 25 replies posted 50 sign-ins

Thanks for your reply. I am getting the error attached. If you can please edit my file that I uploaded earlier.

0 Likes
Yugandhar
Moderator
Moderator
Moderator
1000 replies posted 5 likes given First comment on blog

Hello @aliissa02 , 

Please download and install the latest PDL (3.1.5) from this link. 

Thanks,

P Yugandhar. 

0 Likes

Thanks for your reply. I am still having the same problem. It is still not working. All other projects that I have are working except this one.

0 Likes
Yugandhar
Moderator
Moderator
Moderator
1000 replies posted 5 likes given First comment on blog

Hello @aliissa02,

In your PSoC Creator project, go to Project > Build Settings > Peripheral Driver Library. Make sure the PDL path exists based on the version you installed.

Yugandhar_0-1673009967195.png

 

Thanks,
P Yugandhar.

0 Likes
aliissa02
Level 4
Level 4
5 likes given 25 replies posted 50 sign-ins

Thank you very much for this. It is working now and I was able to program the psoc device. However, I am not able to see the device when I scan BLE devices around me on the mobile phone. Also, how can I send data to the mobile phone?

Thank you

0 Likes
Yugandhar
Moderator
Moderator
Moderator
1000 replies posted 5 likes given First comment on blog

Hello @aliissa02 ,

Once you program the device, then it will advertise with GATT_Out name and address as shown below.

Yugandhar_0-1673025948684.png

If you didn't see the device advertising in your mobile app then please check with any of the BLE Apps like LightBlue once.

After you connect the device with your app, then click on the 'Notify' to receive data in the mobile.

Thanks,

P Yugandhar.

0 Likes
aliissa02
Level 4
Level 4
5 likes given 25 replies posted 50 sign-ins

Hello,

Thanks for your reply. I still cant see it when I scan BLE. I have tried different phones and apps but cant find it.

0 Likes
Yugandhar
Moderator
Moderator
Moderator
1000 replies posted 5 likes given First comment on blog

Hello @aliissa02 , 

Are you using the Infineon Dev board or custom board? If you are using the custom board, then please share your schematic files.

Please open the Tera-term and check whether you are able to see the Advertising print or not as shown below.

Yugandhar_0-1673148834077.png

Thanks,

P Yugandhar. 

0 Likes

Hello,

 

Thanks for your reply. This is exactly what's happening. The actual board works but using my custom board, it doesn't. I have attached the schematic of the custom board.

Thank you

0 Likes
Yugandhar
Moderator
Moderator
Moderator
1000 replies posted 5 likes given First comment on blog

Hello @aliissa02

From your schematic files, i didn't see the WCO Crystal used.

In the code example, by default WCO will be enabled as LFCLK source for low power application, so you can either change to PILO clock (for LFCLK) and check or disable the BLE Low-power mode in the BLE component and check your application.
Please note that it is not recommended to use the PILO clock for the BLE low power application. It is recommended to use only WCO for the low power application. For more information, please refer to the BLE component datasheet and BLE_PDL documentation (Right click on the BLE Component to find the datasheets).

Thanks,

P Yugandhar. 

0 Likes

Okay, thank you for this. But what is a WCO crystal? can you please provide more information about it? and do you think that I shoukd redesign my board?

 

Thank you

0 Likes
Yugandhar
Moderator
Moderator
Moderator
1000 replies posted 5 likes given First comment on blog

Hello @aliissa02 ,

Watch Crystal Oscillator (WCO) is an external high accurate 32.768-kHz clock source. It is the primary clock source for the RTC. The WCO can also be used as a source for CLK_LF. If you want the BLE low power operation, then WCO must be selected as the LFCLK source for proper BLE timings during low power mode. If you want to use the PILO instead of WCO, then they are some limitations, which you can refer from the BLE PDL documentation.

Thanks,
P Yugandhar.

0 Likes

Hello,

 

Thank you for your reply. I have added the WCO to my schematic and I will produce a new board. Can you please check my new schematic? Do you think that it will work like this?

Thank you

0 Likes
Yugandhar
Moderator
Moderator
Moderator
1000 replies posted 5 likes given First comment on blog

Hello @aliissa02 , 

Schematic looks good. How are you connecting the VBACKUP in the schematic?  VDD and VBACKUP may be shorted together externally. They are not required to be separate input voltages. Please refer to the page 18 in the CYBLE-416045-02 datasheet. 

For reference, you can refer to the CY8CPROTO-063-BLE PSoC 6 BLE Prototyping Kit schematic files.

Thanks,

P Yugandhar. 

0 Likes

Hello,

Regarding the VBACKUP, this pin is connected directly to the battery terminal (nominally 3.7 V), bypassing all the power management circuity. I did this to ensure that VBACKUP is always suppled, even when the device is turned off.

Thank you

0 Likes