Ble Server Connecting to Ble Client

wan420
Posts: 11
Joined: Mon Nov 12, 2018 8:49 am

Ble Server Connecting to Ble Client

Postby wan420 » Thu Jun 27, 2019 7:55 am

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

chegewara
Posts: 2362
Joined: Wed Jun 14, 2017 9:00 pm

Re: Ble Server Connecting to Ble Client

Postby chegewara » Fri Jun 28, 2019 8:33 am

There is one way to do it, your server already has implemented scan option, now your client has to implement advertising option too.

wan420
Posts: 11
Joined: Mon Nov 12, 2018 8:49 am

Re: Ble Server Connecting to Ble Client

Postby wan420 » 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..

wan420
Posts: 11
Joined: Mon Nov 12, 2018 8:49 am

Re: Ble Server Connecting to Ble Client

Postby wan420 » 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.

chegewara
Posts: 2362
Joined: Wed Jun 14, 2017 9:00 pm

Re: Ble Server Connecting to Ble Client

Postby chegewara » 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.

wan420
Posts: 11
Joined: Mon Nov 12, 2018 8:49 am

Re: Ble Server Connecting to Ble Client

Postby wan420 » Tue Jul 02, 2019 6:20 am

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?

chegewara
Posts: 2362
Joined: Wed Jun 14, 2017 9:00 pm

Re: Ble Server Connecting to Ble Client

Postby chegewara » Tue Jul 02, 2019 6:59 am

I didnt try such case but i think its possible.

Who is online

Users browsing this forum: No registered users and 36 guests