PSoC™ 4 Forum Discussions
text.format{('custom.tabs.no.results')}
Hi,
When I send a notification to a client, the API "CyBle_GattsNotification()" sometimes returns the error "CYBLE_ERROR_MEMORY_ALLOCATION_FAILED".
What is the reason for memory allocation failed while send notification?
Thanks!
Aaron Deng
Show LessHello.
I saw Project #047 post and it really fun to me and helped me alot.
I'v tried "Accelerometer Controlled Car" example and it doing very well. Very fun 😄
However when I changed acceleromemter sensor from Adxl355(ADC) to Adxl362(using SPI) it didnt work.
I think my Psoc 4 ble SPI setting is wrong, bcz when I tested Adxl362 with Arduino it worked.
Anybody help, adivce or example me about using Adxl362(SPI) Accelerometer sensor with Psoc 4 BLE?
I attached Adxl362 datasheet and my project.
Show LessHi everybody! The project I'm currently working on requires a counter with the ability to increment or decrement its value based on two non periodic clock/count direction signals (in contrast to a generic counter that only needs to work with one clock/count direction pair). I can think of several ways to implementing this in software for the ARM core, but I don't have much of a clue when it comes to hardware design, I only know basic theory. Any tips for the hardware noob?
Thanks in advance,
Gino
Show LessI am new to PSoC and tring to do a project where i need to input an external analog signal into the psoc digitize it using an ADC and then send it through Ble. Can someone guide me.
Show LessHello, I am running a very basic application of varying input voltage into an ADC and changing the LED color based on the voltage range. I keep receiving an error about not being able to define my variable adcSample (which is the result from the ADC).
int main()
{
/* Initialize ADC. Conversion is not enabled yet. */
void ADC_Start();
/* Start ADC conversion. */
void ADC_StartConvert();
adcSample = ADC_GetResult16(uint32 0)
Show LessHello Everybody,
Today I reach another strange topic that I personally do not get it.
I have a big custom characteristic of 44 bytes(11 int32 fields) that changes often( once at 4 seconds) and therefore I want them to notify the cell phone when the value changed. Since the code is very long I will put here only the notification part. I may say that a simple slider example works perfectly. Also this example works in some conditions.
<code>
tstSensorsForBLE tstValue;
tstValue.CO = astSensor[0].i32AvgValue;
tstValue.SO2 = astSensor[1].i32AvgValue;
tstValue.NO2 = astSensor[2].i32AvgValue;
tstValue.O3 = astSensor[3].i32AvgValue;
tstValue.NO = astSensor[4].i32AvgValue;
tstValue.Spec = astSensor[5].i32AvgValue;
tstValue.CO2 = astSensor[6].i32AvgValue;
tstValue.VOC = astSensor[7].i32AvgValue;
tstValue.T = astSensor[8].i32AvgValue;
tstValue.H = astSensor[9].i32AvgValue;
tstValue.P = astSensor[10].i32AvgValue;
if(u8ConnectionFlag != 0)
{
/* Get a handle for the notification characteristic */
CYBLE_GATTS_HANDLE_VALUE_NTF_T tempHandle;
/* Take the characteristic */
tempHandle.attrHandle = CYBLE_SENSORSSERVICE_SENSORSVALUE_CHAR_HANDLE;
/* Update the value and specify the lenght */
tempHandle.value.val = (uint8 *)&tstValue;
tempHandle.value.len = 44;
CyBle_GattsWriteAttributeValue(&tempHandle, 0, &cyBle_connHandle, 0);
/* If the BLE is connected with the phone notify it */
if(u8Notif != 0)
{
char str[20];
CYBLE_API_RESULT_T result;
/* Notify the phone that the values are update */
result = CyBle_GattsNotification(cyBle_connHandle, &tempHandle);
sprintf(str, "ERORR: %d wsdfgrfthjhuy\n",result);
UART_UartPutString(str);
}
}
</code>
The result code is always 1 which mean that one input parameter is not correct.
I track the problem to the size of the characteristic. If Instead of 44 length I put 20 then there is no error and it notifies correctly but above 20 I always have code 1.
My questions is: Is there a problem because I try to notify a characterstic of 44 bytes? If yes How can I do this notification of such big characteristic?
Thanks!
Show LessI have been working on Eddystone Protocol ,I am currently Working on PSOC 4 BLE pioneer kit with the Example program given by Cypress Semiconductor for BLE_pioneer_guide.
I was successfully able to get the Eddystone URL,but when I try to configure the Eddystone GATT configuration its not writing the URL.
One more thing I have observed in the PDF where Explanation of Eddystone is given ,the Service ,Charateristics and Custom UUID which have been given in PDF have been updated by Eddystone Github page.Link for Same I have given below.
https://github.com/google/eddystone/tree/master/configuration-service
So when I am configuring From other App like physical Web ,I am not able to Discover and connect to the Eddystone GATT configuration Service.
In the page its stated that the custom UUID for the Service is made for interoperablity.
If this is true ,can @cypress or anyone else open the Project to update the Document guide and Example program
Thanks ,
Yogesh.D
Show LessHi,
When I run the 100 Projects in 100 days example "#16 Authentication", http://www.cypress.com/blog/100-projects-100-days/project-016-authentication I have problems bonding and reconnecting on my Nexus phone with CySmart app,
I don't get screen to enter Passkey and I see "Bonding in progress.. Please wait" after a while the device disconnects with "Authentication process timeout".
Below is the terminal output:
Bluetooth Stack ON:
Set the I/O capabilities:
Updated the I/O capabilities:DISPLAY_ONLY
Started to advertise
Device Connected
CYBLE_EVT_GAP_AUTH_REQ from Master:
Unauthenticated and data signing
Bonding:yes
eKeySize: 0x10
err: 0x0
CYBLE_EVT_GAP_PASSKEY_DISPLAY_REQUEST. Passkey is: 1454889.
Please enter the passkey on peer device.
CYBLE_EVT_GAP_AUTH_FAILED: 15
Device Disconnected
As far I understand the Passkey should be 6 digits but I see here as 7 digits(sometimes). Is this correct(attached is the uart log file)?
Also how do I use static passkey entry, I did see a post regarding this but could not find much information. Some example workspace would be greatly helpful.
Any inputs would be of great help and appreciate the same.
Regards
Show LessHi, I have a simple question. I would like to build the new board with CYBLE-014008-00.
SCB0_TX of UART has two device port pin. Only one device port pin or both pins should be connected with controller?
Thanks
Show LessHi All
Our company is already using the PSoC 4 BLE with bootloader and bootloadable application updatable using UART SCB, no issues works extremely well.
The attached PSoC 4 project is applicable for the below and runs on a kit-042 with the UART debug sent to a separate kit-044.
The project uses I2C for the bootloading process and using a UART for debug which has some unexpected behaviour only after a cold start.
After the project is programmed, no cold start, the operation is as expected, the bootloader then bootloadable are executed successfully.
Upon disconnecting the USB and board to board UART tx and rx lines from the kit-044 (these lines parasitically power the kit-042) then reconnecting, the code executes sending "Boot St" then the PSoC reboots. This operation occurs continuously. Cycling the power has no effect, however downloading the project to the kit-042 again fixes the issue until a cold start is performed once again.
/* Enable global interrupts. */
CyGlobalIntEnable;
/* Delay is needed here for PsoC reboots*/
//CyDelay(1);
/* Start UART*/
UART2_Start();
UART2_PutString("Boot Start\r\n");
To resolve the issue we have tried reading the UART status, waiting until the UART buffer is empty, not enabling global interrupts, delaying the watchdog etc.. without success. We did find that was adding a 1ms delay after the interrupt enable appears to resolve the issue for the hardware/software combination detailed above. That is, on any cold start the operation is the same as a warm start.
Does anyone have any thoughts on this cold start issue or see an obvious error we have overlooked?
Thanks Kindly
Greg