I wanted to contact you about Proximity Bonding app which notes that you are the "owner". Sorry, but I was unable to find any other way to reach you except by "reply"ing to one of your posts. (This is my first PSoC 4-BLE project).
Anyway, I'm trying to use the Proximity Bonding app with a CYBLE -214009-00 module. I have two questions that I've been unable to find answers to.
1. When trying to bond with an iPad the pairing request shows up on the iPad ("LBE4A WF1" would like to pair with your iPad) but it goes away before I can respond. Can you tell me what controls how long this message appears?
2. I want one and only one iPad central to be able to bond with each peripheral running the Proximity Bonding app. As I understand it, the app, as written, can (somehow) bond with up to 8, I think, other devices. Can you tell me what I have to do to limit this number to 1?
Thanks for your help,
1. The connection, bonding and pairing would happen only if the BLE peripheral is held in close proximity to the central device. The message (assuming that it is the advertisement data) should be scanned by the iPad as long as the peripheral device is held close to the iPad. If you move the devices away during the connection or bonding or pairing phase, the respective process will fail.
2. If I recall correctly, the peripheral application will first bond with that central device that is held in close proximity to it. If there is a link loss, the peripheral device will advertise at full tx power but with whitelist enabled. So only the bonded iPad device should be able to connect and bond to the peripheral and no other device should be able to do so because before the first connection (and then bonding), even if there are more than 1 devices, the peripheral can connect and therefore bond to just 1 device held close to it.
GRSR, Thanks for your response. I understand now. Having gotten this far I expected to have gotten the next step done before meeting with my client on Friday 6/15, I have not been able to figure it out. (I'm an old guy that's pretty new to PSoCs and BLE). What I need to do is so simple I'm embarrassed to ask the question, but here it is anywhere. I have created a write without response characteristic which I want to receive a 1 or a 0 from an iPad and turn on or off a pin. Problem is I don't really know how to do that nor exactly where to put it in the Proximity Bonding code. I haven't been able to find any examples or explanations that address anything so simple. I'd really appreciate it if you could either tell me how/where to do this or where I can find this info.
Assuming you are using the peripheral setup as a GATT server device:
Use CyBle_GattcWriteWithoutResponse() to send the value from the ipad.
Upon receiving the CYBLE_EVT_GATTS_WRITE_REQ event inside of your BLE callback event handler, you can cast the eventParam pointer to a pointer of type CYBLE_GATTS_WRITE_REQ_PARAM_T. Then, check the handleValPair.attrHandle to make sure it is writing to the characteristic you want to be the "pin toggling" characteristic.
If it is, then you can take the value from handleValPair.value.val (pointer) and toggle the pin output with PinName_Write(0); or PinName_Write(1); based on the value.