Other Parts Discussed in Thread: CC2642R
Hi everyone,
We are creating some demo in which we are making one device (cc2340/cc2642r) work as a peripheral and other as central device (cc2340/cc2642r). So basically, we are using two buttons wherein one device (peripheral) come in range (< 10m) of another device (central) the peripheral device shall be capable of sending some data on button press in advertisement data.
So initially the peripheral device is in sleep mode and central device is scanning at some interval. when peripheral device come in range (<10m) and user presses button (peripheral device ) it shall send advertisement packet and in advertisement packet the state of button shall be sent. When second button on board is pressed it shall send second button state in advertisement packet and according to button state it shall glow the LED of the central device. This the overall working.
My queries are: -
1) Firstly, can a peripheral device be able send data because according to BLE concept the peripheral is like server which contains data and central device is a client which request data. So, client can only request data from server and server send response to data, please correct me if I am wrong? So, in above case peripheral is sending data. Is it possible to send data if it in peripheral mode and if yes than what are the ways can you please suggest some ways?
2) Is it possible to send the state of button on advertisement packet whenever button is pressed? Is it possible, If yes how can we send data as advertisement packet is of 31 bytes. Whenever button is pressed it shall send that pressed button data on advertisement packet is it achievable? Only in advertisement packet it shall send button state.
2) Main thing is current consumption. The current shall be in range of 3ua to 10ua (lets says we have 3V battery). that's why we are sending button state in advertisement packet and after some time the peripheral device shall go in sleep mode in where current shall be in microampere? Is there any application note on how configure device for low current consumption for both peripheral and central device .
3) One way of sending the state of button according to me is making first device acts as a central and other device as peripheral on every button press it shall write/send button pressed state after connection on peripheral and blink the LED on peripheral device. But here the concern is current consumption will be more because of scanning ( req current consumption shall be in range of 3ua to 10ua) ? Is it possible to achieve low current as a central device? If yes how?
Thanks & Regards,
Sandeep Sonawane