EZ-Serial connection to smartphone

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

cross mob
Anonymous
Not applicable

Is there a simple example project I can give to our app developers to transfer data in SPP mode with the actual EZ-serial software to and from a smartphone with iOS and / or Android? I looked for such an example, as it seems to me the most flexible way to handle Bluetooth transfer for a wide variety of applications, but could not find one, instead I found lots of examples for specialized profiles or beacons. The available specialized Bluetooth-profiles don´t fit to our application, so we decided to use SPP as an extremely flexible solution. Moreover this allowes to use the Bluetooth modules (in our case CYBLE-022001) with the pre-programmed application software.

Ideally it would be just an extremely simple code example to send some text to the module and to receive the answer (and show it on the screen for example), just to show what library functions on iOS / Android to use. The only special requirement is, the code should preferrably handle messages that are longer than 20 bytes automatically (segmentation in several Bluetooth-messages) to avoid any pitfalls regarding segmentation.

Thanks for your help,

Hermann

1 Solution
Anonymous
Not applicable

There are some examples of communication/serial interaction with the EZ-Serial here:

EZ-SERIAL™: EZ-BLE MODULE FIRMWARE PLATFORM | Cypress Semiconductor

The first download (User Guide) has the information you are asking about I believe. It has both peripheral and central example usage.

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

Page 57 has the beginning of the GattC examples.

Page 144/145 has the exact command for reading/writing a remote server attribute/characteristic:

gattc_read_handle (/RRH, ID=6/4)

Binary Header: Type Length Group ID Notes CMD C0 03 06 04 None. RSP C0 02 06 04 None. Text Info: Text Name Response Length Category Notes /RRH 0x000A ACTION None. Command Arguments: Data Type Name Text Description uint8 conn_handle C Connection handle to use for read operation (Ignored in current release due to internal BLE stack functionality, set to 0) uint16 attr_handle H* Handle of remote attribute to read

View solution in original post

0 Likes
5 Replies