Commit graph

10308 commits

Author SHA1 Message Date
Ivan Grokhotkov 09dd8ca3e9 idf_tools.py: when guessing IDF_PATH, set it in the enviroment
This allows the processes launched from idf_tools.py to use the value
of IDF_PATH. One such example is the installation of Python packages,
when requirements.txt uses IDF_PATH to refer to the esp-windows-curses
package.

Closes https://github.com/espressif/esp-idf/issues/4341
2020-01-30 11:57:51 +01:00
Angus Gratton f27a344fc9 Merge branch 'bugfix/parttool_backtraces_v4.0' into 'release/v4.0'
parttool: Avoid unnecessary exception backtrace for legitimate errors (v4.0)

See merge request espressif/esp-idf!7463
2020-01-30 13:36:52 +08:00
Rosa Elena Veiga Otero 02596a7efa tools: work around usbser.sys bug in idf_monitor
implemented workaround in idf_monitor for known usbser.sys bug which
causes changes in RTS signal to only be sent if DTR signal also changes.
Works by forcing a dummy change in DTR signal (re-assigning its current
value, as it has previously been done in the flashing tool)

Closes https://github.com/espressif/esp-idf/pull/4676
2020-01-29 10:36:43 +01:00
Angus Gratton a61fd1e42b Merge branch 'bugfix/esp_timer_stucks_into_esp_timer_impl_set_alarm_v4.0' into 'release/v4.0'
esp_timer/esp32: Fix esp_timer_impl_set_alarm() when CPU and APB freqs are changed (v4.0)

See merge request espressif/esp-idf!7304
2020-01-29 14:25:27 +08:00
Angus Gratton d897e522af soc: Fix esp_ptr_executable() for single core ESP32 config & cache memory
In single core mode, APP CPU cache region is added to the available range.
2020-01-29 10:03:30 +11:00
Angus Gratton 59649ea825 parttool: Fix regression when parsing binary partition data
Regression in a91de43537
2020-01-29 09:40:23 +11:00
Angus Gratton bdb0851065 parttool: Avoid unnecessary exception backtrace for legitimate errors
Previous version used exception handling for program control flow,
which makes for long and confusing backtrace messages if an error
occurs while parsing the CSV (as it also prints the phony error that
occurred while trying to parse as a binary, then prints
"During handling of the above exception, another exception occurred:",
then prints the real error).

Use the same heuristic that is applied in gen_esp32_part, instead.

Also, avoid printing the entire backtrace if the error is a gen_esp32_part
InputError, same as gen_esp32part does.

Found while looking into https://github.com/espressif/esp-idf/issues/4474
2020-01-29 09:40:22 +11:00
KonstantinKondrashov 9a24d95907 esp_timer/esp32: Fix case when alarm_reg > counter_reg but FRC_TIMER_INT_STATUS is not set
Closes: WIFI-1576
Closes: https://github.com/espressif/esp-idf/issues/2954
2020-01-28 21:41:27 +08:00
Sergei Silnov ead0e6da36 idf.py: add monitor-baud option to monitor command 2020-01-27 18:54:37 +01:00
Angus Gratton 08219f3cf5 Merge branch 'bugfix/esp_tls_blocking_timeout_v4.0' into 'release/v4.0'
esp-tls: add timeout for blocking connection (v4.0)

See merge request espressif/esp-idf!7396
2020-01-22 11:44:48 +08:00
Angus Gratton b324ab9c6e Merge branch 'bugfix/mqtt_submodule_ref_update_v4.0' into 'release/v4.0'
mqtt: update submodule to point to latest commit (backport 4.0)

See merge request espressif/esp-idf!7276
2020-01-22 11:29:34 +08:00
morris 93e5a31685 ethernet: always put eth_driver handle in SRAM
Closes https://github.com/espressif/esp-idf/issues/4635
2020-01-21 21:30:34 +08:00
morris 01cc5a38cc ethernet: work with cache disabled 2020-01-21 21:30:18 +08:00
morris 7b128595ac ethernet: optimise tx and rx 2020-01-21 20:51:03 +08:00
Mahavir Jain f48930a040 Merge branch 'nimble/example_update_doc_v4.0' into 'release/v4.0'
NimBLE: Update the documentation link in the examples (v4.0)

