Bluetooth spp does't work in ESP32

Any bugs you encounter with Flowcode should be discussed here.
wardelder
Posts: 10
http://meble-kuchenne.info.pl
Joined: Thu Dec 10, 2020 5:06 pm

Re: Bluetooth spp does't work in ESP32

Post 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.

wardelder
Posts: 10
Joined: Thu Dec 10, 2020 5:06 pm

Re: Bluetooth spp does't work in ESP32

Post 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.

BenR
Matrix Staff
Posts: 1706
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 435 times
Been thanked: 598 times

Re: Bluetooth spp does't work in ESP32

Post 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.

wardelder
Posts: 10
Joined: Thu Dec 10, 2020 5:06 pm

Re: Bluetooth spp does't work in ESP32

Post 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.

zipidy66
Posts: 7
Joined: Sat Dec 05, 2020 11:31 pm

Re: Bluetooth spp does't work in ESP32

Post 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

dvcam99
Posts: 89
Joined: Fri Dec 04, 2020 11:03 am
Has thanked: 6 times
Been thanked: 12 times

Re: Bluetooth spp does't work in ESP32

Post 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
Happy FC9, FC-8 and FC-6 professional user ;)

zipidy66
Posts: 7
Joined: Sat Dec 05, 2020 11:31 pm

Re: Bluetooth spp does't work in ESP32

Post 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

dvcam99
Posts: 89
Joined: Fri Dec 04, 2020 11:03 am
Has thanked: 6 times
Been thanked: 12 times

Re: Bluetooth spp does't work in ESP32

Post 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
Happy FC9, FC-8 and FC-6 professional user ;)

dvcam99
Posts: 89
Joined: Fri Dec 04, 2020 11:03 am
Has thanked: 6 times
Been thanked: 12 times

Re: Bluetooth spp does't work in ESP32

Post by dvcam99 »

...ok I found WIN10 BT Terminal software can do the monitor job.

BR

Dirk
Happy FC9, FC-8 and FC-6 professional user ;)

BenR
Matrix Staff
Posts: 1706
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 435 times
Been thanked: 598 times

Re: Bluetooth spp does't work in ESP32

Post 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.

Post Reply