Page 2 of 3

Re: Bluetooth spp does't work in ESP32

Posted: Tue Dec 29, 2020 5:48 pm
by wardelder
I managed to get the Bluetooth radio to show up on my phone (Samsung). I had to change the sdkconfig file to the following:
#
# Bluetooth
#
CONFIG_BT_ENABLED=y

#
# Bluetooth controller
#
# CONFIG_BTDM_CTRL_MODE_BLE_ONLY is not set
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=y
# CONFIG_BTDM_CTRL_MODE_BTDM is not set

I could not make it work until I made EDR mode active. The other two modes did not work.

Now I have to do some more testing to see if I can get the Bluetooth radio to do something productive.

Re: Bluetooth spp does't work in ESP32

Posted: Wed Dec 30, 2020 12:22 am
by wardelder
I have the ESP32 Bluetooth connecting. I can send a String to it fine. If I try to send a String "from" the ESP32, it restarts. I assume it is crashing. I have an external 2Amp 5v power supply on the VIN pin of the ESP32 dev board. So power is not the issue.

Re: Bluetooth spp does't work in ESP32

Posted: Wed Dec 30, 2020 10:02 pm
by BenR
Hello,

In my test program I was echoing back bytes and that was working fine. Can you try this and see if it's still resetting for you.

I'll try and replicate the string problems here.

Re: Bluetooth spp does't work in ESP32

Posted: Wed Dec 30, 2020 10:31 pm
by wardelder
Bytes work fine to and from the ESP32. No reset. I can even send a String "to" the ESP32. I cannot send a string "from" the ESP32 without a reset occuring.

Re: Bluetooth spp does't work in ESP32

Posted: Thu Jan 07, 2021 10:53 pm
by zipidy66
Hi,
I am also having issues with the Bluetooth not advertising/available to see or connect to. I have tried all the previous suggestions and other people's trials to no avail. It will compile and program ok to the chip, I have simple led blinking to make sure it is alive and running the program.

I have also checked that the device is functional by compiling and running an example bluetooth program with the arduino IDE.

Thanks
Pete

Re: Bluetooth spp does't work in ESP32

Posted: Fri Jan 08, 2021 12:31 am
by dvcam99
wardelder wrote:
Tue Dec 29, 2020 5:48 pm
I managed to get the Bluetooth radio to show up on my phone (Samsung). I had to change the sdkconfig file to the following:
#
# Bluetooth
#
CONFIG_BT_ENABLED=y

#
# Bluetooth controller
#
# CONFIG_BTDM_CTRL_MODE_BLE_ONLY is not set
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=y
# CONFIG_BTDM_CTRL_MODE_BTDM is not set

I could not make it work until I made EDR mode active. The other two modes did not work.

Now I have to do some more testing to see if I can get the Bluetooth radio to do something productive.
Hello together

I could duplicate this solution. My PC now saw the "Flowcode BT SPP". But my ESP32 DevKitC V4 is resetting to.
I have the feeling that the software hangs and then the controller is resetting.

BR

Dirk

Re: Bluetooth spp does't work in ESP32

Posted: Fri Jan 08, 2021 5:39 am
by zipidy66
zipidy66 wrote:
Thu Jan 07, 2021 10:53 pm
Hi,
I am also having issues with the Bluetooth not advertising/available to see or connect to. I have tried all the previous suggestions and other people's trials to no avail. It will compile and program ok to the chip, I have simple led blinking to make sure it is alive and running the program.

I have also checked that the device is functional by compiling and running an example bluetooth program with the arduino IDE.

Thanks
Pete
***UPDATE***

After tiresome try try and try again, I have it working. the final solution in the end was the "CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=y"

BUT The major problem was IOS... Apple devices cannot see it. This has me in a tail spin. when I tested it with the sample Arduino IDE program
I could see and connect to it from the Apple device. Now that I am using an android device it is visible and connectable with the Flowcode program.

Can anyone else confirm they can connect to it with a apple device?

I have tested the "send string" macro and confirm it resets on two separate devices

Thanks

Re: Bluetooth spp does't work in ESP32

Posted: Fri Jan 08, 2021 9:26 am
by dvcam99
Hello Pete,

I could now confirm that I can connect to my PC-BT and a Samsung-BT phone.
Unfortunately I have no iPhone availabel here to cross check for you.

My problem yesterday with contin. resetting the ESP32 was maybe my selection of ESP32 DEVkit as a target device.

Selecting ESP-32 WROOM and using your BT config line "CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=y" made the difference.

Question: What tool do you use/recommend in order to monitor a Sting that you sent out via BT string component?

BR
Dirk

Re: Bluetooth spp does't work in ESP32

Posted: Fri Jan 08, 2021 10:26 am
by dvcam99
...ok I found WIN10 BT Terminal software can do the monitor job.

BR

Dirk

Re: Bluetooth spp does't work in ESP32

Posted: Fri Jan 08, 2021 12:41 pm
by BenR
Hello wardelder,

I've looked at the send string bug and hopefully fixed this now. I would be interested as to how you get on with the send array function.


Hello Dirk,

Thanks for letting us know how you overcame the problem. Glad it's working for you now.

I use RealTerm here but there are many similar type serial consoles you can use. The BT Terminal program sounds interesting.


Hello zipidy66,

Thanks for letting us know your fix to get things working.

We are using the SPP as part of the BT Legacy profile and I think Apple hardware has made a desicion to not allow SPP data. It's not that the hardware can't do it, just that Apple don't want you doing it. So maybe the arduino code is using a more modern BT4 type profile which is supported by Apple. I will try and investigate this for you and see if we can update our component to match.