See merge request espressif/esp-idf!7365
2020-01-21 17:58:46 +08:00
Roland Dobai 642dc19c25 VFS: Check in select() if the UART driver is installed or not
Closes https://github.com/espressif/esp-idf/issues/4627
2020-01-21 10:11:08 +01:00
Jiang Jiang Jian 55834dd001 Merge branch 'bugfix/wa_dport_and_intr_v4.0' into 'release/v4.0'
esp32: Fix for DPORT (v4.0)

See merge request espressif/esp-idf!7349
2020-01-21 10:49:08 +08:00
baohongde e38c080f79 components/bt: Fix error EIR type in config eir event 2020-01-20 21:50:01 +08:00
David Cermak c7e1416174 esp_tls: added connection timeout to esp_tls_conn_new_sync() 2020-01-20 07:26:51 +01:00
David Cermak e0c88dbd73 esp_tls: fail connection if esp_tls_conn_new() timeouts 2020-01-20 07:08:40 +01:00
Hrishikesh Dhayagude d84677493e NimBLE: Update the documentation link in the examples 2020-01-16 17:12:33 +05:30
KonstantinKondrashov f927957950 esp32: Add UT for DPORT 2020-01-16 13:31:20 +08:00
KonstantinKondrashov 6fca0e3861 esp32: Fix esp_dport_access_reg_read 2020-01-16 13:31:20 +08:00
zhangyanjiao 5202be013a fix the bug for Airkiss 2020-01-16 11:54:02 +08:00
Ivan Grokhotkov 386804d407 intr_alloc: don't call ESP_LOG from a critical section
Calling ESP_LOG from a critical section leads to abort() in 4.1, and
may also randomly abort() in earlier versions.

Closes FCS-268
2020-01-15 04:16:24 +00:00
zhiweijian 93409bd57e component/bt: fix blufi prepare write buf len invalid 2020-01-14 17:25:54 +08:00
zhiweijian 32ba52760f Component/bt: Fix GATTC trigger open event multiple times 2020-01-14 17:24:36 +08:00
Marius Vikhammer 158f2d065d mqtt: update submodule to point to latest commit.
Adds bugfixes for:
 - Too early publishing
 - Potential mutex memory leak
 - CI related issues.
 - Wait for entire connack message
 - Event loop not getting cleaned up

Adds support for ALPN, configurable reconnect time, QEMU CI tests and password
protected client key.

MQTT MR: esp-mqtt/merge_requests/46
Closes IDF-1162
Closes https://github.com/espressif/esp-mqtt/issues/137

MQTT MR: esp-mqtt/merge_requests/47
Closes IDF-1126

MQTT MR: esp-mqtt/merge_requests/48
Closes IDFGH-2197
Closes https://github.com/espressif/esp-idf/issues/4349
Closes https://github.com/espressif/esp-mqtt/issues/140

MQTT MR: esp-mqtt/merge_requests/48
Closes IDFGH-2235
Closes https://github.com/espressif/esp-idf/issues/4384

MQTT MR: esp-mqtt/merge_requests/49
Closes https://github.com/espressif/esp-idf/issues/4433
Closes IDFGH-2293

MQTT MR: esp-mqtt/merge_requests/50
Closes FCS-254

MQTT MR: esp-mqtt/merge_requests/53
Closes FCS-267
2020-01-14 10:55:50 +08:00
lly 14a408c478 ble_mesh: Fix PreviousAddress endianess in Friend Request
The upper transport layer is using big endian ordering. The
PreviousAddress field of a Friend Request message should therefore
be converted to native endianess using sys_cpu_to_be16().
2020-01-13 10:40:25 +08:00
lly 92d0d7ad49 ble_mesh: Fix next_period computation
If the duration to publish is roughly the same as the period, we might
end up with elapsed == period, which returns 0 and cancel the periodic
publication. Instead 1 should be returned, just like when the elapsed
time is greater than the period.
2020-01-13 10:40:20 +08:00
lly 19c9ae400b ble_mesh: Make model publication struct more compact
Previously the FastPeriodDivisor value was introduced to the model
publication struct. Based on the way it was grouped it seems the
intention was to fit it within the same octet as other bit fields,
but it actually makes the octet overflow by one bit. This ends up
creating another u8_t variable which in turn adds 24 bits of padding
after it.

