How can I make a central device with a custom profile?

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

cross mob
Anonymous
Not applicable

 I'm working on PSoc 4 BLE. I need to transmit custom data using bluetooth. 

   

So I decided to make a custom profile such as SPP in Bluetooth Classic.

   

I could make a peripheral(GATT server) device with my custom profile, but I could not make a central device.

   

There is any example, document about central device with custom profile in Cypress'Web site.

   

How can I make a central device with my custom profile? Is there any material available for me?

0 Likes
13 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Have a look into the first part of AN91267 to be found here: www.cypress.com/

   

A central device can be your smartphone or the host emulation on your PC.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

What I want is to maek two BLE device using PSoc 4 BLE. One have to act as peripheral and another as central.

   

Two device have to exchange custome data with custom profile each other.

   

I can't find any example,  document  or infomation about making central device with custom profile.

   

How can I make central device with a custom profile using PSoc 4 BLE?

   

When does "AN91162 - PSoC 4 BLE Creating Custom Profiles" come? 

0 Likes
Anonymous
Not applicable

 @Jessi - Check out the BLE dongle example project that comes with CY8CKIT-042 BLE kit, that has the custom profile handling implemented for LED and CapSense slider example (see Dongle_Ble_State_Handler and CapSenseClientEventHandler routines)

   

I think the other application note that you mentioned is not yet released on their website.

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

I succeeded (for a peripheral device) in using the BLE config dialog to create a custom service with custom descriptors. Don't forget to use your own UUIDs instead of the supplied ones.

   

Handle the GATT attribute write request for changes to values, and set the attribute values so the other device can read them. See also these two posts: http://www.cypress.com/?app=forum&id=5283&rID=105988 and http://www.cypress.com/?app=forum&id=5283&rID=105452 for some more details.

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Jessi,

   

The attachment has two projects (one CENTRAL and the other PERIPHERAL) with a custom service. Follow the instructions to work with these projects.

   

    

   

         

   
        
  1. Program the peripheral one to a PRoC module with pioneer kit and the central one to a PSoC module with pioneer kit.
  2.     
  3. Soon as you program them, the peripheral will start advertising (blinking green LED) while the central one will start scanning (blinking RED LED).
  4.     
  5. They should connect by themselves. No explicit button press is needed.
  6.     
  7. Once connected, BLUE LED should start blining on both kits.
  8.     
  9. Connect the pioneer kits to a UART application (I am using TeraTerm) and configure the baud rate as "115200"
  10.     
  11.  As soon as you start typing on one terminal, u should see the data on other. I have sent txt files (as big as 60000 characters) as well and no failures were seen.
  12.    
0 Likes
Anonymous
Not applicable

Missed a note.

   

Make sure to install latest creator version from cypress.com. This project may not work with an older creator version.

0 Likes
ViDv_264506
Level 5
Level 5
50 sign-ins 25 sign-ins 5 solutions authored

 Hi, 

   

1. posted files BLE UART without LPM.rar and BLE UART without LPM1.rar are IDENTICAL.

   

2. updating to the PSoC Creator  3.1 Component Pack 1 (3.1.0.1570) WITHOUT ANY PROBLEMS.

   

3. both parts (central and peripheral) work as described.

   

Many many thanks for posting such valuable examples.

   

Viktor

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

For future references, I am posting an updated version of BLE UART with a brief user guide.

   

 

   

Best Regards,

   

Rahul

0 Likes
ViDv_264506
Level 5
Level 5
50 sign-ins 25 sign-ins 5 solutions authored

  Hi, 

   

1. posted files BLE UART.rar and BLE UART1.rar are IDENTICAL.

   

2. updating to the PSoC Creator  3.1 Component Pack 1 (3.1.0.1570) WITHOUT ANY PROBLEMS.

   

3. both parts (central and peripheral) work as described.

   

4. higher Baudrate (230400) works OK

   

5. both central and peripheral can be compiled and used for/with second CY8C4247LQI-BL483 module.

   

 

   

In this case small problem erase with programming .... use the KitProg ID for differenciating.

   

 

   

Many many thanks for posting such valuable examples.

   

 

   

Viktor

   
        
0 Likes
ViDv_264506
Level 5
Level 5
50 sign-ins 25 sign-ins 5 solutions authored

  Hi, 

   

a. older BLE UART wihout LPM.rar seams to be more stable. At least at Baudrate 115200.

   

b. now I test both releases.

   

 

   

Best regards

   

 

   

Viktor

   

 

   

 

   
        
0 Likes
lock attach
Attachments are accessible only for community members.
ViDv_264506
Level 5
Level 5
50 sign-ins 25 sign-ins 5 solutions authored
        Hi, here is the working example of BLE_UART. I have not tested FLOW CONTROL, the LOW POWER MODE has problems ... Regards, Viktor   
0 Likes
Anonymous
Not applicable

Hi Viktor,

   

I have tested the later version .i.e. BLE UART1.rar. It is working fine at my end. Please describe the problem that you are facing at your end.

   

Since BLE UART1.rar has more features compared to the older version. Please make sure of the following:

   
        
  1. If fow control is not needed, the macro FLOW_CONTROL should be commented out in main.h and the RTS/CTS check boxes should be unchecked in the UART configuration window (see image in BLE UART1.rar)
  2.     
  3. If flow control is needed, use an external UART transciever as USB-UART on pioneer kit does not support flow control.
  4.     
  5. If an external transciever is used, make sure that P1[4] and P1[5] are NOT used as TX and RX lines as they are tied to PSoC5LP on pioneer kit.
  6.    
   

Regards,

   

Rahul

0 Likes
Anonymous
Not applicable

Hello,

   

I have adc & rtc Values i named them mixBuffer. I'm able to see the values on screen i want to push them on Ble i created a header file & .c file of Uart ble bridge. when i'm going through Cysmart app i'm getting the name & sevices of ble but not getting the values of adc & rtc. I'm using custom profile.

0 Likes