Dear Expert,
why simple_peripheral example use notify but don't receive any data from central device?
As I know, notify was used to receive data from central device, right?
Regards
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Dear Expert,
why simple_peripheral example use notify but don't receive any data from central device?
As I know, notify was used to receive data from central device, right?
Regards
Hi,
I am not sure which SDK version and which BLE stack you are using. However, by default, in our examples the Characteristic 4 of the simpe_peripheral is notified to the central (so the central is not sending data using this characteristic). If you want to have an example of data read and write by both sides, you can refer to Characteristic 1. For more details, please have a look to the README file of your example.
I hope this will help,
Regards,
Dear Clément,
I use the SDK <simplelink_cc2640r2_sdk_3_20_00_21> and <blestack /simple_peripheral>.
I read the README file in the example,but I don't understand clearly.
So the Characteristic 4 only notify central but don't receive data from central device?
Characteristic 1 can read and write data from central device?
Regards
Dear YK_Chen,
Sorry, I don't express correctly.
When the central device like smartphone connect CC2640R2 by BLE.
CC2640R2 run <simplelink_cc2640r2_sdk_3_20_00_21> and <blestack /simple_peripheral>
smartphone use Characteristic 4 to notify CC2640R2,right?
But smartphone can't use Characteristic 4 to receive data,is this correct?
Regards
No, characteristic 4 is for sending notification from peripheral to central. You cannot use it in reverse way.
Yes, you have to enable notification from central to peripheral but notification is from peripheral to central after you enable it.
Dear YK Chen,
So why I can't send notification data from peripheral to central after I enable notification?
Regards
If you enable notification of characteristic 4 on simple_peripheral example, can you see simple_peripheral send characteristic 4 notification to central?
Dear YK Chen,
I use smartphone to enable notification of characteristic 4 on simple_peripheral example,
But I can't see simple_peripheral send characteristic 4 notification to smartphone.
readme only says that “ and this characteristic will be updated and will display the value contained in characteristic 3:”
characteristic3 has write property only. Its value can be written to following the same procedure as is detailed for characteristic 1. It has a default value of 0x03.
So I can't see simple_peripheral send characteristic 4 notification to smartphone.
Regards
I try to enable characteristic 4 notification on simple_peripheral from Btool and I can see simple_peripheral sends notification. I suggest you to try this with Btool and see if it works first.
Dear YK Chen,
Would you give me a procedure about using BTool to see simple_peripheral sends notification?
I will follow your procedure to check it.
Regards
Dear YK Chen,
This is only enable notification from BTool ,
not sending data from simple_peripheral to central device(smartphone or BTool),right?
Regards
After you enable notification, simple_peripheral will send notification to central automatically.
Dear YK Chen,
Where can I see that simple_peripheral will send notification to central automatically?
I don't see it in the link you give.
Regards
Dear YK Chen,
I can't access this link, it show that "web can not visit".
Regards
If you are from China, it will block by your Great Wall firewall and I suppose you need to use VPN to access the link.