Turn off wifi and bt?
Turn off wifi and bt?
I suspect that my prototype board has some interference issue so I would like to turn off wifi and bt. Is there any esp-idf calls that can do that? Thanks.
-
- Posts: 45
- Joined: Thu Aug 22, 2019 3:48 am
Re: Turn off wifi and bt?
It might be my ignorance or my misunderstanding your question, but I thought you had to turn on both BT and WiFi.
Therefore neither should be working if you have not called the functions to turn them on.
Susan
Therefore neither should be working if you have not called the functions to turn them on.
Susan
Re: Turn off wifi and bt?
I am not sure. So I am as ignorant as the next person with this question. I suspect that the hardware might be on by default but it would be great to hear from someone who has a clear answer.
Re: Turn off wifi and bt?
Not on by default, so not using it should be equivalent to enabling and then disabling.
If you need to disable after calling esp_wifi_init() then you can call esp_wifi_deinit():
https://docs.espressif.com/projects/esp ... fi_deinitv
You can also de-initialize the BT controller:
https://docs.espressif.com/projects/esp ... er_deinitv
But these APIs should only be called after the corresponding APIs to enable wifi/BT have been called.
If you need to disable after calling esp_wifi_init() then you can call esp_wifi_deinit():
https://docs.espressif.com/projects/esp ... fi_deinitv
You can also de-initialize the BT controller:
https://docs.espressif.com/projects/esp ... er_deinitv
But these APIs should only be called after the corresponding APIs to enable wifi/BT have been called.
Re: Turn off wifi and bt?
Thanks ESP_Angus. It's good to know that. I think my misunderstanding stems from my earlier exposure with ESP8266-Arduino. It always auto-reconnects to the last AP when restarted that must mean that "ESP8266 starts with WiFi turned on". It might have been a feature in ESP8266-Arduino to make it easy to use?! Once I got my first ESP32, it was MicroPython time! Now it's ESP-IDF time, down to the layer that everything else has been built on. If only I had time to read all the 2,000 pages of documents, I'd be better of already
Who is online
Users browsing this forum: Bing [Bot] and 144 guests