PSoC™ 4 Forum Discussions
Hi,
I am trying to have my BLE device connect to my app with a simple password setup. I have set the password to '1234' using the following code:
case CYBLE_EVT_STACK_ON:
// When stack comes on, set correct ECO capacitance trim value
// http://www.cypress.com/knowledge-base-article/eco-capacitance-trim-values-ez-ble-modules-kba218990
CY_SET_XTND_REG32((void CYFAR *)(CYREG_BLE_BLERD_BB_XO_CAPTRIM), 0x9898);
// Set password
CyBle_GapFixAuthPassKey(TRUE,dataLocal.pinCode);
// Start advertisement
CyBle_GappStartAdvertisement(CYBLE_ADVERTISING_FAST);
break;
I have confirmed that this is indeed the pin here:
case CYBLE_EVT_GAP_PASSKEY_DISPLAY_REQUEST:
// Check passkey
passkey = *(uint32 *)eventParam;
break;
'passkey' is decimal '1234', 0x4D2 hex.
When my app is prompted and I enter '1234' into the passkey entry, the connection fails for the following reason:
CYBLE_GAP_AUTH_ERROR_CONFIRM_VALUE_NOT_MATCH
I don't know how I can see what the BLE saw for the entered passkey to check what went wrong. Any ideas?
Thank you for your comments.
Regards,
Tom
Show LessThe description for smp_send_pairreq_response on p.143 says:
"EZ-Serial will automatically accept pairing requests unless Bit 1 of the security behavior flags is cleared using the flags
field in the gatts_set_parameters (SGSP, ID=5/14) API command."
I believe that this is incorrect - it should be bit 0 of the flags field in smp_set_security_parameters, as described on p.147.
EZ-Serial BLE Firmware Platform User Guide, Doc. No. 002-11259 Rev. *C
Show LessHi,
I have a project that has a few arrays of items that the Android app can change. For instance, there is an array of 10 'custom value' items that consist each of:
- value number (1-10)
- value address (0-511)
- value (0-255)
- enabled (0,1)
Do I need to set up 10 different characteristics, one for each 'custom value'?
When I receive a read request, is there a way to determine which one the app wants to read, write it into the characteristic, and then let the app read the data, or generate a notification for the app to read the updated characteristic?
I am trying to simplify things, and don't want 10 different, identical in structure characteristics if I don't have to. I also have a 'custom color' and 'custom program' characteristic that this would apply to.
Sorry if this is unclear, please let me know if you have any questions
Thank you,
Tom
I'm making a project similar to the BLE_UART project from cypress using the CY8CKIT-042-BLE Pioneer Kit with a CYBLE-EVAL-014008 module and the provided dongle. During the initial connection, I'm getting the error CYBLE_ERROR_INVALID_OPERATION whenever I call the function CyBle_GattcDiscoverAllCharacteristics(cyBle_connHandle, attrHandleRange);
Why would that function throw that error? My attrHandleRange object uses the same BLE UART Service Handle start and end as the BLE_UART project on the central side, so I imagine this is an issue in the peripheral code.
Thanks for any help.
Show LessHi,
I was wondering if it were possible to write to a single variable field in a GATT server without overwriting other fields. For example, I have 'program, speed, brightness' fields in a characteristic - can I write to just one of those fields, and if so, how?
If not, would it not make more sense just to have a byte array instead of multiple fields? It would accomplish the same thing.
Thank you in advance.
Show LessHello,
Can I assign those function components in the code dynamically?
e.g.,sometime I want to take P3.0,P3.1 as UART,sometime take as I2C in the one C code file,is it available?
Thanks.
Chris
Show LessHi All,
I am pretty confused about the capability of BLE to build multihop (mesh, tree) network topology. At the beginning, I thought that it is the same with the classical bluetooth. And also, I see that there are some projects in 100_Projects_in_100_Days (e.g. Day012_Central_Peripheral) mentioning about having multiple role in a node (I have not tried them out though). I thought that can be a way to build multihop topology. However, when I googled again for some basic information about BLE, some say it's not possible to have multihop topology but some say it is possible. Can anyone please explain about this? Or maybe give me some reference about it? Or maybe, if anyone has tried out the related projects or having other experience establishing multihop network. Please give me some guidelines. I would very appreciate it. Thank you.
Regards,
Daryanto
Show LessHello,
We have been working an a devices using PSOC 4 bluetooth, for a wireless ultra-low power sensor.
Currently, we have the electronics and firmware working, drawing only 150 microamps of power. This works well, and is done by putting the system mostly into deep sleep, and taking a measurement once every five seconds.
However, if we begin to make calls to
BLE_ProcessEvents();
The system only enters sleep briefly, and we appear to be bombarded by several hundred events per second. Although the connection to the app appears to work fine, sending out an actual measurement every five seconds, this creates an huge additional power overhead (about a factor of ten), which is too high for our application.
It seemed that perhaps the Connection Interval settings were incorrect, resulting in extra (unnecessary) events (???). However, we have tried changing these settings both through the bluetooth configuration and by calls to
CyBle_L2capLeConnectionParamUpdateRequest(cyBle_connHandle.bdHandle, &connectionParameters);
This seems to have no effect.
Any idea what could be causing the extra events? We only make calls to
CyBle_GattsWriteAttributeValue(&measurementHandle, FALSE, &cyBle_connHandle, FALSE);
CyBle_GattsNotification(cyBle_connHandle, &measurementHandle);
once every five seconds. There should be no issue (deep) sleeping most of the time, but it seems there is something extra going on that’s taking up all the processing time.
Thanks,
Jonathan
Hi everyone,
I'm working on an application where I use the BL-A Pioner Kit with a CY8C4248LQI-BL583 module for simulate a peripheral sensor, that connects to a CySmart USB 4.1 dongle. I use CySmart 1.2 software to debug. I'm having problems with indication messages sent from a custom characteristic (which I use as a control point of the custom service). What happens is the following:
- From CySmart, I active the indications of that characteristic (writing 0x0002 in the associated CCCD).
- I write a value in the characteristic, my application answers with an indication.
- In the CySmart log window I check that the indication have actually been received.
- But in my application there is no CYBLE_EVT_GATTS_HANDLE_VALUE_CNF event.
At the beginning of my code (written from the example Running and Speed Cadence ), I register the function that use to parse the BLE events
appResult = CyBle_Start(AppCallBack);
Where AppCallBack looks like this:
void AppCallBack(uint32 event, void *eventParam){
CYBLE_GATTS_WRITE_REQ_PARAM_T *wrReqParam;
switch(event) {
case CYBLE_EVT_GATTS_HANDLE_VALUE_CNF:
// This event never happen !!!!!!
break;
}
}
But, however in the function CyBle_EventHandler() of CYBLE_eventHandler.c file, when an Indication is confirmed then CYBLE_EVT_GATTS_HANDLE_VALUE_CNF event happens.
This seem confusing to me, any idea about what is happening?
Thanks,
Angel
Show LessIs it possible to set the input logic levels of the I2C pins to LVTTL?
Target module is CYBLE-012011-00 and I2C is set to master.
Thank you.
Show Less