PSoC™ 4 Forum Discussions
text.format{('custom.tabs.no.results')}
We have an application to send a big chunk of data from peripheral to a station in real time via BLE 4.2. We have built a BLE 4.2 pair by Cypress PSoC4, runs fine at 4KB/s. To maximize the throughput, we send data via notification mode (send once ready). Though we have the mechanism to maintain data transmission reliability on APP layer, we notice there is no packet loss in this setup. Now we try to migrate the central to an android pad (with up to date chipset to support BLE 4.2). Then we have continuous packet loss happening. We try to debug and ask for help.
The time interval (7.5ms) and MTU (<512Byte) size are set to the same between Android and PSoC4. When the payload is set to 380 byte per packet, We see 60% packet loss rate while if we send more than 2 packets per second. Packet loss rate decrease after that. It seems can be loss-free if we send 1 packet per second in this condition.
Please give some guideline to debug the root cause.
Also we don`t see a lot of articles about the BLE setting on Android. Very appreciated if anyone can share his/her experience.
Show LessI have, up until now, used an Android app to connect to my BLE peripheral. Now I have need to connect CY8CKIT eval board to the peripheral. I am looking at the UART_to_BLE_Central project. How does the Central find and connect automatically to the peripheral? By device address? Where is this parameter set?
I have sent notifications from the peripheral to the Android app, how do I send a notification from the Central on the eval board to a characteristic in the profile on the peripheral? Does the central need to "discover" the characteristic on the peripheral or do you define the characteristic the same on both?
Thanks
Rich
Show LessHi
I have 2 proc boards communicating to each other (typical master and slave)
The master attempts to connect to the slave and on connection the slave sends the master information. The master then disconnects from the slave and waits for 10 minutes before reconnecting. This continues indefinitely.
In the event that the master fails to connect to the slave (e.g. when the slave is out of range or was powered off) it fails to connect and I get a connection timeout as expected. However whenever the master attempts to reconnect to the slave and the slave is available it fails to reconnect. I can turn the master off and on and it still fails to connect. the only way to fix this is to reprogram the master
To connect I call CyBle_GapcConnectDevice((CYBLE_GAP_BD_ADDR_T*)&peerBdAddr) and it this works (usually) and in the event of a failed connection I call CySoftwareReset() to reset the master.
Is it possible that when calling for a connection it stores this information such that a reset does not clear it? and in that case is there any way to clear this information?
I cannot call CyBle_GapDisconnect(connHandle.bdHandle) as I don't receive a connection handle if no connection is established.
Due to confidentiality reasons I am unable to upload the full project
Thanks in advance for the help
Jack
Show LessHello folks,
I'm still working on the CY5677 dongle with the example linked by Madhu Sudhan (thanks to him) at: http://www.cypress.com/forum/proc-ble/cysmart-api-c-example?page=1
I got an issue wich is now solved as mentionned here : http://www.cypress.com/forum/proc-ble/cy5677-cc2650
I'm close to the end of my application but I'm stuck since a long time on an other issue which is notifications are never enable.
I tried to make it work with CYSMART and it's working nicely, same with a phone but never with this application. I tried to solve the issue with the same way Madhu Sudhan solved the last issue but never worked. I join you the code of the notify button :
private void Notify_Button_Click(object sender, System.EventArgs e)
{
AutoResetEvent sync = new AutoResetEvent(false);
CyApiErr err = CyApiErr.OK;
CharHandle = 0x0027;
CCCDHandle = 0x0028;
// Setup the descriptor write handler
GATTClientEventCallback.DescriptorWriteHandler = (CyConnectResult, status) =>
{
if (status != CyStatus.BLE_STATUS_OK)
err = new CyApiErr("Failed to Write: Reason: " + status.ToString());
sync.Set();
};
if (!(NotificationEnabled))
{
var NotifByte = new byte[1];
NotifByte = BitConverter.GetBytes(0x0001);
Array.Resize(ref NotifByte, 1);
// Initiate write descriptor request to the CCCD
err = GattClient.WriteDescriptor(new CyGattWriteInfo(CCCDHandle, NotifByte));
if (err.IsOK)
{
sync.WaitOne();
NotificationEnabled = true;
Notify_Button.Text = "Disable Notification";
}
}
else
{
var NotifByte = new byte[1];
NotifByte = BitConverter.GetBytes(0x0000);
Array.Resize(ref NotifByte, 1);
err = GattClient.WriteDescriptor(new CyGattWriteInfo(CCCDHandle, NotifByte ));
if (err.IsOK)
{
sync.WaitOne();
NotificationEnabled = false;
Notify_Button.Text = "Enable Notification";
}
}
}
Err is variable is ok when I debug so the transmission seems to be well but the principle of activation seems failed. With CySmart I'm able to write "01:00" or "0100" and it's working.
Plus I have a question about that on CySmart I can see what is on the joined picture. With characteristic which haven't notification mod I'm ok to write CharHandle and CCCDHandle nicely but with the notification characteristic I have 3 values as joined 0x0027 to 0x0029. What should I put where ?
Regards,
Guillaume
Show LessI am having a tough time getting a PROC BLE to actually start without ending up in CY_NORETURN in CM0Start.c. The program does not get past the CyBLE_Start line of code.
Project attached.
Very frustrating. Any ideas?
Thank you,
Tom
Hi:
I'm using the upgradable-stack OTA projects, with environment as:
PROC module: CYBLE-212019-00
PSOC Creator 4.0
Establish projects from the examples:
BLE Upgradable Stack Example Launcher & BLE Upgradable Stack Example Stack in the same workspace.
Using BLE componet with older version v3_10, both the projects compile successfully!
If I update the BLE component to v3_20., the BLE Upgradable Stack Example Stack fails with following errors:
Error in component: cy_boot. The cy_boot_v4_20 component (cy_boot) is not compatible with the selected device. Please check the component datasheet for details on updating to a compatible component
Error in component: PrISM_1. Component 'PrISM_v2_20' is not supported by the selected device.
Error in component: PrISM_2. Component 'PrISM_v2_20' is not supported by the selected device.
Is anyone can help to answer this?
Thanks!
Justin Chen
Show LessI have an idea for a BLE application and I’m looking for advice on how I might configure the PSOC BLE to do what I want. Here is the behavior I’m looking for:
- Multiple BLE that will come into range of each other and then go out of range.
- Each device will have the same hardware/software.
- Each device will broadcast or announce its presence.In that announcement, I would like to broadcast a tag (let’s say 4 bytes) which indicates a bundle of information (let’s say 32 bytes) that the given device has.The device will send one tag per announcement and cycle through all the tags and repeat.
- During the interval between announcements the device will listen for two things.
a) Announcements from other devices.
b) Connection requests from other devices. - When the device gets an announcement from another device, the device will look at the tag and determine if it has that one of the other devices bundle.If the device already has this bundle, the device will just keep listening and announcing.
- If the device gets an announcement with a new bundle it does not have, the device will request a connection with the other device and get that bundle. It will then close the connection and continue with listening (step 4).
- If the device gets a connection request, the device will except the connection, send the requested bundle, and then close the connection.It will then return to listening (step 4).
- At a timeout period (+/- some randomness) the device will broadcast its next tag (step 3) and continue the cycle.
- Over time, I would expect all devices to have a complete set of all bundles.
I will try to include a state diagram. I’m having a hard time figuring out the roles I need to put the PSOC BLE device into how to switch roles. What roles should I use? Are there example (like in the 100 days 100 projects) that might help me. This is a, non-commercial, hobby project and I can explain exactly what I’m doing if anyone cares.
Show LessHi,
I get Verification failed on row 0 error on CYBLE-014008-00. This used work for at-least 50 times before I started seeing this error.
I think the one of the flash row is damaged and can't recover. Tried erasing and programming several times to recover but in vain.
Tried using Sflash tool which comes with PSoC Creator and below is the error I see:
"RowId = 0 Failed!Verification failed at address 0x0FFFF200. Expected data = 0xCDCCCBCF, read data = 0xCDCCCB8F"
From this I see bit 6 at address 0x0FFFF200 is culprit. I think the erase operation is failing at this bit.
It would be great help to know why this occurred or when it can occur(power failure during erase or programming operation).
Appreciate your early response.
Show LessIf I have an ongoing interrupt from a button press and I change the priority mid call does it change the priority of the ongoing interrupt or the next time the interrupt is triggered.
Show Less