esp_blufi.rst 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. BLUFI API
  2. =========
  3. Overview
  4. --------
  5. BLUFI is a profile based GATT to config ESP32 WIFI to connect/disconnect AP or setup a softap and etc.
  6. Use should concern these things:
  7. 1. The event sent from profile. Then you need to do something as the event indicate.
  8. 2. Security reference. You can write your own Security functions such as symmetrical encryption/decryption and checksum functions.
  9. Even you can define the "Key Exchange/Negotiation" procedure.
  10. Application Example
  11. -------------------
  12. Check `/examples <https://github.com/espressif/esp-idf/tree/master/examples>`_ folder of `espressif/esp-idf <https://github.com/espressif/esp-idf/>`_ repository, that contains the following example:
  13. `12_blufi <https://github.com/espressif/esp-idf/blob/master/examples/12_blufi/main/>`_
  14. This is a BLUFI demo. This demo can set ESP32's wifi to softap/station/softap&station mode and config wifi connections.
  15. API Reference
  16. -------------
  17. Header Files
  18. ^^^^^^^^^^^^
  19. * `bt/bluedroid/api/include/esp_blufi_api.h <https://github.com/espressif/esp-idf/blob/master/components/bt/bluedroid/api/include/esp_blufi_api.h>`_
  20. Macros
  21. ^^^^^^
  22. Type Definitions
  23. ^^^^^^^^^^^^^^^^
  24. .. doxygentypedef:: esp_blufi_event_cb_t
  25. .. doxygentypedef:: esp_blufi_negotiate_data_handler_t
  26. .. doxygentypedef:: esp_blufi_encrypt_func_t
  27. .. doxygentypedef:: esp_blufi_decrypt_func_t
  28. .. doxygentypedef:: esp_blufi_checksum_func_t
  29. Enumerations
  30. ^^^^^^^^^^^^
  31. .. doxygenenum:: esp_blufi_cb_event_t
  32. .. doxygenenum:: esp_blufi_sta_conn_state_t
  33. .. doxygenenum:: esp_blufi_init_state_t
  34. .. doxygenenum:: esp_blufi_deinit_state_t
  35. Structures
  36. ^^^^^^^^^^
  37. .. doxygenstruct:: esp_blufi_extra_info_t
  38. :members:
  39. .. doxygenstruct:: esp_blufi_cb_param_t
  40. :members:
  41. .. doxygenstruct:: esp_blufi_cb_param_t::blufi_init_finish_evt_param
  42. :members:
  43. .. doxygenstruct:: esp_blufi_cb_param_t::blufi_deinit_finish_evt_param
  44. :members:
  45. .. doxygenstruct:: esp_blufi_cb_param_t::blufi_set_wifi_mode_evt_param
  46. :members:
  47. .. doxygenstruct:: esp_blufi_cb_param_t::blufi_connect_evt_param
  48. :members:
  49. .. doxygenstruct:: esp_blufi_cb_param_t::blufi_disconnect_evt_param
  50. :members:
  51. .. doxygenstruct:: esp_blufi_cb_param_t::blufi_recv_sta_bssid_evt_param
  52. :members:
  53. .. doxygenstruct:: esp_blufi_cb_param_t::blufi_recv_sta_ssid_evt_param
  54. :members:
  55. .. doxygenstruct:: esp_blufi_cb_param_t::blufi_recv_sta_passwd_evt_param
  56. :members:
  57. .. doxygenstruct:: esp_blufi_cb_param_t::blufi_recv_softap_ssid_evt_param
  58. :members:
  59. .. doxygenstruct:: esp_blufi_cb_param_t::blufi_recv_softap_passwd_evt_param
  60. :members:
  61. .. doxygenstruct:: esp_blufi_cb_param_t::blufi_recv_softap_max_conn_num_evt_param
  62. :members:
  63. .. doxygenstruct:: esp_blufi_cb_param_t::blufi_recv_softap_auth_mode_evt_param
  64. :members:
  65. .. doxygenstruct:: esp_blufi_cb_param_t::blufi_recv_softap_channel_evt_param
  66. :members:
  67. .. doxygenstruct:: esp_blufi_cb_param_t::blufi_recv_username_evt_param
  68. :members:
  69. .. doxygenstruct:: esp_blufi_cb_param_t::blufi_recv_ca_evt_param
  70. :members:
  71. .. doxygenstruct:: esp_blufi_cb_param_t::blufi_recv_client_cert_evt_param
  72. :members:
  73. .. doxygenstruct:: esp_blufi_cb_param_t::blufi_recv_server_cert_evt_param
  74. :members:
  75. .. doxygenstruct:: esp_blufi_cb_param_t::blufi_recv_client_pkey_evt_param
  76. :members:
  77. .. doxygenstruct:: esp_blufi_cb_param_t::blufi_recv_server_pkey_evt_param
  78. :members:
  79. .. doxygenstruct:: esp_blufi_callbacks_t
  80. :members:
  81. Functions
  82. ^^^^^^^^^
  83. .. doxygenfunction:: esp_blufi_register_callbacks
  84. .. doxygenfunction:: esp_blufi_profile_init
  85. .. doxygenfunction:: esp_blufi_profile_deinit
  86. .. doxygenfunction:: esp_blufi_send_wifi_conn_report
  87. .. doxygenfunction:: esp_blufi_get_version