Pause or stop bluetooth

gregstewart90
Posts: 59
Joined: Thu Jan 19, 2017 5:17 pm

Pause or stop bluetooth

Postby gregstewart90 » Tue Oct 24, 2017 1:44 pm

I'm using libssh2 to ssh into a few devices from the esp32. It works great for my application, but when I enable bluetooth, the ssh session cannot connect. I know there are [ur=https://esp32.com/viewtopic.php?f=2&t=3 ... 4d#p15863l]problems[/url] with WIFI and BLE existing at the same time. In OTA updates, I always disable bluetooth, and it works much better. Is there a way to pause bluetooth while I run a couple ssh commands?

Just before I call ssh_init to start the ssh session, I could call esp_pause_bluetooth. Once I finish all of the ssh commands, I could call esp_unpause_bluetooth. Probably not a build in function but is there a way I can do something like that?

How about disabling bluetooth? I currently just call

Code: Select all

	esp_bt_controller_disable();
	esp_bluedroid_disable();
	esp_ble_gatts_app_unregister(PROFILE_A_APP_ID);
This seems to work pretty well for the OTA, but even after I call this, the ssh session still fails. If I comment out the function call that starts bluetooth, the ssh library works perfect every time.

Who is online

Users browsing this forum: No registered users and 87 guests