Commit Graph

1000 Commits (48ae8447dba48a239f6ea23996c5f598b64dc56d)

Author SHA1 Message Date
Jerome Coutant 1bf8667136 STM32WL: fix MBED_CONF_STM32WL_LORA_DRIVER_SLEEP_MODE option 2022-08-18 14:53:58 +02:00
Martin Kojtal b482f2dcec
Merge pull request #15312 from hallard/prep_rak3172sip
STMWL32 preparation for new chip rak3172sip
2022-08-17 13:11:07 +02:00
Charles 42e11ac9bd Allow to use LowPower fix as a parameter
Allow to use TCXO Control Voltage and LowPower fix as a parameter

leave current default value to avoid breaking changes

astyle fix
2022-08-16 13:45:45 +02:00
Martin Kojtal 9ca538338a
Merge pull request #15311 from skazemi/fix/missing-global-up-callback
Fix missing global up callback in CellularContext
2022-08-03 13:13:22 +01:00
Chun-Chieh Li 127b5aa023 M487: Fix mbedtls_ecp_point_cmp() call with null argument
Guard from null argument passed to mbedtls_ecp_point_cmp() in ECC H/W port
2022-07-26 09:23:37 +08:00
Saeed Kazemi 19fddbf01a
Fix missing GLOBAL_UP callback on successful connect
Fix an issue where CellularContext::do_connect_with_retry() does not call NSAPI_STATUS_GLOBAL_UP callback and validate_ip_address() on successful connect after failed try in blocking mode.
2022-07-25 09:25:36 +02:00
Saeed Kazemi 63dc2fd550
Fix missing GLOBAL_UP callback on successful connect
Fix an issue where CellularContext::do_connect_with_retry() does not call NSAPI_STATUS_GLOBAL_UP callback on successful connect after failed try in blocking mode.
2022-07-22 17:01:39 +02:00
xiaohuizhang98 fe13765d1f lwiperf: fix double-free of pcb on error 2022-06-11 00:08:46 +08:00
Martin Kojtal d994efc2b8
Merge pull request #15273 from Tobi15/main
add the possibility to customize the delimiter of the ATHandler in AT…
2022-06-10 11:13:13 +01:00
Martin Kojtal 6170f55c64
Merge pull request #15287 from OpenNuvoton/nuvoton_fix_ecp-load-curve448
Mbed TLS: Fix wrong MPI N in ECP Curve448 curve
2022-06-02 10:31:39 +01:00
Chun-Chieh Li b402c97136 M487: Fix ECP P + P operation
Engine doesn't support P + Q when P and Q are the same. Workaround by 2*P
2022-05-24 17:38:02 +08:00
Chun-Chieh Li 3adb735d3e M487: Fix typo with DES H/W port 2022-05-24 16:37:46 +08:00
Chun-Chieh Li 9345c8a014 Mbed TLS: Fix wrong MPI N in ECP Curve448 curve
In loading Curve448, MPI N is in uninitialized state and its sign flag N.s isn't initialized to 1.
This is fixed by following:
https://github.com/Mbed-TLS/mbedtls/pull/5811
2022-05-24 16:24:46 +08:00
Rami Elkhatib fdf37c3217 MPS2 CM3DS ethernet words instead of bytes
The functions smsc9220_receive_by_chunks and smsc9220_send_by_chunks are
supposed to implement receiving and sending packets by chunks. However,
the functions SMSC9220_EMAC::low_level_input and SMSC9220_EMAC::link_out,
which call them respectively, already require or assemble the full packet.
Also, smsc9220_receive_by_chunks doesn't implement the "chunks" part.

This commit renames the functions to smsc9220_receive_packet and
smsc9220_send_packet. The functions now do their operations by word
instead of by bytes. The functions SMSC9220_EMAC::low_level_input and
SMSC9220_EMAC::link_out already handle allocation, continuity and word
alignment of the packet buffer.
2022-05-12 18:27:49 -04:00
Rami Elkhatib cbfda0e23b MPS2 CM3DS ethernet fix heap bug
The function SMSC9220_EMAC::low_level_input should create a heap for the
packet equal to the size of the message (most of which are couple hundred
bytes). The current code uses maximum frame size (1522 bytes) for each
packet. This will cause the heap to quickly fill up. In fact, the default
memory size (lwip.mem-size) used for this heap is 1600 bytes. This means
that once you have one other packet allocated (extremely common), the
heap allocation will always fails.

Also, it is recommend to increase the default lwip.mem-size because that
amount is very small especially if you send or receive a few large packets
in the network. This is NOT done in current commit.
2022-05-12 18:23:41 -04:00
Rami Elkhatib 14aa25b8b7 MPS2 CM3DS ethernet fix deprecation warnings
The sleep_for function is updated to use the chrono time arguments since
the regular ones are deprecated.
2022-05-12 18:18:59 -04:00
tobi15 73f2dd6379 modify method signatures to pass astyle tests 2022-05-10 14:27:54 +02:00
Vincent Coubard c34640495f
Bluetooth: Inform privacy risk of using signed writes.
The Cordio stack uses a single CSRK. It can be used by a
malicious device to track the Mbed OS application if signed
writes are used.

