ESP32 BT SPP Master does not connect

engrshoaibali
Posts: 4
Joined: Tue Feb 08, 2022 10:00 pm

ESP32 BT SPP Master does not connect

Postby engrshoaibali » Tue Feb 08, 2022 10:09 pm

Hi
I am using AT firmware 2.2 on ESP32 WROVER board. I can connect the ESP32 as BT SPP slave to a PC without any issues.

I have a Parani Bluetooth dongle SD-1000 that I can use as SPP Master or Slave.
If I use that as Master and ESP32 as BT SPP Slave, it works.
If I use Parani device as BT SPP Slave, with PC (as Master) it works.

However, if I use ESP32 BT SPP as Master and Parani as Slave, it doesn't work. ESP32 connection fails and just gives "ERROR" without any clue of the failure cause.

Please see the snapshot below of the AT commands interface with ESP32:

ready
AT+GMR
AT+GMR
AT version:2.2.0.0(s-c6fa6bf - ESP32 - Jul 2 2021 06:45:01)
SDK version:v4.2.2-76-gefa6eca
compile time(3a696ba):Jul 2 2021 11:50:38
Bin version:2.2.0(WROVER-32)

OK
AT+BTINIT=1
AT+BTINIT=1

OK
AT+BTNAME="TEK926"
AT+BTNAME="TEK926"

OK
AT+BTSPPINIT=1
AT+BTSPPINIT=1

OK
AT+BTSTARTDISC=0,10,10
AT+BTSTARTDISC=0,10,10
+BTSTARTDISC:"34:68:95:87:fd:60",,0x4,0xf,0x40,-90
+BTSTARTDISC:"00:01:95:5f:e3:17",,,,-17
+BTSTARTDISC:"00:01:95:5f:e3:17",,,,-18
+BTSTARTDISC:"70:54:b4:d7:84:22",TOSHIBA TV,0x4,0xf,0x40,-83
+BTSTARTDISC:"70:54:b4:d7:84:22",TOSHIBA TV,0x4,0xf,0x40,-84
+BTSTARTDISC:"00:01:95:5f:e3:17",,,,-16
+BTSTARTDISC:"54:13:79:ce:c1:ee",,0x4,0xf,0x40,-88
+BTSTARTDISC:"54:13:79:ce:c1:ee",,0x4,0xf,0x40,-85
+BTSTARTDISC:"70:54:b4:d7:84:22",,0x4,0xf,0x40,-85
+BTSTARTDISC:"70:54:b4:d7:84:22",TOSHIBA TV,0x4,0xf,0x40,-83
+BTSTARTDISC:"00:01:95:5f:e3:17",,,,-17
+BTSTARTDISC:"70:54:b4:d7:84:22",TOSHIBA TV,0x4,0xf,0x40,-81
+BTSTARTDISC:"70:54:b4:d7:84:22",TOSHIBA TV,0x4,0xf,0x40,-83
+BTSTARTDISC:"00:01:95:5f:e3:17",,,,-17
+BTSTARTDISC:"70:54:b4:2f:98:48",TOSHIBA TV,0x4,0xf,0x40,-91
+BTSTARTDISC:"00:01:95:5f:e3:17"
+BTSTARTDISC:"54:13:79:ce:c1:ee"
+BTSTARTDISC:"34:68:95:87:fd:60"

OK
AT+BTSPPCONN=0,0,"00:01:95:5f:e3:17"
AT+BTSPPCONN=0,0,"00:01:95:5f:e3:17"

ERROR

No matter what MAC address I use, it always gives "ERROR". I have tried to use "Authorisation" at both ends too but no success.

I have seen the documentation and examples. I have also seen some scattered posts about others facing the same issue.

Please could you help resolve this - we are unable to proceed with the project due to this issue.

Thanks

ESP_Sun
Posts: 326
Joined: Thu Dec 30, 2021 9:52 am

Re: ESP32 BT SPP Master does not connect

Postby ESP_Sun » Wed Feb 09, 2022 4:07 am

If ESP32 is used as master and PC is used as Slave, a spp server program must be started on the computer (it need to be developed and implemented by yourself), and then esp32 will be used as client to discover and connect.

engrshoaibali
Posts: 4
Joined: Tue Feb 08, 2022 10:00 pm

Re: ESP32 BT SPP Master does not connect

Postby engrshoaibali » Wed Feb 09, 2022 8:58 am

I am not using PC as slave. I am using another BT device as slave (Parani SD1000) and that device works perfectly fine when used with PC as a slave.

We have existing product where a Classic BT module works with this Slave and trying to use ESP32 in this existing product.

How can we get the details of this "ERROR" given by the module? Does ESP32 BT SPP Master support a pin code?

ESP_Sun
Posts: 326
Joined: Thu Dec 30, 2021 9:52 am

Re: ESP32 BT SPP Master does not connect

Postby ESP_Sun » Thu Feb 10, 2022 4:00 am

1. If you want to get the detailed information of this "ERROR" given by the module, please change the picture 1 and picture 2 in the following attachments (
bt_menuconfig.zip
(160.9 KiB) Downloaded 540 times
) and change the menuconfig configuration to compile the firmware by yourself.
2. You can compile the firmware support pin code by yourself after changing the menuconfig configuration as shown in Figure 3 in the attachment (
bt_menuconfig.zip
(160.9 KiB) Downloaded 540 times
).

Who is online

Users browsing this forum: No registered users and 38 guests