Update IDF to 3.2-3276a13 and esptool.py to 2.5.0 (#1878)

* TX Flow Control and Code cleanup

* Use semaphore instead of delay

TX functionality is done.

* Use single buffer and empty queue on exit

* Fix compile issues because of LwIP code relocation

* Add temporary header to fix Azure not compiling

* Fix AsyncUDP early init

* AsyncUDP Multicast fixes

* Add source mac address and rework multicast

* Allow redefinition of default pins for Serials 1 and 2

* Update IDF to 3276a13

* Update esptool.py to 2.5.0

* Fix sketches

* Fix log level in BluetoothSetial
This commit is contained in:
Me No Dev
2018-09-21 08:39:36 +02:00
committed by GitHub
parent 4e96bffe0e
commit 96822d783f
447 changed files with 37993 additions and 10849 deletions

View File

@ -34,23 +34,30 @@ extern "C" {
*******************************************************/
typedef struct {
int scan; /**< minimum scan times before being a root, default:10 */
int vote; /**< max vote times in self-healing, default:10000 */
int vote; /**< max vote times in self-healing, default:1000 */
int fail; /**< parent selection fail times, if the scan times reach this value,
will disconnect with associated children and join self-healing. default:60 */
int monitor_ie; /**< acceptable times of parent ie change before update self ie, default:3 */
device will disconnect with associated children and join self-healing. default:60 */
int monitor_ie; /**< acceptable times of parent networking IE change before update its own networking IE. default:3 */
} mesh_attempts_t;
typedef struct {
int duration_ms; /* parent weak RSSI monitor duration, if the RSSI continues to be weak during this duration_ms,
will switch to a better parent */
int cnx_rssi; /* RSSI threshold for keeping a good connection with parent */
int select_rssi; /* RSSI threshold for parent selection, should be a value greater than switch_rssi */
int switch_rssi; /* RSSI threshold for action to reselect a better parent */
device will search for a new parent. */
int cnx_rssi; /* RSSI threshold for keeping a good connection with parent.
If set a value greater than -120 dBm, a timer will be armed to monitor parent RSSI at a period time of duration_ms. */
int select_rssi; /* RSSI threshold for parent selection. It should be a value greater than switch_rssi. */
int switch_rssi; /* Disassociate with current parent and switch to a new parent when the RSSI is greater than this set threshold. */
int backoff_rssi; /* RSSI threshold for connecting to the root */
} mesh_switch_parent_t;
typedef struct {
int high;
int medium;
int low;
} mesh_rssi_threshold_t;
/**
* @brief mesh networking IE
* @brief Mesh networking IE
*/
typedef struct {
/**< mesh networking IE head */
@ -58,8 +65,8 @@ typedef struct {
uint8_t len; /**< element length */
uint8_t oui[3]; /**< organization identifier */
/**< mesh networking IE content */
uint8_t type; /** mesh networking IE type */
uint8_t encryped : 1; /**< if mesh networking IE is encrypted */
uint8_t type; /** ESP defined IE type */
uint8_t encryped : 1; /**< whether mesh networking IE is encrypted */
uint8_t version : 7; /**< mesh networking IE version */
/**< content */
uint8_t mesh_type; /**< mesh device type */
@ -73,14 +80,14 @@ typedef struct {
uint16_t root_cap; /**< root capacity */
uint16_t self_cap; /**< self capacity */
uint16_t layer2_cap; /**< layer2 capacity */
uint16_t scan_ap_num; /**< the number of scanned APs */
int8_t rssi; /**< rssi of the parent */
int8_t router_rssi; /**< rssi of the router */
uint16_t scan_ap_num; /**< the number of scanning APs */
int8_t rssi; /**< RSSI of the parent */
int8_t router_rssi; /**< RSSI of the router */
uint8_t flag; /**< flag of networking */
uint8_t rc_addr[6]; /**< root address */
int8_t rc_rssi; /**< root rssi */
int8_t rc_rssi; /**< root RSSI */
uint8_t vote_addr[6]; /**< voter address */
int8_t vote_rssi; /**< vote rssi of the router */
int8_t vote_rssi; /**< vote RSSI of the router */
uint8_t vote_ttl; /**< vote ttl */
uint16_t votes; /**< votes */
uint16_t my_votes; /**< my votes */
@ -93,9 +100,9 @@ typedef struct {
* Function Definitions
*******************************************************/
/**
* @brief set mesh softAP beacon interval
* @brief Set mesh softAP beacon interval
*
* @param interval beacon interval(ms) (100ms ~ 60000ms)
* @param[in] interval beacon interval (msecs) (100 msecs ~ 60000 msecs)
*
* @return
* - ESP_OK
@ -105,9 +112,9 @@ typedef struct {
esp_err_t esp_mesh_set_beacon_interval(int interval_ms);
/**
* @brief get mesh softAP beacon interval
* @brief Get mesh softAP beacon interval
*
* @param interval beacon interval(ms)
* @param[out] interval beacon interval (msecs)
*
* @return
* - ESP_OK
@ -115,9 +122,9 @@ esp_err_t esp_mesh_set_beacon_interval(int interval_ms);
esp_err_t esp_mesh_get_beacon_interval(int *interval_ms);
/**
* @brief set attempts for mesh self-organized networking
* @brief Set attempts for mesh self-organized networking
*
* @param attempts
* @param[in] attempts
*
* @return
* - ESP_OK
@ -126,40 +133,77 @@ esp_err_t esp_mesh_get_beacon_interval(int *interval_ms);
esp_err_t esp_mesh_set_attempts(mesh_attempts_t *attempts);
/**
* @brief get attempts for mesh self-organized networking
* @brief Get attempts for mesh self-organized networking
*
* @param attempts
* @param[out] attempts
*
* @return
* - ESP_OK
* - ESP_FAIL
* - ESP_ERR_MESH_ARGUMENT
*/
esp_err_t esp_mesh_get_attempts(mesh_attempts_t *attempts);
/**
* @brief set parameters for parent switch
* @brief Set parameters for parent switch
*
* @param paras parameters for parent switch
* @param[in] paras parameters for parent switch
*
* @return
* - ESP_OK
* - ESP_FAIL
* - ESP_ERR_MESH_ARGUMENT
*/
esp_err_t esp_mesh_set_switch_parent_paras(mesh_switch_parent_t *paras);
/**
* @brief get parameters for parent switch
* @brief Get parameters for parent switch
*
* @param paras parameters for parent switch
* @param[out] paras parameters for parent switch
*
* @return
* - ESP_OK
* - ESP_FAIL
* - ESP_ERR_MESH_ARGUMENT
*/
esp_err_t esp_mesh_get_switch_parent_paras(mesh_switch_parent_t *paras);
/**
* @brief print the number of txQ waiting
* @brief Set RSSI threshold
* - The default high RSSI threshold value is -78 dBm.
* - The default medium RSSI threshold value is -82 dBm.
* - The default low RSSI threshold value is -85 dBm.
*
* @param[in] threshold RSSI threshold
*
* @return
* - ESP_OK
* - ESP_ERR_MESH_ARGUMENT
*/
esp_err_t esp_mesh_set_rssi_threshold(const mesh_rssi_threshold_t *threshold);
/**
* @brief Get RSSI threshold
*
* @param[out] threshold RSSI threshold
*
* @return
* - ESP_OK
* - ESP_ERR_MESH_ARGUMENT
*/
esp_err_t esp_mesh_get_rssi_threshold(mesh_rssi_threshold_t *threshold);
/**
* @brief Enable the minimum rate to 6 Mbps
*
* @attention This API shall be called before Wi-Fi is started.
*
* @param[in] is_6m enable or not
*
* @return
* - ESP_OK
*/
esp_err_t esp_mesh_set_6m_rate(bool is_6m);
/**
* @brief Print the number of txQ waiting
*
* @return
* - ESP_OK
@ -168,7 +212,7 @@ esp_err_t esp_mesh_get_switch_parent_paras(mesh_switch_parent_t *paras);
esp_err_t esp_mesh_print_txQ_waiting(void);
/**
* @brief print the number of rxQ waiting
* @brief Print the number of rxQ waiting
*
* @return
* - ESP_OK
@ -177,9 +221,9 @@ esp_err_t esp_mesh_print_txQ_waiting(void);
esp_err_t esp_mesh_print_rxQ_waiting(void);
/**
* @brief set passive scan time
* @brief Set passive scan time
*
* @param interval_ms passive scan time(ms)
* @param[in] interval_ms passive scan time (msecs)
*
* @return
* - ESP_OK
@ -189,12 +233,35 @@ esp_err_t esp_mesh_print_rxQ_waiting(void);
esp_err_t esp_mesh_set_passive_scan_time(int time_ms);
/**
* @brief get passive scan time
* @brief Get passive scan time
*
* @return interval_ms passive scan time(ms)
* @return interval_ms passive scan time (msecs)
*/
int esp_mesh_get_passive_scan_time(void);
/**
* @brief Set announce interval
* - The default short interval is 500 milliseconds.
* - The default long interval is 3000 milliseconds.
*
* @param[in] short_ms shall be greater than the default value
* @param[in] long_ms shall be greater than the default value
*
* @return
* - ESP_OK
*/
esp_err_t esp_mesh_set_announce_interval(int short_ms, int long_ms);
/**
* @brief Get announce interval
*
* @param[out] short_ms short interval
* @param[out] long_ms long interval
*
* @return
* - ESP_OK
*/
esp_err_t esp_mesh_get_announce_interval(int *short_ms, int *long_ms);
#ifdef __cplusplus
}