hello, anyone have succes connecting two esp32 via ble?
here first one white role server:
[TX] AT+BLEINIT=2<CR><LF>
[RX] AT+BLEINIT=2<CR><LF>
<CR><LF>
OK<CR><LF>
[TX] AT+BLEINIT?<CR><LF>
[RX] AT+BLEINIT?<CR><LF>
+BLEINIT:2<CR><LF>
<CR><LF>
OK<CR><LF>
[TX] AT+BLEADVDATA="1122334455"<CR><LF>
[RX] AT+BLEADVDATA="1122334455"<CR><LF>
<CR><LF>
OK<CR><LF>
[TX] AT+BLEADVSTART<CR><LF>
[RX] AT+BLEADVSTART<CR><LF>
<CR><LF>
OK<CR><LF>
On second esp32 white client role: (can see adv data from server)
[TX] AT+BLEINIT=1<CR><LF>
[RX] AT+BLEINIT=1<CR><LF>
<CR><LF>
OK<CR><LF>
[TX] AT+BLEINIT?<CR><LF>
[RX] AT+BLEINIT?<CR><LF>
+BLEINIT:1<CR><LF>
<CR><LF>
OK<CR><LF>
[TX] AT+BLESCAN=1<CR><LF>
[RX] AT+BLESCAN=1<CR><LF>
<CR><LF>
OK<CR><LF>
+BLESCAN:30:ae:a4:12:07:76,-42,1122334455d6d563fd3fa8c5fd3f3cfdfe3f,<CR><LF>
[TX] AT+BLESCAN=0<CR><LF>
[RX] AT+BLESCAN=0<CR><LF>
<CR><LF>
OK<CR><LF>
now connect :
[TX] AT+BLECONN=0,"30:ae:a4:12:07:76"<CR><LF>
[RX] AT+BLECONN=0,"30:ae:a4:12:07:76"<CR><LF>
<CR><LF>
OK<CR><LF>
verifying:
[TX] AT+BLECONN?<CR><LF>
[RX] AT+BLECONN?<CR><LF>
+BLECONN:<CR><LF> <--- something messing!!
<CR><LF>
OK<CR><LF>
[TX] AT+BLEDISCONN=0<CR><LF>
[RX] AT+BLEDISCONN=0<CR><LF>
<CR><LF>
ERROR<CR><LF>
trying to disconnect give error because is not connected, any sugestions?
ble between two esp32
Re: ble between two esp32
Im connecting 2 esp32's all the time with ble, but never tried with AT commands. But according to AT instruction it should have work with your commands. Maybe try to connect to server with android or iPhone device to test it is connectable?
+BLECONN:<conn_index>,<remote_address>
OK
If the connection has not been established,
there will NOT be <conn_index> and
<remote_address>
OK
If the connection established successfully, it will
prompt message
+BLECONN:<conn_index>,<remote_address>
It will prompt the message below, if NOT:
+BLECONN:<conn_index>,fail
Re: ble between two esp32
whit an android phone yes is connectable:
+BLECONN:0,"41:d1:5d:7a:b4:2a"<CR><LF>
but not whit an esp32 client role (example above).
+BLECONN:0,"41:d1:5d:7a:b4:2a"<CR><LF>
but not whit an esp32 client role (example above).
Re: ble between two esp32
Then its time to make another test. With android 6.0+ you can create server in nRF connect and then try to connect to it with esp32 client using AT command.fritch wrote:whit an android phone yes is connectable:
+BLECONN:0,"41:d1:5d:7a:b4:2a"<CR><LF>
but not whit an esp32 client role (example above).
Re: ble between two esp32
testing to connect esp32 role client to a server in android 7 whit nrf connect , yes the esp32 client connect succesful.
Who is online
Users browsing this forum: Google [Bot] and 53 guests