How do I receive arbitrary text over BLE?

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

cross mob
Anonymous
Not applicable

Hello,

I'm working with the PSOC 6, and would like to be able to receive arbitrary text, as sent from an Android Bluetooth terminal. For now, I'd like to be able to view the received text over the USB UART.

This should be very easy to do, but I simply can't figure out how to operate the BLE infrastructure. I would greatly appreciate if someone could explain this to me. I just don't know how to receive text, which should be such a simple task. Just pass the received characters into a string, or even reading one character at a time. I don't care how it's processed, I just want to be able to use the Bluetooth to receive data.

All the online examples I can find are either relating to the "Find Me" project, which can only receive one of three state-commands, or they involve transmitting from the PSOC rather than receiving.

Thank you!

0 Likes
1 Solution
MeenakshiR_71
Employee
Employee
100 likes received 50 likes received 25 likes received

Hello tjmurphy_3334186​,

Just wanted to check your requirement,

A. Do you just want to send text from your phone or PC (from the CySmart app/tool) and receive it in PSoC?

B. Or do you want a Serial over BLE sort of interface, which you can receive/send through a terminal?

If you need option A, then you can do that simply by creating a custom service (see the post here). Once you have your custom service defined and included in your project. You can simply connect to the device from the CySmart App (mobile) and go to the GattDB tile. The custom services are listed as "Unknown services" in the GattDB page. You can identify your service/char using the UUID assigned by you. You can then send Hex or ASCII value to and read hex/ascii values from that particular service from the app.

If you need option B, then I can help you with a simple example (custom Serial-over BLE service that works with our CY5677 dongle).  We will be releasing the proper example later but I can help with a version that I use for my testing - might be a bit messy

Let me know your inputs.

Regards,

Meenakshi Sundaram R

View solution in original post

0 Likes
1 Reply
MeenakshiR_71
Employee
Employee
100 likes received 50 likes received 25 likes received

Hello tjmurphy_3334186​,

Just wanted to check your requirement,

A. Do you just want to send text from your phone or PC (from the CySmart app/tool) and receive it in PSoC?

B. Or do you want a Serial over BLE sort of interface, which you can receive/send through a terminal?

If you need option A, then you can do that simply by creating a custom service (see the post here). Once you have your custom service defined and included in your project. You can simply connect to the device from the CySmart App (mobile) and go to the GattDB tile. The custom services are listed as "Unknown services" in the GattDB page. You can identify your service/char using the UUID assigned by you. You can then send Hex or ASCII value to and read hex/ascii values from that particular service from the app.

If you need option B, then I can help you with a simple example (custom Serial-over BLE service that works with our CY5677 dongle).  We will be releasing the proper example later but I can help with a version that I use for my testing - might be a bit messy

Let me know your inputs.

Regards,

Meenakshi Sundaram R

0 Likes