Signed-off-by: Vincent Coubard <vincent.coubard@arm.com>
2022-05-06 13:44:33 +01:00
tobi15 d720db5bc8 modify AT_CellularDevice_stub to pass test with the new feature 2022-04-21 17:29:10 +02:00
hifoolno 173c070d7d tcp_out: fix tcp_output_fill_options() arguments 2022-04-20 21:46:35 +08:00
merge 337b811ba1 add the possibility to customize the delimiter of the ATHandler in ATCellularDevice class 2022-04-20 14:21:31 +02:00
Chun-Chieh Li 56f4b4cd29 Mbed TLS: Fix compile error with ECP alternative
Fix un-paired parenthesis when MBEDTLS_ECP_RANDOMIZE_MXZ_ALT is enabled
2022-04-08 17:24:55 +08:00
Chun-Chieh Li 0d2de99778 ESP8266: Fix serial flow control inconsistency on reconnect
The commit will address the test failure of connectivity-netsocket-tests-tests-network-interface.
In the test, serial channel will break with the sequence: ESP8266Interface::connect() > disconnect() > connect()
In the first connect, both board's and ESP8266's serial flow control default to disabled, and then enabled.
In the second connect, board's serial flow control keeps enabled but ESP8266's resets to disabled, causing inconsistency between two ends.

The approach: Explicitly disable board's serial flow control on re-power or reset in (re-)connect
2022-03-07 18:30:36 +08:00
Martin Kojtal 2d59c759bd
Merge pull request #15227 from zul00/fix/lora_timing/join_req_retransmission/call_in
lorawan: Fix Join Request retransmission timing (Interop test)
2022-02-16 16:36:30 +01:00
zul 61f83741b0 Fixed Join Request retransmission timing (Interop test)
On interop test 1.2.2.4, Join Request retransmission is expected to be 6
s + worst case air transmission. This delay is to accommodate for
JoinAccept through RX2.

The `call_in` in process_reception_timeout of RX2-window adds 500 ms
delay between RX2 symbol-interrupt-timeout and the next join request
retransmission. This is an isolated change and only affect the
retransmission of Join Request.

Adding this delay improves the chance of succeeding test
1.2.2.4 (subset of 1.2.2)
2022-02-14 12:07:29 +01:00
Zulkarnaen 1e9254387e Fixed issue in unconfirmed_retransmission behavior
Fixed issue on LoRaWANStack based on lorawan v1.0.2 specification page
24 line 25-27. The specification mentioned that that end-device shall
stop retransmission when receiving ANY downlink on RX1 or RX2 window.

- Removed conflicting behavior in
  LoRaWANStack::post_process_tx_with_reception()
- Updated comment section of nb_trials at lorawan_data_structures.h
2022-02-11 15:04:23 +01:00
LukaB d503495189 Fix STM32 radio driver when bandwith is 0
A bug was detected when the uint8_t SUBGRF_GetFskBandwidthRegValue( uint32_t bandwidth )
is called and the bandwith argument has a value of 0.

Comparing the code to the STMCubeWL 1.1 we can see that an if statement is missing to
address the condition where bandwith is equal to 0.

Added the if statement to the radio driver to account for this edge case.
2022-02-03 08:24:21 +13:00
Martin Kojtal fe5e648147
Merge pull request #15192 from ATmobica/master
Add option to disable WHD component for Cypress targets
2021-12-15 11:59:33 +00:00
Martin Kojtal ff061e8cf2
Merge pull request #15187 from artokin/nanostack_release_v15_1_0
Nanostack release v15.1.0 to master
2021-12-13 09:46:45 +00:00
ATmobica 78a7859fa8 Add <"WHD" IN_LIST MBED_TARGET_LABELS> condition to Cypress boards and wifi driver cmake files 2021-12-10 13:14:29 +01:00
Martin Kojtal 1c5813b33c
Merge pull request #15181 from hallard/LoRa_sx1276_LowPower_fix
Fix LoRa sx1276 Low Power sleep, now 3uA
2021-12-08 14:55:52 +00:00
Arto Kinnunen 357dbec020 Merge commit '1d440bc3adfe6afbd60ff8c39dd267aa925716c3' into nanostack_v15_1_0
* commit '1d440bc3adfe6afbd60ff8c39dd267aa925716c3':
  Squashed 'connectivity/nanostack/sal-stack-nanostack-eventloop/' changes from fb20d3f32c..60c1fb61af
2021-12-08 13:54:43 +02:00
Arto Kinnunen d64e8f6878 Merge commit '89eb48fe1a3ba68057029c7e475f1ec78eb95abc' into nanostack_v15_1_0
* commit '89eb48fe1a3ba68057029c7e475f1ec78eb95abc':
  Squashed 'connectivity/drivers/802.15.4_RF/mcr20a-rf-driver/' changes from 61de9be6dc..7a1bfec754
