Connecting two CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kits

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

cross mob
Anonymous
Not applicable

Hello,

   

I am trying to connect two CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kits. One of the boards shall measure a Sensor via the 12 Bit-ADC and pipeline the measured data using the low-energy Bluetooth to the other board. The measurement frequency is 1kHz, so there is every 1ms a new sample. If the data is send to the computer over the UART interface directly for the first board, every sample can be received. But if the data is send over the Bluetooth to the second board and then passed over the UART to the computer only every 7th sample is received. The UART works in booth test with the same baud rate. So the Bluetooth works as bottleneck and slows the transmission.

   

 To connect the second board I`m using the Project #020: UART to BLE Bridge (UART to BLE Central) (https://github.com/cypresssemiconductorco/PSoC-4-BLE/tree/master/100_Projects_in_100_Days/Day020_BLE...).  I minimal need a measured data rate of about 80Hz, but while my tests I just got only 66Hz in maximum. Because the minimal BLE4.0 speed is 1Mbps and my data package contains 96bits, I think it should work with a sample frequency above 80Hz. Is there a chance to increase the Bluetooth speed?

   

Thanks for your help!

   

Katharina

0 Likes
7 Replies
Anonymous
Not applicable

What is the connection interval set in you Central project?

   

The minimum connection interval for BLE is set as 7.5 ms.

0 Likes
Anonymous
Not applicable

My connection intervalls are:

   

Maximum : 7,5ms

   

Minimum:7,5 ms

   

and the last time is set to: 1000ms

0 Likes
Anonymous
Not applicable

I am doing basicly the same except I need to transfer a 32bit number via bluetooth.   All examples show a uint8 number or an array of uint8 only. Does anyone know if a single 32bit number could be sent vis bluetooth?

   

 

   

Thanks

0 Likes
Anonymous
Not applicable

I am doing basicly the same except I need to transfer a 32bit number via bluetooth.   All examples show a uint8 number or an array of uint8 only. Does anyone know if a single 32bit number could be sent vis bluetooth?

   

 

   

Thanks

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

Use a union for a 32-bit integer and an array of 4 uint8, then send the array.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Bob Thanks much I did get it to work with:

   

value = EncoderCount;

   

result[3] = (value & 0x000000ff);

   

result[2] = (value & 0x0000ff00) >> 8;

   

result[1] = (value & 0x00ff0000) >> 16;

   

result[0] = (value & 0xff000000) >> 24;

   

uartTxDataNtf.value.val = result;

   

uartTxDataNtf.value.len = 4;

   

I have another question.   Is there anyway I could get the encoder to reload 0x0000 instead of 0x8000?  

   

 

   

Thanks

   

Mark

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

I thought to use

   

union {  int32 Value;
              uint8 Result[4];
           } MyUnion;

   

MyUnion.Value = EncoderCount;

   

artTxDataNtf.value.val = MyUnion.Result;

   

uartTxDataNtf.value.len = 4;

   

What might work as well would be

   

artTxDataNtf.value.val = (uint8*)&EncoderCount;

   

uartTxDataNtf.value.len = sizeof(EncoderCount);;

   

 

   

Bob

0 Likes