To keep the size of the struct as compact as possible, group the flag
together with the key index, since that only requires 12 bits. Some
care is needed here, since the mesh stack does have special internal
key index values that require more than 12 bits such as
BLE_MESH_KEY_UNUSED and BLE_MESH_KEY_DEV. In this case restricting
ourselves to 12 bits is fine since the value in the model publication
struct follows 1:1 the value received in the Config Model Publication
Set message, and there the parameter is defined to be exactly 12 bits.
2020-01-13 10:40:13 +08:00
lly 566fb11a73 ble_mesh: Fix compile error when using release optimization level 2020-01-13 10:40:05 +08:00
lly 928480ada9 ble_mesh: Remove useless CONFIG_BLE_MESH_NODE
For Low Power node and Proxy Server, the two features
depend on BLE_MESH_NODE in Kconfig.in, here in the
stack there is no need to judge if CONFIG_BLE_MESH_NODE
is enabled.
2020-01-13 10:39:57 +08:00
lly da0205b166 ble_mesh: Fixes Provisioner not support friend feature 2020-01-13 10:39:52 +08:00
lly 610fc8124a ble_mesh: Fixes wrong subnet info used for Friend Clear
When Friend node tries to send Friend Clear message to other
Friend nodes, it should use the subnet information based on
the net_idx from friendship.
2020-01-13 10:39:42 +08:00
lly 21dbee1291 ble_mesh: fix provisioner failed to send msg to 0xFFFF
According to Mesh Spec 3.4.5.3, a node shall implement a local
network interface. And here we limit the situation just based
on the spec, and Provisioner directly sending the msg without
passing through the local network interface.
2020-01-13 10:39:37 +08:00
lly e5431e55a9 ble_mesh: fix virtual addr wrong return value
Fixes missing return value on `va_del`
Fixes wrong return value on `va_add`
2020-01-13 10:39:28 +08:00
lly 4405560483 ble_mesh: Persistent storage of Virtual Address
The 16-bit format group addresses will be stored,
but we don't store (or restore) the virtual label UUIDs,
i.e. after a power cycle the 16-bit group addresses
would be meaningless.
2020-01-13 10:39:22 +08:00
lly 51616eacee ble_mesh: Proxy forwards ALL_NODES addr
Unless explicitly blacklisted, the Proxy node will forward all messages
for the ALL_NODES address to the GATT proxy client.
2020-01-13 10:39:15 +08:00
lly 4aa7f31f02 ble_mesh: Model message macros
Creates macros for determining model message lengths based on opcode,
payload length and MIC size. Also adds macro wrapping
NET_BUF_SIMPLE_DEFINE to serve the most common use case.
2020-01-13 10:39:10 +08:00
lly 318f83e33a ble_mesh: Use net_buf_simple_clone
Uses net_buf_simple_clone to access the sdu of an unsegmented app packet
for re-encryption.
2020-01-13 10:39:03 +08:00
lly 4bf2ceee4e ble_mesh: Skip local messages in rx
Local messages are already enqueued for the LPN in the tx path, and
don't have to be added again in the rx path.
2020-01-13 10:38:59 +08:00
lly a9c5092baf ble_mesh: Ensure seqnum match in app/net
Re-encrypts single-segment application messages when the network seqnum
has changed, to avoid encrypting messages with different seqnums in
network and transport. This operation is only required for unsegmented
messages, as segmented messages don't need to use the same seqnum in
network.

Reinstates the special adv data for friend messages to store the app key
index.
2020-01-13 10:38:54 +08:00
lly 9e47e04897 ble_mesh: Expose app key get function 2020-01-13 10:38:48 +08:00
lly ca0bfb84d0 ble_mesh: Expose header parsing outside net 2020-01-13 10:38:38 +08:00
lly cc772c1324 ble_mesh: Remove unused macro FRIEND_BUF_SIZE 2020-01-13 10:38:31 +08:00
lly c344a4a3b9 ble_mesh: Make RSSI value available to mesh applications 2020-01-13 10:38:26 +08:00
lly 32387250bc ble_mesh: Encrypt friend packets on send
Stores friend queue packets unencrypted, removing any out-of-order
issues caused by seqnum allocation. Also moves as much of the metadata
storage as possible into the packet, allowing us to free up some bytes
of net_buf user data for friend packets.
2020-01-13 10:38:21 +08:00
lly a870460f72 ble_mesh: Expose SeqZero mask
Makes a define for the seqzero 13-bit mask in transport, and exposes it
in the header for use in the friend module.
2020-01-13 10:38:15 +08:00
Ivan Grokhotkov 463a9d8b7f Merge branch 'bugfix/ci_deploy_tags_v4.0' into 'release/v4.0'
ci: fix tags for internal deploy jobs (backport v4.0)

See merge request espressif/esp-idf!7295
2020-01-11 14:08:55 +08:00