2021-12-08 13:48:16 +02:00
Arto Kinnunen 9daf4300e3 Merge commit '75c79ac616fce0b36ca047e676069e12e1bb30c1' into nanostack_v15_1_0
* commit '75c79ac616fce0b36ca047e676069e12e1bb30c1':
  Squashed 'connectivity/drivers/802.15.4_RF/stm-s2lp-rf-driver/' changes from 7d12478914..089ca0eed7
2021-12-08 13:47:47 +02:00
Arto Kinnunen a947f4845c Merge commit '233ec783c1b902af25f1376d6fcdc9f4b0bccf53' into nanostack_v15_1_0
* commit '233ec783c1b902af25f1376d6fcdc9f4b0bccf53':
  Squashed 'connectivity/drivers/802.15.4_RF/atmel-rf-driver/' changes from 834c5357c6..ccba775217
2021-12-08 13:47:18 +02:00
Arto Kinnunen 0dfb79e28b Merge commit '00253cb11629fab6f753682d89faa2ce7b4a213a' into nanostack_v15_1_0
* commit '00253cb11629fab6f753682d89faa2ce7b4a213a':
  Squashed 'connectivity/nanostack/sal-stack-nanostack/' changes from 225a4af94f..154db5425e
2021-12-08 13:41:33 +02:00
Jerome Coutant fb07b7ac4c STM32WL : add LORA robustness
Improvment to support extensive tests
2021-12-06 17:48:35 +01:00
Martin Kojtal f609a5234e
Merge pull request #15177 from danluck/master
Fix overflow at extremely low RSSI
2021-11-29 16:54:11 +00:00
Charles ccc34b9134 Fix Low Power sleep, now 3uA 2021-11-29 17:16:09 +01:00
ATmobica 784f17b26c Add netbuf-recvinfo-enabled config to LWIP mbed_lib.json 2021-11-25 17:18:35 +01:00
Mikhail Isaev 352e6fbd23 Fix overflow at extremely low RSSI
Some LoRaWAN modem like SX1272 can receive downlink packets with RSSI level less than -127. So "int8_t" is not enough for store all possible RSSI values. For example, SX1272 has sensitivity at -137 dBm.
Problem was manifested in the file "SX1272_LoRaRadio.cpp" at SX1272_LoRaRadio::handle_dio0_irq() method.
When value of _rf_settings.lora_packet_handler.rssi_value calculated incorrect RSSI will be stored. Example case:

Value readen from register REG_LR_PKTSNRVALUE _rf_settings.lora_packet_handler.snr_value equals -47.
Value readen from register REG_LR_PKTRSSIVALUE equals 17.
RSSI_OFFSET equals "-139", snr equals "-11".

For case MODEM_LORA value calculated by formula:
_rf_settings.lora_packet_handler.rssi_value = RSSI_OFFSET + rssi + (rssi >> 4) + snr;
and result value will be "124" because of int8_t overflow so it's not correct value (too high).

Correct value must be:
-139 + 17 + (1) + (-11) = -132.

Another motivation: at all other places int16_t type used to store RSSI value.
2021-11-24 21:56:42 +03:00
Martin Kojtal 0db0445a97
Merge pull request #15111 from world-direct/feature/dtlserror
DTLSSocket - destruction while handshaking lead to error
2021-11-17 15:25:29 +00:00
Martin Kojtal ae5c9ec70e
Merge pull request #15153 from bakatrouble/master
STM32F722ZE port
2021-11-17 15:22:30 +00:00
bakatrouble e33088583e Allow STM32F7 targets without Ethernet 2021-10-28 19:18:24 +03:00
Martin Kojtal 07e119b467
Merge pull request #15154 from rardiol/STM32WB55-BLE-HCI_size
STM32WB55 HCI driver: version dependent rom size
2021-10-28 10:09:49 +01:00
Martin Kojtal 555f6beceb
Merge pull request #15147 from boraozgen/bugfix/remove-socket-control-stubs
NetworkStack: Remove stub implementations of socket_x_control
2021-10-25 11:41:04 +02:00
Ricardo Ardissone ca28a86d1b STM32WB55 HCI driver: version dependent rom size
stm32wb5x_BLE_HCILayer_fw.bin install address increased from 0x080E0000
to 0x080E1000 in version 1.12.0. Assumes any future bump to major or
minor version will maintain the new install address.
See https://github.com/STMicroelectronics/STM32CubeWB/blob/master/Projects/STM32WB_Copro_Wireless_Binaries/STM32WB5x/Release_Notes.html
2021-10-22 18:20:33 -03:00
Bora Özgen 7523588035 NetworkStack: Remove stub implementations of socket_x_control
As a default implementation is already provided by
NetworkStack, stub implementations in the child classes
are not required. Furthermore, they return unsupported for
all cases instead of redirecting to the non-control API,
which is plainly wrong.
2021-10-21 10:33:13 +02:00
Martin Kojtal 06f234e3af
Merge pull request #15137 from jeromecoutant/PR_WL_1_1_0
STM32WL update drivers version to CUBE V1.1.0
2021-10-15 10:07:02 +02:00
Martin Kojtal e4111eaa0d
Merge pull request #15068 from jeromecoutant/PR_INTERFACE
connectivity tests: avoid HardFault with null pointer
2021-10-14 15:43:07 +02:00