PSoC™ 4 Forum Discussions
What is the best way to get the entire payload of a BLE write request or BLE write command?
I was looking at the FindMe example and it shows that you can get the complete value of the payload by saving the data byte-by-byte into an array. Assuming that Cypress doesn't provide an API to just get the data in a variable directly, this seems logical. However, in the loop they use handleValPair.value.len instead of handleValPair.value.actualLen. My understanding is that .len will return the length that is defined for that Characteristic, and .actualLen will return the length of the data payload that got sent. For example, if you set the device_name Characteristic to 20 bytes, then .len will return 20 and .actualLen will return the actual length of the string that got sent over.
Can anyone verify that I'm understanding this correctly, and if there's a reason you would want to loop through the entire length, instead of just the number of bytes that came in from the BLE write? Perhaps it is because the changed_name variable is the full length of the attribute so you would want to read it all to make sure you fill up the array so you don't have any bytes that are 'left over' from a previous usage?
Here's the code from the FindMe example:
char8 changed_name[14];
// lots of code skipped here when I pasted this example....
case CYBLE_EVT_GATTS_WRITE_REQ:
wrReqParam = (CYBLE_GATTS_WRITE_REQ_PARAM_T *) eventParam;
if(wrReqParam->handleValPair.attrHandle == 0x03) // this is the BLE standard device name Characteristic
{
for(i=0;i<wrReqParam->handleValPair.value.len;i++)
changed_name = wrReqParam->handleValPair.value.val;
}
CyBle_GapSetLocalName(changed_name);
CyBle_GattsWriteAttributeValue(&wrReqParam->handleValPair,0,&cyBle_connHandle,CYBLE_GATT_DB_PEER_INITIATED);
CyBle_GattsWriteRsp(cyBle_connHandle);
break;
Hi, everyone
In my going project, we'd like to get temperature & humidity value in the room with node.js script on raspberry Pi and BLE sensors.
So I bought the CYALKIT-E02 , which includes solar powered ble sensor and ble usb dongle.
The RDK supplies sample application to get the temperature and humidity value from cypress solar powered ble sensors and display that value
for iOS, Android and PC.
I tried iOS application Cypress BLE-Beacon, it works fine, but i don't know how to extract temperature and humidity values from beacon data in my original ble application on node.js.
I think there is RAWdata from beacon and it includes temperature and humidity values or something converted value.
Is there any source or document to know this logic?
Thanks,
Show LessI have been running in to trouble on my final software test 😞
I’m using the:
apiResult = CyBle_StoreAppData((u8*)&appConfig, (u8*)&appConfigAtFlash, sizeof(StAppConfig), 1u);
to save the data, and:
memcpy(&appConfig, &appConfigAtFlash, sizeof(StAppConfig));
to load the data, and everything look fine until I started to use the bootloader and the bootloadable.
So I was thinking that you could give me a hint on how I can get it to work. Any idea.
Hope you can give a hint..
Best regards
Panduro
Show LessI need documents about bonding implementation in Cypress devices. I tried to run "BLE_Bonding" example but received "Authentication failed".
Show LessI found that some of devices that have Bluetooth 4.0 can`t discover or can`t connect to my device but new devices can.
How to limit BLE component to 4.0 only ?
Show LessI want connect my BLE peripheral device with an Android app using pairing/bonding features.
As start point I used Day_015_Bonding example from Cypress 100_Projects_in_100_Days examples.
As Android App I used CySmart App running on my Asus NEXUS Tablet with Android 5.1 installed.
The connection is never done.
My tablet rejects the connection and It doesn't show me any PassKey Form to enable the connection and complete the pairing/bondin procedure.
I tried to use a different Android APP like nRF Master Control Panel and the connection doesn't work with this app too.
In the serial log console, connected with my CYBLE 0220001 device, no passkey is showed.
The paring/bonding procedure doesn't work.
This is the serial console output:
BLE_Bonding Device ON
Starting to advertise
Advertisement is enabled
Device Connected
Starting Discovery
Discovery complete.
CYBLE_EVT_GAP_AUTH_FAILED: 18
Device Disconnected
Restarting Advertisement..
Advertisement is enabled
If I use CySmart Software V.1.1 running on my Windows 7 PC with cypress BLE dongle,
I can discover my BLE peripheral,
When i press connect button, CySmart software requires the PassKey.
My BLE peripheral generates the PassKey ( I can read Its on serial console ).
And the pairing/bonding connection works well.
Please help me,
I need to connect my peripheral with an android app in secure mode using a paring PassKey.
Hi, all. I'm trying to figure out the mapping of the CTBm0 and CTBm1 opamp banks on a CYBLE-214015 (also looking at CYBLE-224110 for comparison). Datasheets for these are at http://www.cypress.com/file/320226/download and http://www.cypress.com/file/230681/download respectively.
But when I compare those
with the datasheet for the 4xx8 BLE family (http://www.cypress.com/file/175646/download) the mappings are entirely different-- not in terms of physical pins, but in terms of port/pin names like p2.4.
For example, on the 214015, p2.1-p2.5 are all CTBm1 pins, and are actually duplicate signals to what's on other pins. But in the 4xx8 BLE family datasheet, p2.x are all CTBm0 pins.
In the meanwhile, the 224110 datasheet has p2.2, p2.3 and p2.6 as CTBm1 pins and 2.1, 2.4, 2.5 as CTBm0 pins.
And then in Creator, they are not split up into two sets of opamp m0 and m1, but instead are labeled opamps 0-3. There, it does look like the p2.x pins are all connected to one pair of opamps while the other bank is p1.x.
I can eventually figure this out experimentally, but someone out there must already have encountered this...
Show LessI just wanted to share the information about migrating the OTA Projects created on an older version of the PSoC Creator to a newer version. In addition to Updating the components, make sure the old linker scripts are replaced by the newer ones. Also, make sure that the 'Remove Unused Sections" in the Optimization field of Linker Settings in Project Settings is set to 'true' for the Stack Project.
Show LessGood afternoon all!
I am a beginner programmer and was wondering how I could accomplish RSSI monitoring. I loaded the "Proximity" sample project which is somewhat close to what I would like to achieve. Basically I would want it to monitor RSSI and when it hits a certain value blink an LED (Only when below or under a specific preset number).
This is my first time programming so any help would be useful! I'm not sure if that is possible or if I need an interrupt-like setup every 1s to check RSSI value.
Please help me as this is a final project! I greatly appreciate it!
Show Less