Page 1 of 1
Ble Server Connecting to Ble Client
Posted: Thu Jun 27, 2019 7:55 am
by wan420
Hello,
I am trying to create a scenario, where a bleServer scans for beacontags and once the scan is complete , It will connect to bleClient and send the data. Now i saw the example codes of both ble server and client. The regular way was for the bleClient to scan for bleServer and connect to it and get the characteristics, now is there any way for the bleServer to connect to the bleClient and send the characteristic value. I can predefine the bleClients mac address, but where to go after that?
Thank you
Re: Ble Server Connecting to Ble Client
Posted: Fri Jun 28, 2019 8:33 am
by chegewara
There is one way to do it, your server already has implemented scan option, now your client has to implement advertising option too.
Re: Ble Server Connecting to Ble Client
Posted: Mon Jul 01, 2019 5:54 am
by wan420
If the client is advertising, the I can connect to the client and write the characteristics? Sorry I am super late in replying..
Re: Ble Server Connecting to Ble Client
Posted: Mon Jul 01, 2019 5:58 am
by wan420
I am actually trying to scan and transmit data via bluetooth together, with a single antenna, I think it is not possible without stopping the scan. There is another thing, esp32 wrover-b module with ipex antenna, if I use this module, and attach another antenna, is it possible for me to use 1 antenna for scanning and another for transmitter? Sorry for posting too many questions in the reply.
Thank you.
Re: Ble Server Connecting to Ble Client
Posted: Mon Jul 01, 2019 4:18 pm
by chegewara
wan420 wrote: ↑Mon Jul 01, 2019 5:54 am
If the client is advertising, the I can connect to the client and write the characteristics? Sorry I am super late in replying..
Yes, if client is advertising then you can connect to it and then you can write from client to server characteristics.
wan420 wrote: ↑Mon Jul 01, 2019 5:58 am
I am actually trying to scan and transmit data via bluetooth together, with a single antenna, I think it is not possible without stopping the scan. There is another thing, esp32 wrover-b module with ipex antenna, if I use this module, and attach another antenna, is it possible for me to use 1 antenna for scanning and another for transmitter? Sorry for posting too many questions in the reply.
Thank you.
You can scan and advertise at the same time with just 1 antenna.
I cant answer about using 2 antennas, i dont have knowledge about it. I know that wifi can use 2 antennas and there is API for that, but i dont know about BLE.
Maybe @Angus or bluetooth team member could answer this question.
Re: Ble Server Connecting to Ble Client
Posted: Tue Jul 02, 2019 6:20 am
by wan420
chegewara wrote: ↑Mon Jul 01, 2019 4:18 pm
wan420 wrote: ↑Mon Jul 01, 2019 5:54 am
If the client is advertising, the I can connect to the client and write the characteristics? Sorry I am super late in replying..
Yes, if client is advertising then you can connect to it and then you can write from client to server characteristics.
wan420 wrote: ↑Mon Jul 01, 2019 5:58 am
I am actually trying to scan and transmit data via bluetooth together, with a single antenna, I think it is not possible without stopping the scan. There is another thing, esp32 wrover-b module with ipex antenna, if I use this module, and attach another antenna, is it possible for me to use 1 antenna for scanning and another for transmitter? Sorry for posting too many questions in the reply.
Thank you.
You can scan and advertise at the same time with just 1 antenna.
I cant answer about using 2 antennas, i dont have knowledge about it. I know that wifi can use 2 antennas and there is API for that, but i dont know about BLE.
Maybe @Angus or bluetooth team member could answer this question.
Thanks for the clarification on the above details.
Just for clearing my head, are you telling me that, scanning as well as advertising itself so that other client can connect and continously recieve the scanned data is a possibility?
Re: Ble Server Connecting to Ble Client
Posted: Tue Jul 02, 2019 6:59 am
by chegewara
I didnt try such case but i think its possible.