PSoC™ 4 Forum Discussions
Hello everybody,
I am trying to implement the following scenario: using a PSoC 4 BLE peripheral I updated the privacy example and I am trying to use it in my project. I start the peripheral using a public address; then I connect with an android smartphone to the device, pair it using a fixed passkey, bond the device and afterwards the phone disconnects. After the disconnecting event, the address of my peripheral becomes private random resolvable which is what I want, it even changes ones at a couple of minutes again if there is no connection or every time a connection/disconnection event arrived. Everything is good, but my problem is the following, after I disconnect with the smartphone from the peripheral and the address become private I am not able to reconnect with my smartphone again. Does anyone know if android itself can resolve an address or if the application should scan every time for a device and try to resolve itself the address? I would like to reconnect to a bonded device without scanning, but I do not know if this is possible.
If anyone experienced this, a hint is more than welcomed.
Thank you,
Marian
Update info: The security of my device is set to Mode 1, authenticated pairing with encryption, Strict pairing, Display as IO capability(even if this is not entirely correct, the device has no i/o capabilities but I want to use a fixed passkey for this). I observe that the bonding initiated by the smartphone and the exchange of keys is ok. After disconnect event and the address become private I can scan all devices, find the one I need with the orivate address and can connect to it without any bonding. The problem is now the following: after connection and accessing a service(ex. battery level) I am no longer able to do anything. If I try a read than the pairing winodw will pop up again and no matter what I enter the device disconnects.
Update info 2:
Here is a new Update and the project attached. I eliminate all the code except my two state machines that handle this bonding and privacy tasks. Please note in BLEHandler.c that some code is commented since it makes no sense in this test project, especially the fact that remove bonding is done by pressing a button and in the project it is done at reset.
The battery level as it is in SIG has encryption and authenticated on Read. Therefore indeed that may trigger the pairing window again. I am not an expert in how Android or iOS will treat this but if I remove the encryption an authentication than everything is fine. But I do not want to modify this, and I still want some privacy on other custom characteristics, even if after a bonding only that phone can resolve the address.
Other Info: with the cypress dongle and cysmart on PC, when reconnect to the private address, it will pop up the pairing but after ok it says paring completed without the entering pin.
One of my other questions will be: Is there something wrong in how I handle this process in the peripheral? Is there a problem with the application on android and there I should invest some time?
It would be great if someone can point me in a more correct direction. Thank you!
Message was edited by: Marian-Emanuel Ionascu
Show LessHello,
I try to generate Client and Central application by PSoC 4 BLE. To save memory usage, I would like to structure BLE profile by client only.
How can I create the structure without Server by Creator v4.1?
Best regards,
Show LessI have the CY8CKIT-041-41XX, which uses a PSoC 4100S which should support CapSense gestures. This kit includes a trackpad. I have tried enabling the gestures for the trackpad, but when I run the Tuner, no gestures are ever detected. Also, it seems that the scan rate of the trackpad is too slow to reliably detect quick gestures. Is it possible to use gestures with this kit? Is this as fast as CapSense can scan a trackpad?
Show LessI'm a starter at PSOC and Bluetooth, please excuse me for maybe trivial question. I was working on ble workshop and i succesfully run lab1-2-3. But there is not any instance about authentication. I have set my ble component as gap peripheral and changed the security level to "authenticated pairing with encryption" but i didn't understand how can i configure the passkey? Is there any simple example about pairing with passkey? I just want to pair with a passkey with my master(gap central device) then let it read 1 byte device id from peripheral device.
Show LessHello. Where can I read how to get the status of 1 button when using CapSense in PSoC4. In all examples only sliders and position finding.
I want to write a simple type code:
button = CapSense_GetButton(num_of_button); // coined command
if (button != 0)
{
// to do something
}
else
{
do something different
}
In CapSenseCSD component datasheet I can not find the right command.
Show LessHey Folks,
I am working on a Quadrocopter Project where I currently just get a Range of about 10-15 meters using a normal proc module and the usb dongle. I also tried it with the CySmart App getting the same result.
What I did so far to extend the range was setting the Tx Power Level to +3dbm (maximum) but this is unfortunately not enough.
Does anybody has experience with the new CY5674 PRoC BLE SMA Module? Could a better Antenna extend my range to 30-40 meters direct air connection?
Thank you guys so much for your help 🙂
Your Bratwurst
Show LessI am trying to get a CYBLE 214009-00 module soldered to a custom PCB. The pads extend out from the device outline slightly more than specified in order to make hand soldering a possibility. Otherwise the pad layout conforms to the specification in the data sheet. In each case the boards were built with sufficient components to allow connection to the MiniProg3 and nothing else.
Failure 1: The module was placed on the pads over a small amount of paste. Each pin was then re-flowed with a soldering iron.
Because the pads are not brought out to the edge of the module PCB re-flow was inconsistent/incomplete leaving shorts under the module.
Significant heat was used, and in the end I actually damaged a track. Eventually all the MiniProg3 pins were showing no shorts but the device was still not recognized as being present.
Failure 2: This time I screen printed the paste onto the pads, and added another capital chip (with a center pad) to make sure the re-flow was OK.
This was pre-heated for 150 seconds at 150, then heated to 245 over about 100 seconds then a further 60 seconds for re-flow. All the other devices appeared to re-flow perfectly (the chip with a center pad was tested and had flowed correctly). However nothing from the BLE module.
A third chip was hand wired mimicking the PCB and this communicated fine with the MiniProg3.
Both modules were removed by re-flowing. One failed physically (managed to swipe the components off! 😞 ) the other was wired as above but did not respond.
If any one has successfully mounted one of these module and is prepared to share the process they used I would be very grateful!
Show LessAccording to the BLE 5.0 Specification :
"The Link Layer shall use the primary and secondary advertising channel
indices as specified by the Host, and the used primary and secondary
advertising channel indices shall take effect when the Advertising State is
entered.
So if I understand the spec correctly, with each advertising event, the Advertising Channel Indices are rewritten with each event.
Forgive my question, what is the time duration of this rewriting of the Advertising Channel Indices? I guess that this occurs in less than 1 mS. And that this rewriting is occurring concurrently with advdelay, the advertising delay inserted between each advertising event. Advdelay is typically 10mS plus a random delay, if I remember the spec correctly. Since it is concurrent with advdelay, I should just ignore the duration of the rewriting of the Advertising Channel Indices?
Can anyone confirm that the Cypress chips function in general this way? Thank you!
Show LessHello,
Iam using PSCO4 CYC4014 Microcontroller for our project,
Iam using below mentioned API's for detecting if finger press on button,
1) CapSense_CheckIsSensorActive()
2) CapSense_CheckIsWidgetActive()
Below is function snippet.
uint32 CapSense_CheckIsSensorActive(uint32 sensor)
{
uint8 widget;
uint8 debounce;
uint8 debounceIndex;
uint8 fingerThreshold;
uint8 hysteresis;
/* Prepare to find debounce counter index */
widget = CapSense_widgetNumber[sensor];
fingerThreshold = CapSense_fingerThreshold[widget];
hysteresis = CapSense_hysteresis[widget];
debounce = CapSense_debounce[widget];
debounceIndex = widget;
/* Was on */
if (0u != CapSense_GetBitValue(CapSense_sensorOnMask, sensor))
{
/* Hysteresis minus */
if (CapSense_sensorSignal[sensor] < (fingerThreshold - hysteresis))
{
CapSense_SetBitValue(CapSense_sensorOnMask, sensor, 0u);
/* Sensor inactive - reset Debounce counter */
CapSense_debounceCounter[debounceIndex] = debounce;
}
}
else /* Was off */
{
/* Hysteresis plus */
if (CapSense_sensorSignal[sensor] >= (fingerThreshold + hysteresis))
{
CapSense_debounceCounter[debounceIndex]--;
/* Sensor active, decrement debounce counter */
if(CapSense_debounceCounter[debounceIndex] == 0u)
{
CapSense_SetBitValue(CapSense_sensorOnMask, sensor, 1u);
}
}
else
{
/* Sensor inactive - reset Debounce counter */
CapSense_debounceCounter[debounceIndex] = debounce;
}
}
return ((uint32)((0u != CapSense_GetBitValue(CapSense_sensorOnMask, sensor)) ? 1u : 0u));
}
Iam not able to detect the finger press,Please let me know where the issue is.
Thanks & Regards,
Pramod
Show LessHi,
I am using CYBLE-014008-EVAL for my development.
I have developed my project based on the 'BLE_Heart_Rate_Sensor' code example.
I want to add the 'Health Thermometer' service to the existing 'Heart Rate Sensor' profile by just adding the service (BLE module -> Profiles -> Add Service).
Then, I add several lines of code to the main() as below:
main()
{
...
/* Register service specific callback function */
CyBle_HtsRegisterAttrCallback(HtsCallBack);
...
while(1)
{
...
/* Send temperature to client */
apiResult = CyBle_HtssSendIndication(cyBle_connHandle, CYBLE_HTS_TEMP_MEASURE, sizeof(temp_data), temp_data);
...
}
}
However, after I established the BT connection with my android mobile which was running CySmart app, I did not find the 'Health Thermometer' service on the CySmart app.
In addition, when I tapped the 'GATT DB' icon, I did not find the 'Health Thermometer' service there.
Are there I missed? / Did I make any mistakes?
Please help.
Thanks!
Terry
Show Less