1 Reply Latest reply on May 16, 2018 2:44 AM by MeenakshiR_71

    How do I receive arbitrary text over BLE?

      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!

        • 1. Re: How do I receive arbitrary text over BLE?
          MeenakshiR_71

          Hello thmuc_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